sqlplus -prelim/ as sysdba用法
在某些情況下,資料庫失去響應,sqlplus也無法連線,此時通常只能透過殺掉程式來解決。
但是我們仍然希望能夠獲得此時的資料庫狀態資訊,以便用於事後診斷。
從Oracle10g開始,sqlplus提供了一個引數選項-prelim,可以在通常sqlplus無法連線的情況下進行連線。
透過以下步驟可以獲取系統資訊:
sqlplus -prelim / as sysdba
oradebug setmypid
oradebug unlimit;
oradebug dump systemstate 10
這種方法非常有用:
$ sqlplus -prelim / as sysdba
<wbr> SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:42:20 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL>
但是需要注意的是,在Oracle 10.2.0.1中,使用如上方法會出現一個錯誤:
$ sqlplus -prelim / as sysdba
<wbr> SQL*Plus: Release 10.2.0.1.0 - Production on Thu Oct 25 09:38:14 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
SQL> oradebug setmypid
Statement processed.
SQL> oradebug unlimit
Statement processed.
SQL> oradebug dump systemstate 10
ORA-03113: end-of-file on communication channel
ORA-24323: value not allowed
此時在alert檔案中會記錄如下錯誤提示:
Thu Oct 25 09:38:32 2007
System State dumped to trace file
Thu Oct 25 09:38:32 2007
Errors in file /opt/oracle/admin/test201/udump/test201_ora_1402.trc:
ORA-07445: exception encountered: core dump [kgldmp()+1360] [SIGSEGV] [Address not mapped to object] [0x000000030] [] []
這是由於一個Bug導致的,Bug號為5730231,該Bug在10.2.0.3中修正。
對於9i也有變通的方法使用
-prelim is feature of Sql*Plus 10g and latter.
So as long you have any Sql*Plus 10g or latter version (ex. from client installation) and a valid net service name to connect to your 9i database you should be able to establish a "backdoor" connection.
You can do the following:$sqlplus -prelim /nolog
and once you are in, just connect to the database using SYSDBA account
SQL> connect sys/password@net_service_name as sysdba
Prelim connection established
[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/633084/viewspace-1016614/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- sqlplus -prelim / as sysdba強制登入SQL
- inside sqlplus prelim(轉)IDESQL
- Oracle sqlplus prelim 引數介紹OracleSQL
- 隨筆 sqlplus / as sysdbaSQL
- Oracle hang 之sqlplus -prelim使用方法OracleSQL
- oracle之 sqlplus prelim 引數介紹 ( 處理hang )OracleSQL
- oradebug分析oracle hang或慢_sqlplus_prelimOracleSQL
- sqlplus用法SQL
- sqlplus / as sysdba無法登入的奇怪報錯SQL
- sqlplus sys/oracle@orcl as sysdba無法登入SQLOracle
- sqlplus / as sysdba 登入報許可權不足 for windowsSQLWindows
- 轉至老熊三分地--inside sqlplus prelimIDESQL
- 再談ORA-01031 when sqlplus '/as sysdba'SQL
- sqlplus column命令用法SQL
- sqlplus -prelim和oradebug捕獲資料庫hang住的詳細資訊SQL資料庫
- sqlplus “/ as sysdba”登入的時候提示沒有許可權SQL
- sqlplus / as sysdba 遇到ora-01012 no logged onSQL
- sqlplus中change命令的用法SQL
- 【問題處理】“sqlplus / as sysdba”無法登陸——多餘的斜槓!SQL
- sqlplus / as sysdba登入提示ORA-01031: 許可權不足SQL
- sqlplus / as sysdba報錯ORA-01031: insufficient privileges的原因分析SQL
- sqlplus / as sysdba 提示許可權不足(ORA-01031)問題處理SQL
- sqlplus / as sysdba報錯ORA-01017: invalid username/password; logon deniedSQLGo
- sqlplus "/ as sysdba" 連不上,報ora-01031:insufficient privileges解決方法SQL
- Oracle SYSDBA稽核Oracle
- 關於sqlplus用法的一些總結SQL
- Oracle所有者不是dba 引起sqlplus / as sysdba 登入報錯ORA-01031OracleSQL
- linux環境下sqlplus sys/sys@ORCL as sysdba報錯 ORA-01031: insufficient privilegesLinuxSQL
- oracle sqlplus中column格式化命令之heading用法OracleSQL
- sysdba,sysoper,normal的區別ORM
- dba和sysdba的區別
- sysdba,dba,sysoper的區別
- normal 、sysdba、 sysoper的區別ORM
- sysdba不能遠端登入
- sysdba和dba的區別
- python cx_Oracle SYSDBAPythonOracle
- SYSDBA and SYSOPER Privileges in Oracle [ID 50507.1]Oracle
- system sys,sysoper sysdba 的區別