Oracle Command--check that the database status is correct

Source: Internet
Author: User
Tags sqlplus

Check that the database state is correct
A. Check to see if the Oracle instance is started.
> Ps-ef|grep Oracle
The query to the information containing the "INOMC" keyword indicates that the instance was started.
If you do not start, you need to start the following command:
> Sqlplus/as SYSDBA
Sql> Startup
Sql> exit
B. Check that Oracle listening is started.
> Lsnrctl Status
Querying to listener information indicates that the listener has started.
If you do not start, you need to start the following command:
> Lsnrctl Start

View database version information .
Check the underlying version information for the Oracle database.

# su-oracle

> Sqlplus/as SYSDBA

Sql> select * from V$version;

The system displays information similar to the following:
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition release 11.1.0.7.0-64bit Production
Pl/sql Release 11.1.0.7.0-production
CORE 11.1.0.7.0 Production
TNS for Linux:version 11.1.0.7.0-production
Nlsrtl Version 11.1.0.7.0-production indicates that the Oracle database is properly installed by linking to the Oracle database for data queries.
You need to ensure that the version information displayed is: Oracle Database 11g Enterprise Edition release 11.1.0.7.0-64bit Production.

Sql> exit


Check the patch version information for the Oracle database.

Description
You can only check the underlying version information of an Oracle database through step 1.a, and this will enable you to determine whether the Oracle database version is 11.1.0.7.3.

> Export path= $PATH:/opt/oracle/oradb/home/opatch_11.1.0.8.1/opatch

> Opatch lsinventory | Grep-w 9352179

If the system displays information containing 9352179, the patch version of the Oracle database is 11.1.0.7.3.

Otherwise, refer to how to uninstall the Oracle database uninstall the Oracle database, and then refer to installing the Oracle database with the Quick Install CD to reinstall the Oracle database.

Check that the database status is correct .
Check that the Oracle instance is started.

> Ps-ef|grep Oracle

The query to the information containing the "INOMC" keyword indicates that the instance was started.

If you do not start, you need to start the following command:

> Sqlplus/as SYSDBA

Sql> Startup

Sql> exit


Check if Oracle listening is started.

> Lsnrctl Status

Querying to listener information indicates that the listener has started.

If you do not start, you need to start the following command:

> Lsnrctl Start


Check that the listening port is correct.

> Vi/opt/oracle/oradb/home/network/admin/tnsnames.ora

The system displays the following information:
INOMC =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = linux6) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = INOMC)
)
)
> Vi/opt/oracle/oradb/home/network/admin/listener.ora

The system displays the following information:
LISTENER =
(Description_list =
(DESCRIPTION =
(address = (PROTOCOL = TCP) (HOST = i2ksvr) (PORT = 1521))
)
)
If "Port" is "1521", the listening port is correct.


Check the database character set.

> Sqlplus/as SYSDBA

Sql> Select value from Nls_database_parameters where parameter= ' nls_characterset ';

ZHS16GBK If the system displays a ZHS16GBK, the character set is correct.


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.