oracle 重启步骤及踩坑经验

oracle 重启步骤及踩坑经验

标准重启步骤

切换到oracle用户
su - oracle
关闭监听
vbscript 复制代码
lsnrctl stop
杀掉oracle有关进程
ps -ef|grep $ORACLE_SID|grep -v ora_|grep LOCAL=NO|awk '{print $2}'|xargs  kill -9

#查询pid
ps -ef|grep $ORACLE_SID|grep -v ora_|grep LOCAL=NO|awk '{print $2}'
#杀掉进程
kill -9  
登录数据库,关闭oracle数据库
sqlplus / as sysdba
#关闭数据库
shutdown immediate
#退出sqlplus
exit
重启监听
lsnrctl start
重启数据库
sqlplus / as sysdba
#启动数据库
startup
#退出sqlplus
exit

#查看监听状态
lsnrctl status

踩坑经验

shutdown immediate 时可能比较久,此时不要着急退出,等待一会等他报错

重启oracle startup时一直卡在Database mounted

可以等一会,如果等了很久没报错就退出然后重新来一遍重启流程

报错ORA-01012: not logged on

kill oracle 进程 或者关掉oracle

perl 复制代码
ps -ef|grep ora_dbw0_$ORACLE_SID
kill -9 pid
相关推荐
想做富婆11 小时前
oracle: 多表查询之联合查询[交集intersect, 并集union,差集minus]
数据库·oracle·联合查询
是小崔啊1 天前
Spring Boot - 数据库集成07 - 数据库连接池
数据库·spring boot·oracle
扎量丙不要犟2 天前
rust如何操作oracle
数据库·oracle·rust
字节全栈_OYI2 天前
在Windows中 基于Oracle GoldenGate (OGG)进行MySQL->MySQL数据库同步配置(超详细)_ogg-15146
数据库·windows·oracle
MXin52 天前
【DB】Oracle存储过程
数据库·oracle
GIS小小研究僧3 天前
PostgreSQL 数据库备份与还原
数据库·postgresql·oracle·postgis
码农幻想梦3 天前
实验十 数据库完整性实验
数据库·sql·oracle
小安同学iter3 天前
MySQL数据库(二)
数据库·sql·mysql·oracle
zZeal3 天前
Django ORM解决Oracle表多主键的问题
后端·python·oracle·django
martian6653 天前
第22篇:Python开发进阶:详解使用SQLAlchemy进行ORM数据库编程技术
数据库·python·oracle