alter database create datafile '' as ''
之前有控制檔案的備份,資料檔案全部丟失,online redo file和archived redo是連續的,恢復如下。 我們要用noresetlogs因為日誌檔案全都是完好的。 SQL> CREATE CONTROLFILE REUSE DATABASE "ICMNLSDB"NORESETLOGS ARCHIVELOG 2 -- SET STANDBY TO MAXIMIZE PERFORMANCE 3 MAXLOGFILES 5 4 MAXLOGMEMBERS 3 5 MAXDATAFILES 100 6 MAXINSTANCES 1 7 MAXLOGHISTORY 226 8 LOGFILE 9 GROUP 1 'D:ORACLEORADATAICMNLSDBREDO01.LOG' SIZE 100M, 10 GROUP 2 'D:ORACLEORADATAICMNLSDBREDO02.LOG' SIZE 100M, 11 GROUP 3 'D:ORACLEORADATAICMNLSDBREDO03.LOG' SIZE 100M 12 -- STANDBY LOGFILE 13 DATAFILE 14 'D:ORACLEORADATAICMNLSDBSYSTEM01.DBF', 15 'D:ORACLEORADATAICMNLSDBUNDOTBS01.DBF', 16 'D:ORACLEORADATAICMNLSDBINDX01.DBF', 17 'D:ORACLEORADATAICMNLSDBTOOLS01.DBF', 18 'D:ORACLEORADATAICMNLSDBUSERS01.DBF' 19 CHARACTER SET ZHS16GBK 20 ; 控制檔案已建立 SQL> select status from v$instance; STATUS ------------ MOUNTED SQL> alter session set events 'immediate trace name controlf level 10'; 會話已更改。 SQL> recover database; ORA-00279: ?? 92128 (? 12/25/2007 14:26:11 ??) ???? 1 ???? ORA-00289: ??: D:ORACLEARCHIVED_DESTARC00005.001 ORA-00280: ?? 92128 ???? 1 ???? # 5 ??? 指定日誌: { =suggested | filename | AUTO | CANCEL} auto ORA-00283: ?????????? ORA-01244: ???????????????????? ORA-01110: ???? 6: 'D:ORACLEORADATAICMNLSDBALAN01.DBF' ORA-01112: ??????? SQL> recover database; ORA-00283: ?????????? ORA-01111: ???? 6 ???? - ????????? ORA-01110: ???? 6: 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' ORA-01157: ????/?????? 6 - ??? DBWR ???? ORA-01111: ???? 6 ???? - ????????? ORA-01110: ???? 6: 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- D:ORACLEORADATAICMNLSDBSYSTEM01.DBF D:ORACLEORADATAICMNLSDBUNDOTBS01.DBF D:ORACLEORADATAICMNLSDBINDX01.DBF D:ORACLEORADATAICMNLSDBTOOLS01.DBF D:ORACLEORADATAICMNLSDBUSERS01.DBF D:ORACLEPRODUCTORA92DATABASEUNNAMED00006 已選擇6行。 SQL> alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as 2 ' D:ORACLEORADATAICMNLSDBalan01.dbf' reuse; alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as * ERROR 位於第 1 行: ORA-01119: ??????? ' D:ORACLEORADATAICMNLSDBalan01.dbf' ??? ORA-27040: skgfrcre: ??????????? OSD-04002: ???????????? O/S-Error: (OS 123) ???????????????????????????????? SQL> alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as 2 ' D:ORACLEORADATAICMNLSDBalan01.dbf'; alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as * ERROR 位於第 1 行: ORA-01119: ??????? ' D:ORACLEORADATAICMNLSDBalan01.dbf' ??? ORA-27040: skgfrcre: ??????????? OSD-04002: ???????????? O/S-Error: (OS 123) ???????????????????????????????? SQL> alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as 2 ' D:ORACLEORADATAICMNLSDBalan01.dbf' reuse; alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' as * ERROR 位於第 1 行: ORA-01119: ??????? ' D:ORACLEORADATAICMNLSDBalan01.dbf' ??? ORA-27040: skgfrcre: ??????????? OSD-04002: ???????????? O/S-Error: (OS 123) ???????????????????????????????? SQL> select name from v$datafile; NAME -------------------------------------------------------------------------------- D:ORACLEORADATAICMNLSDBSYSTEM01.DBF D:ORACLEORADATAICMNLSDBUNDOTBS01.DBF D:ORACLEORADATAICMNLSDBINDX01.DBF D:ORACLEORADATAICMNLSDBTOOLS01.DBF D:ORACLEORADATAICMNLSDBUSERS01.DBF D:ORACLEPRODUCTORA92DATABASEUNNAMED00006 已選擇6行。 SQL>alter database create datafile 'D:ORACLEPRODUCTORA92DATABASEUNNAMED00006' 2 as 'D:ORACLEORADATAICMNLSDBALAN01.DBF'; 資料庫已更改。 SQL> recover database; 完成介質恢復。 SQL> quit 從Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.8.0 - Production中斷開 C:Documents and SettingsAdministrator>sqlplus /nolog SQL*Plus: Release 9.2.0.8.0 - Production on 星期二 12月 25 15:05:57 2007 Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved. SQL> conn / as sysdba; 已連線。 SQL> alter session set events 'immediate trace name controlf level 10'; 會話已更改。 SQL> alter database open; 資料庫已更改。[@more@]
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9907339/viewspace-1037876/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- alter database create datafileDatabase
- alter database ... create datafile的原理及用途Database
- 恢復一則 alter database create datafile '' as ''Database
- ALTER DATABASE DATAFILE OFFLINEDatabase
- alter database datafile offline and alter database tablespace ...offlineDatabase
- alter database datafile offline drop 與 alter tablespace drop datafile 區別Database
- alter database datafile 4 offline drop;Database
- Alter database datafile resize ORA-03297 原因解析Database
- UNRECOVERABLE DATAFILE clause in the ALTER DATABASE CLEAR LOGFILE statementDatabase
- alter database datafile .... offline drop的問題Database
- alter database drop datafile 與 drop tablespace file 的區別Database
- alter database datafile offline drop相關問題Database
- alter system dump datafile headerHeader
- alter database in OracleDatabaseOracle
- Create DatabaseDatabase
- 重新認識CREATE DATAFILE命令
- Renaming a Datafile in the Primary DatabaseDatabase
- alter database和alter system和alter session的區別DatabaseSession
- PG create databaseDatabase
- Create database manuallyDatabase
- alter database open resetlogs;Database
- [20111227]Alter database datafile offline drop後的恢復.txtDatabase
- alter database offline 與 alter database offline drop效果比對Database
- CREATE DATABASE LINKDatabase
- create table of mysql databaseMySqlDatabase
- The method of create a replicate of the database .Database
- Create RAC Standby Database for RAC Primary DatabaseDatabase
- alter database disable thread 2Databasethread
- ALTER DATABASE RESETLOGS 的作用Database
- DATA GUARD 中alter database 命令Database
- ALTER DATABASE 與 ALTER TABLESPACE OFFLINE的區別Database
- 【OH】Creating a Database with the CREATE DATABASE StatementDatabase
- create a database stepsDatabase
- 忍不住問下alter system 和alter database的區別Database
- rman restore database(spfile,controlfile, datafile)RESTDatabase
- Oracle DBA命令參考——alter databaseOracleDatabase
- Tasks of a Database Administrator : Create and Open the Database (10)Database
- 12CR2 using create database command for create non-CDB rac databaseDatabase