Processing of ora-01172 ora-01151

Source: Internet
Author: User

A machine, the disk was found to scan, it is estimated that the shutdown encountered problems yesterday, Oracle appeared after ora-01172 ora-01151
Hurry to find information to solve, and encountered a ORA-12514 error, the first solution to this error is as follows:
Enter the following information in the listener. ora file:

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = oracle) service name
(ORACLE_HOME = E: \ oracle \ product \ 10.2.0 \ db_1) db_home
(SID_NAME = oracle) # This is the service you want to add
)
(SID_DESC =
(PROGRAM = extproc)
(SID_NAME = PLSExtProc)
(ORACLE_HOME = E: \ oracle \ product \ 10.2.0 \ db_1) # This Service ensures that you can use external processes, such as C Programs.
)
)

Then configure the tnsnames. ora file and add the following content:

Oracle =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521 ))
)
(CONNECT_DATA =
(SERVICE_NAME = test) corresponds to the above service name
)
)

You can test the connection as follows:
Tnsping oracle

After Oracle9i, the background process PMON automatically registers the service name defined in the system parameter SERVICE_NAMES In the listener. The default value of SERVICE_NAMES is DB_NAME + DOMAIN_NAME. You do not need to specify the service name of the listener in the listener Configuration File listener. ora. However, when the PMON process is not started when the database is closed, the Instance name of the listener will not be automatically registered, so the use of sqlplus sys/his @ orc0 as sysdba will have a ORA-12514 error.

Enter set display verbose in lsnrctl, and then run the Command service to check whether the service status is READY, which indicates the service name automatically registered by PMON, and UNKNOWN indicates that the service is manually in LISTENER. database Service configured in ORA.

As
As for media restoration:
Ora-01172 ora-01151, the solution is as follows:

C:> sqlplus/nolog
SQL> connect sys/sys @ oracle as SYSDBA
Connected
SQL> startup mount
ORA-01081: unable to start ORACLE that is already running --- Close first
SQL> alter database open read only;
Alter database open read only
*
ERROR is located in row 1st:
ORA-16005: database recovery required


SQL> recover database
Media recovery is completed.
SQL> shutdown immediate
ORA-01109: the database is not open


The database has been detached.
The ORACLE routine has been disabled.
SQL> startup
The ORACLE routine has been started.

Total System Global Area 730931140 bytes
Fixed Size 454596 bytes
Variable Size 411041792 bytes
Database Buffers 318767104 bytes
Redo Buffers 667648 bytes
The database has been loaded.
The database has been opened.
SQL>

So you can.

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.