A corrupted data file, how to open the database -- ORA-01033: ORACLE initialization or shutdown in progress Error
System Environment:
1. Operating System: Windows 2000 Server, 128 MB of machine memory
2. Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition
3. installation path: C: \ ORACLE
Error:
Due to misoperations, a data file in the database is deleted by mistake. The Oracle-related services on the control panel are displayed as starting, but cannot be connected using SQL * Plus. the following error is displayed:
ORA-01033: ORACLE initialization or shutdown in progress
Simulated phenomenon:
Create tablespace test datafile
'C: \ test. ora 'size 5 M
Autoextend on next 1 M MAXSIZE UNLIMITED
Default storage (initial 128 K next 1 M pctincrease 0)
/
Disable stop. bat for all services
Net stop "OracleWebAssistant0"
Net stop "OracleOraHome81TNSListener"
Net stop "OracleServiceORADB"
Shutdown
Delete the test. ora file in the operating system
Restart service start. bat
Net start "OracleWebAssistant0"
Net start "OracleOraHome81TNSListener"
Net start "OracleServiceORADB"
In the service, OracleServiceORADB indicates that it has been started, but cannot be connected with SQL * Plus,
Show ORA-01033: ORACLE initialization or shutdown in progress
Solution:
Let the data file go offline to open the database.
C: \> svrmgrl
Svrmgrl> connect internal
Svrmgrl> shutdown
Svrmgrl> startup mount
-- Command in ARCHIVELOG mode. The file name must be in uppercase.
Svrmgrl> alter database datafile 'C: \ TEST. ORA 'offline;
-- Noarchivelog mode Command
Svrmgrl> alter database datafile 'C: \ TEST. ORA 'offline drop;
Svrmgrl> alter database open;
-- Query the data file association and offline status
SQL> select file #, name, status from v $ datafile;
SQL> drop tablespace test;
The tablespace is discarded.
Loss of online log files
Processing in two cases
1. Lost non-active log files;
2. The log file that is currently activated is lost.
In the first case, if the faulty Log File Group has multiple members, You Can shutdown the database first, then, use the operating system command to overwrite the damaged member files in the damaged log file group (all the log files in the same log member group are mirrored ), if its physical location is unavailable, you can copy it to the new drive, use alter database rename file 'xxxx' to change the file location, and then start the database, if a cold backup is normal. If there is only one log member in the corrupted log group, mount the database and convert it to noarchivelog mode, execute alter database add logfile member 'xxx' to group 'x' to add a member to the relevant group, and then execute alter database drop logfile member 'bad _ file' to delete the damaged log file, because the database structure changes, you need to back up the control file, and then change the database back to archivelog mode for a cold backup.
If the log file is currently activated, the database does not have an image, and all the members in the current log group become unavailable. First, restore all data files from the last full backup and start the database to the mount state. If the physical location of the original log file is unavailable, use alter database rename file 'xxx' to change the file storage location. Then, run the recover database until cancel command to restore the database. After the last archived log is used up, enter cancel. Then use alter database open resetlogs to open the database. If no problem exists, perform a cold backup immediately. Note! All information contained in the damaged redo log will be lost, that is, the data submitted before the database crash may be lost. This will cause heavy losses to some demanding applications. Therefore, each log group should have multiple log members and be placed on different drives to prevent media faults.