重建控制文件

[oracle@localhost orcl]$ cat control.sql 
STARTUP NOMOUNT 
CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  NOARCHIVELOG  
    MAXLOGFILES 16 
    MAXLOGMEMBERS 3 
    MAXDATAFILES 100 
    MAXINSTANCES 8 
    MAXLOGHISTORY 292 
LOGFILE 
  GROUP 1 '/u01/product/oradata/orcl/redo01.log'  SIZE 50M, 
  GROUP 2 '/u01/product/oradata/orcl/redo02.log'  SIZE 50M, 
  GROUP 3 '/u01/product/oradata/orcl/redo03.log'  SIZE 50M 
-- STANDBY LOGFILE 
DATAFILE 
  '/u01/product/oradata/orcl/system01.dbf', 
  '/u01/product/oradata/orcl/undotbs01.dbf', 
  '/u01/product/oradata/orcl/sysaux01.dbf', 
  '/u01/product/oradata/orcl/users01.dbf', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_USER_DATA', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_FUND_DATA ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_SECU_DATA  ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_SECUSZ_DATA ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_OPFUND_DATA  ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLECAPAA_DATA01.dbf', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_FUTURES_DATA  ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_HIS_DATA  ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_TRUST_DATA  ', 
  '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_BOND_DATA  ', 
  '/tablespace/HS_CRDT_DATA.dbf' 
CHARACTER SET ZHS16GBK 
; 

4.SQL> set echo on

[email protected] 
SQL> STARTUP NOMOUNT 
ORA-32004: obsolete and/or deprecated parameter(s) specified 
ORACLE instance started. 
Total System Global Area  536870912 bytes 
Fixed Size      1220432 bytes 
Variable Size    205521072 bytes 
Database Buffers   327155712 bytes 
Redo Buffers      2973696 bytes 
SQL> CREATE CONTROLFILE REUSE DATABASE "ORCL" NORESETLOGS  ARCHIVELOG 
  2    MAXLOGFILES 16 
  3    MAXLOGMEMBERS 3 
  4    MAXDATAFILES 100 
  5    MAXINSTANCES 8 
  6    MAXLOGHISTORY 292 
  7  LOGFILE 
  8    GROUP 1 '/u01/product/oradata/orcl/redo01.log'  SIZE 50M, 
  9    GROUP 2 '/u01/product/oradata/orcl/redo02.log'  SIZE 50M, 
10    GROUP 3 '/u01/product/oradata/orcl/redo03.log'  SIZE 50M 
11  -- STANDBY LOGFILE 
12  DATAFILE 
13    '/u01/product/oradata/orcl/system01.dbf', 
14    '/u01/product/oradata/orcl/undotbs01.dbf', 
15    '/u01/product/oradata/orcl/sysaux01.dbf', 
16    '/u01/product/oradata/orcl/users01.dbf', 
17    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_USER_DATA', 
18    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_FUND_DATA ', 
19    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_SECU_DATA ', 
20    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_SECUSZ_DATA ', 
21    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_OPFUND_DATA  ', 
22    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLECAPAA_DATA01.dbf', 
23    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_FUTURES_DATA ', 
24    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_HIS_DATA  ', 
25    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_TRUST_DATA  ', 
26    '/u01/product/oracle/dbs/D:ORACLEORADATAMYORACLEHS_BOND_DATA ', 
27    '/tablespace/HS_CRDT_DATA.dbf' 
28  CHARACTER SET ZHS16GBK 
29  ; 
Control file created. 
SQL> recover database 
ORA-00283: recovery session canceled due to errors 
ORA-00264: no recovery required 
SQL> alter system archive log all ; 
System altered. 
SQL> alter database open ; 
Database altered. 
6.DROP TABLESPACE TEMP INCLUDING CONTENTS AND DATAFILES; 
7.CREATE TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/product/oradata/orcl/ temp01.dbf' SIZE 20M AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED 
TABLESPACE GROUP '' 
EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M; 

你可能感兴趣的:(重建控制文件)