程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 數據庫知識 >> MYSQL數據庫 >> MySQL綜合教程 >> sqlplus組件意外被破壞恢復測試

sqlplus組件意外被破壞恢復測試

編輯:MySQL綜合教程

sqlplus組件意外被破壞恢復測試


sqlplus 組件意外被破壞恢復

在執行 sqlplus / as sysdba 命令後沒啥反應,有點奇詭。。。
[oracle@lixora bin]#sqlplus / as sysdba
[oracle@lixora bin]# ls -trl
...
-rwxr-x--x 1 oracle oinstall 0 Dec 9 15:52 sqlplus -------這個文件居然被寫空了發火
...

恢復測試:
從oracle 11201拷貝一個sqlplus 過來,修改完權限後進行測試:

[oracle@lixora bin]# ls -trl
-rwxr-x--x 1 oracle oinstall 9197 Dec 24 10:26 sqlplus
[oracle@lixora ~]$ sqlplus / as sysdba
SP2-1503: Unable to initialize Oracle call interface
SP2-0152: ORACLE may not be functioning properly
[oracle@lixora ~]$


關於上述報錯官方解釋:
01503,0, "Unable to initialize Oracle call interface\n"
// *Cause: Indicates a library used by SQL*Plus to communicate with
// the database failed to initialize correctly.
// *Action: Check that the Oracle environment or registry entries are
// consistent and correct. If using the SQL*Plus Instant Client
// make sure the SQL*Plus and Oracle libraries are from the
// same release. Make sure you have read access to the libraries.


00152,0, "ORACLE may not be functioning properly\n"
// *Cause: Unable to initialize a session to the Oracle instance.
// *Action: Make a note of the message and the number, then contact
// the Database Administrator.


從報錯的信息來看主要是sqlplus 無法調用正常的lib 庫文件,因而無法和/bin/目錄下的oracle(rdbms)進行通信;
那麼如果是從同平台同版本的oracle 數據庫中拷貝一個sqlplus 組件過來,沒准就能用的?
[oracle@lixora bin]# ls -trl
...
-rwxr-x--x 1 oracle oinstall 7725 Dec 24 10:29 sqlplus


再次測試:
[oracle@lixora bin]$ !sql
sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Dec 24 10:30:18 2014
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.


SQL> startup

ORACLE instance started.

Total System Global Area 583008256 bytes
Fixed Size 2074440 bytes
Variable Size 436209848 bytes
Database Buffers 138412032 bytes
Redo Buffers 6311936 bytes
Database mounted. --------》數據庫可以正常啟動
Database opened.


來點暴力的,但是感覺和數據庫沒啥關系啊?
SQL> startup force
ORACLE instance started.
Total System Global Area 583008256 bytes
Fixed Size 2074440 bytes
Variable Size 440404152 bytes
Database Buffers 134217728 bytes
Redo Buffers 6311936 bytes
Database mounted.
Database opened.


SQL> show parameter dump
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
background_core_dump string partial
background_dump_dest string /oracle/admin/lixora/bdump
core_dump_dest string /oracle/admin/lixora/cdump
max_dump_file_size string 1024
shadow_core_dump string partial
user_dump_dest string /oracle/admin/lixora/udump
SQL> select open_mode from v$database;
OPEN_MODE
----------
READ WRITE

SQL> select * from dual;
D
-
X




一切ok,這裡冒出一個想法,如果 rman or dbca or netca 。。。。意外損壞,是不是也可以按上方法來替換解決呢?找機會測下

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved