Oracle's data file is corrupted, how to open the database

zhaozj2021-02-08  221

Damage to a data file, how to open the database?

System environment:

1, operating system: Windows 2000 Server, machine memory 128M

2, Database: Oracle 8i R2 (8.1.6) for NT Enterprise Edition

3, installation path: c: / oracle

Error phenomenon:

Due to misuse, a data file in the database is accidentally deleted,

The Oracle-related service display of the control panel has been launched, but it is unable to connect with SQL * PLUS.

Show the following error

ORA-01033: Oracle Initialization Or Shutdown in Progress

Simulation:

Create TableSpace Test DataFile

'c: /test.ora' size 5m

AutoExtend on Next 1M MaxSize Unlimited

Default Storage (Initial 128k Next 1M Pctincrease 0)

/

Turn off all services Stop.bat

NET STOP "OracleWebassistant0"

Net Stop "OracleoraHome81 TNSListener"

Net Stop "Oracleservice Mardb"

Shutdown

Remove Test.ora files in the operating system

Restart Service Start.bat

Net Start "OracleWebassistant0"

Net Start "OracleoraHome81 TNSListener"

NET Start "Oracleservice ORADB"

The service in the service is displayed, but it is unable to connect with SQL * Plus.

Display ORA-01033: Oracle Initialization Or Shutdown in Progress

Solution:

Let this data file offline, you can open the database.

C: /> SVRMGRL

SVRMGRL> Connect Internal

SVRMGRL> Shutdown

SVRMGRL> Startup Mount

--ArchiveLog mode command, file name is capitalized

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 data files, offline status

SQL> SELECT FILE #, Name, Status from V $ datafile;

SQL> DROP TABLESPACE TEST;

The table space has been discarded.

转载请注明原文地址:https://www.9cbs.com/read-1206.html

New Post(0)