背景
之前已经在centos上安装了Oracle,意外突然断电。记录一次重启Oracle的踩坑记录。
确定防火墙是否开启
- systemctl status firewalld – 查看防火墙状态
- systemctl start firewalld – 开启防火墙
- systemctl stop firewalld – 关闭防火墙
- 如果开启防火墙则打开Oracle配置的端口地址(默认:1521) – firewall-cmd --add-port=10050/tcp --permanent
- 直接关闭防护墙
启动数据库
- 切换为oracle用户:su -oracle ----输入密码
- sqlplus /nolog 或 sqlplus / as sysdba
- conn / as sysdba
- startup — 启动数据库实例 (shutdown immediate - 关闭数据库实例)
启动Oracle监听
- lsnrctl status – 监听状态查询
- lsnrctl start – 启动监听
- lsnrctl stop – 关闭监听
bug 启动监听时报错
not fount services
修改监听文件listener.ora,文件位置在:/u01/app/oracle/product/11.1.0/db_1/network/admin
LISTENER =(DESCRIPTION_LIST =(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.1)(PORT = 1521)))))SID_LIST_LISTENER =(SID_LIST =(SID_DESC =(GLOBAL_DBNAME = orcl)(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)(SID_NAME = orcl)))
以上就是关于Linux服务器上重启oracle的部分知识。如有问题,希望大家评论区留言多多指教!如觉得写得还可以,就给一个赞吧!