Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Solve the error Connected of oracle12 under Linux

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

The green background is the input, the white background is the output and the yellow background is the error prompt in the output.

Problem description:

[root@oracle ~] # su-oracle

Last login: Tue Sep 17 23:40:50 CST 2019 on pts/0

[oracle@oracle ~] $sqlplus / nolog

SQL*Plus: Release 12.2.0.1.0 Production on Mon Sep 201: 09:18 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

SQL > conn sys / as sysdba

Enter password:

Connected to an idle instance.

Solution:

1. Go to sqlplus to start the instance

[root@oracle] # su-oracle-1. Confirm to switch to oracle user

Last login: Tue Sep 17 23:40:50 CST 2019 on pts/0

[oracle@oracle] $lsnrctl start-- 2. Turn on listening

LSNRCTL for Linux: Version 12.2.0.1.0-Production on 02-SEP-2019 01:19:38

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Starting / u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0-Production

System parameter file is / u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Log messages written to / u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml

Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=oracle) (PORT=1521)

Listening on: (DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1521)

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=TCP) (HOST=oracle) (PORT=1521)

STATUS of the LISTENER

-

Alias LISTENER

Version TNSLSNR for Linux: Version 12.2.0.1.0-Production

Start Date 02-SEP-2019 01:19:40

Uptime 0 days 0 hr. 0 min. 0 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File / u01/app/oracle/product/12.2.0/dbhome_1/network/admin/listener.ora

Listener Log File / u01/app/oracle/diag/tnslsnr/oracle/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=oracle) (PORT=1521))

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1521)

The listener supports no services

The command completed successfully

[oracle@oracle ~] $sqlplus / nolog-- Log in to sqlplus

SQL*Plus: Release 12.2.0.1.0 Production on Mon Sep 201: 23:29 2019

Copyright (c) 1982, 2016, Oracle. All rights reserved.

SQL > conn / as sysdba

Connected to an idle instance.

SQL > startup

ORA-01078: failure in processing system parameters

LRM-00109: could not open parameter file'/ u01amp appActionoracleUniverse product12.2.0anddbhomeowners 1anddbsAccording initoradb.ora'

The original initoradb.ora can not be opened, so enter the / u01/app/oracle/product/12.2.0/dbhome_1/dbs/ directory

[root@oracle ~] # cd / u01/app/oracle/product/12.2.0/dbhome_1/dbs/

[root@oracle dbs] # ls

Hc_orcl.dat init.ora lkORCL orapworcl spfileorcl.ora

It turns out there is no initoradb.ora file.

The solution to this problem is to go to the / u01/app/oracle/admin/orcl/pfile/ directory and copy the init.ora.818201912514 to the dbs directory:

[root@oracle app] # cd / u01/app/oracle/admin/orcl/pfile/

[root@oracle pfile] # ls

Init.ora.818201912514

[root@oracle pfile] # cp init.ora.818201912514 / u01/app/oracle/product/12.2.0/dbhome_1/dbs/initoradb.ora

The object file of cp may be empty when opened by oracle users, and authorized by chmod command: chmod-R 777 / object file

[root@oracle dbs] # chmod-R 777 / u01/app/oracle/product/12.2.0/dbhome_1/dbs/initoradb.ora

Then use sqlplus to connect to the database again

[oracle@oracle ~] $sqlplus / nolog

SQL > conn / as sysdba

Connected to an idle instance.

SQL > startup-- start the oracle database

ORACLE instance started.

Total System Global Area 3741319168 bytes

Fixed Size 8627344 bytes

Variable Size 872418160 bytes

Database Buffers 2852126720 bytes

Redo Buffers 8146944 bytes

Database mounted.

Database opened.

After the database starts, connect to the database

SQL > conn / as sysdba

Connected.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report