采用dbstart腳本啟動的一些錯誤——解決


在linux系統下,用root用戶采用dbstart腳本直接啟動oracle服務或監聽

 

第一個問題:啟動服務的同時沒有啟動監聽

[root@localhost ~]# su - oracle -c "dbstart"
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /oradata/oracle/112/bin/dbstart ORACLE_HOME
Processing Database instance "orcl": log file /oradata/oracle/112/startup.log

ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener這個提示說明
啟動oracle服務的同時沒有啟動oracle監聽服務,因此如果想在啟動oracle服務的同時i啟動監聽
就需要修改dbstart,將ORACLE_HOME_LISTNER值設為$ORACLE_HOME(原來是為$1)
[root@localhost ~]# vi /oradata/oracle/112/bin/dbstart

注:dbshut一樣的道理,如果想關閉數據庫服務的同時關閉監聽服務也是將dbshut文件中的ORACLE_HOME_LISTNER值設為$ORACLE_HOME

修改后再次執行dbstart
[root@localhost ~]# su - oracle -c "dbstart"
Processing Database instance "orcl": log file /oradata/oracle/112/startup.log
查看啟動日志,發現提示權限不足
[root@localhost ~]# cat /oradata/oracle/112/startup.log

/oradata/oracle/112/bin/dbstart: Starting up database "orcl"
2012年 04月 14日 星期六 12:12:17 CST


SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:12:17 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> ERROR:
ORA-01031: insufficient privileges


SQL> ORA-01031: insufficient privileges
SQL>
/oradata/oracle/112/bin/dbstart: Database instance "orcl" warm started.

 

第二個問題:不同登錄方式下權限的認證問題
直接手動登陸以sqlplus / as sysdba方式 登陸,提示權限不足

[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:17:48 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied


Enter user-name:
ERROR:
ORA-01017: invalid username/password; logon denied


SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

但是如果先以sqlplus /nolog,在以sys用戶登陸就可以
[oracle@localhost ~]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:17:58 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

SQL> conn sys/xxx@orcl as sysdba
Connected to an idle instance.


修改sqlnet.ora文件,將SQLNET.AUTHENTICATION_SERVICES=(NTS)這句話注釋或值改為ALL

修改后再次直接以sqlplus / as sysdba方式登陸就可以了
[oracle@localhost ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Sat Apr 14 12:26:44 2012

Copyright (c) 1982, 2009, Oracle.  All rights reserved.

Connected to an idle instance.
SQL> exit
Disconnected


因此直接再次執行dbstart,這次成功啟動oracle服務了
[oracle@localhost ~]$ su - oracle -c "dbstart"
口令:
Processing Database instance "orcl": log file /oradata/oracle/112/startup.log

說明:關於第二個問題,可查看  這篇文章。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM