首页 > 数据库 >ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0

ERROR at line 1: ORA-01034: ORACLE not available Process ID: 0 Session ID: 0 Serial number: 0

时间:2023-02-08 19:34:22浏览次数:59  
标签:available Process startdb oracle rc ORACLE home ID

原因:数据库实例没有startup

1.建立目录
# su - oracle
$ mkdir /home/oracle/scripts
2.建立启动脚本:
$ cd /home/oracle/scripts
$ vim startdb.sh
#!/bin/bash
export ORACLE_BASE=/u01/app/oracle(根据你的oracle目录 which oracle)
export ORACLE_HOME=$
ORACLE_BASE/product/19.16.0/db_1
export ORACLE_SID=emrep
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
lsnrctl start
sqlplus / as sysdba <<eof
startup;
quit
eof
2.修改startdb.sh 权限
$ chmod +x
/home/oracle/scripts/startdb.sh
3.加到 /etc/rc.local
su - root
[root@em13c ~]# vim /etc/rc.local
...
su - oracle -c "
/home/oracle/scripts/startdb.sh"
4.添加权限
[root@em13c ~]# chmod +x /etc/rc.d/rc.local
最后,重启去验证一下,是否数据库监听及数据库是否自动起来。

 

标签:available,Process,startdb,oracle,rc,ORACLE,home,ID
From: https://www.cnblogs.com/Gdavid/p/17103055.html

相关文章