Sqlplus component damage recovery test, sqlplus component test

Source: Internet
Author: User

Sqlplus component damage recovery test, sqlplus component test
Sqlplus component accidentally damaged and restored

After executing the sqlplus/as sysdba command, there is no response, which is a bit strange...
[Oracle @ lixora bin] # sqlplus/as sysdba
[Oracle @ lixora bin] # ls-trl
...
-Rwxr-x -- x 1 oracle oinstall 0 Dec 9 sqlplus ------- the file is empty.
...

Recovery test:
Copy A sqlplus from oracle 11201 and test the permission after modification:

[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 ~] $


Official explanation of the above error:
01503,0, "Unable to initialize Oracle call interface \ n"
// * Cause: Indicates a library used by SQL * Plus to communicate
// 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
// 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.


From the error message, sqlplus cannot call the normal lib library file, and thus cannot communicate with oracle (rdbms) in the/bin/directory;
So if we copy a sqlplus component from an oracle database of the same platform version, we may be able to use it?
[Oracle @ lixora bin] # ls-trl
...
-Rwxr-x -- x 1 oracle oinstall 7725 Dec 24 10:29 sqlplus


Test again:
[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,200 6, 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. -------- the Database can be started normally
Database opened.


It's a bit violent, but it doesn't matter to the database?
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




Everything is okay. Here is an idea, if rman or dbca or netca .... If it is accidentally damaged, can it be replaced by the above method? Test it by chance

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.