In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
After silently installing oracle11gr2 version today, after connecting to the database, the following situation occurs:
[oracle@oracle response]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 29 09:04:40 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> shutdown immediate;
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
SQL> alter system register;
alter system register
*
ERROR at line 1:
ORA-01034: ORACLE not available
Process ID: 0
Session ID: 0 Serial number: 0
So I checked the information on the Internet, ruled out the problem of insufficient memory, said that the database was not opened, and then tried to re-open it, and the result was still wrong. As follows:
SQL> startup mount;
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/initORCL.ora'
Follow the prompts to look for the initORCL.ora file and find none. So put init.ora.*** in the $ORACLE_BASE/admin/orcl/pfile directory Copy the file in the form to $ORACLE_HOME/dbs directory and rename it initORCL.ora. (Note: orcl in initORCL.ora is your instance name ORACLE_SID, where my SID is ORCL)
Or change the name spflieoracl.ora in the $ORACLE_HOME/dbs directory to spfileORCL.ora. (Note: ORCL in spfileORCL.ora is SID set in environment variable)
[oracle@oracle ~]$ cp /u01/app/oracle/admin/orcl/pfile/init.ora.82920179156 $ORACLE_HOME/dbs/initORCL.ora
[oracle@oracle ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri Sep 29 11:58:27 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2215944 bytes
Variable Size 184553464 bytes
Database Buffers 436207616 bytes
Redo Buffers 3350528 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
Try closing the database normally:
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down.
After checking the information, I found that it was caused by the lk file, which is located in the dbs directory under ORALCE_HOME. Check the file immediately:
[oracle@oracle ~]$ ls $ORACLE_HOME/dbs
hc_DBUA0.dat hc_ORCL.dat initORCL.ora orapworcl
hc_orcl.dat init.ora lkORCL spfileorcl.ora
[oracle@oracle dbs]$ fuser -u lkORCL
lkORCL: 7621(oracle) 7627(oracle) 7631(oracle) 7633(oracle) 7637(oracle) 7639(oracle) 7641(oracle) 7643(oracle) 7645(oracle) 7647(oracle) 7649(oracle) 7651(oracle) 7663(oracle) 7680(oracle) 7682(oracle) 7684(oracle) 7692(oracle) 8272(oracle)
If the file is not released, use the fuser command to kill:
[oracle@oracle dbs]$ fuser -k lkORCL
lkORCL: 7621 7627 7631 7633 7637 7639 7641 7643 7645 7647 7649 7651 7663 7680 7682 7684 7692 8272
[oracle@oracle dbs]$ fuser -u lkORCL
Then:
SQL> startup mount;
ORACLE instance started.
Total System Global Area 626327552 bytes
Fixed Size 2215944 bytes
Variable Size 184553464 bytes
Database Buffers 436207616 bytes
Redo Buffers 3350528 bytes
Database mounted.
During archiving, it was found that:
SQL> alter database archivelog;
alter database archivelog
*
ERROR at line 1:
ORA-00265: instance recovery required, cannot set ARCHIVELOG mode
Continue to check the data, found that the database needs to be opened first:
SQL> alter dababase open;
alter dababase open
*
ERROR at line 1:
ORA-00940: invalid ALTER command
Found or reported wrong, continue to check the information, find a solution to the datafile is offline. Solutions.
shutdown immediate
startup mount
recover datafile 2
alter database datafile 2 online
alter datebase open
The results were as follows:
SQL> recover datafile 2;
Media recovery complete.
SQL> alter database datafile 2 online;
Database altered.
SQL> alter database open;
Database altered.
Then restart the database and solve the problem.
Silent installation many times, the first time there is a good installation can not log on to the database problem, toss to two in the middle of the night, or degree parameters are not familiar with it, continue to work hard!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.