Original library to determine data files, log files, tempfile file information
Select Group#,status,type, member from V$logfile;
Col name format A65
Select file#,name,bytes/1024/1024 MB from V$datafile;
Select name from V$controlfile;
1. Create an instance
Oradim (there are a variety of options available at the command line to choose from)
Oradim-new-sid MAXLD
You need to be aware of setting environment variables when the database is already running
C:\set Oracle_sid=demo
C:\sqlplus/as SYSDBA
2. Create or modify initialization parameter files
With other databases on hand
Sql>create Pfile from SPFile
This file is in the database under Dbhome_1
Modify the Pfile file according to the actual situation
Replace SID, etc.
For example
orcl.__db_cache_size=205520896 replaced by demo.__db_cache_size=205520896
3. Create the appropriate directory structure
*.audit_file_dest= ' C:\app\Administrator\admin\demo\adump '
*.control_files= ' C:\app\Administrator\oradata\demo\control01.ctl ',
' C:\app\Administrator\flash_recovery_area\demo\control02.ctl '
4. Startup instance
Sql>startup Nomount
5. Copy modification pfile, prepare control file.
Cp/oracle10/oradata/ora10/control01.ctl.
sql> startup Mount Pfile= '/tmp/pfile10.ora ';
ORACLE instance started.
6. Restore the database.
Run {
ALLOCATE CHANNEL ch0 TYPE disk;
Set newname for datafile 1 to ' C:\app\Administrator\oradata\system01.dbf ';
Set newname for datafile 2 to ' C:\app\Administrator\oradata\sysaux01.dbf ';
Set newname for DataFile 3 to ' C:\app\Administrator\oradata\undotbs01.dbf ';
Set newname for datafile 4 to ' C:\app\Administrator\oradata\users01.dbf ';
Set newname for datafile 5 to ' C:\app\Administrator\oradata\MAXIMO_DATA.dbf ';
Set newname for datafile 6 to ' C:\app\Administrator\oradata\MAXIMO_index.dbf ';
Set newname for datafile 7 to ' C:\app\Administrator\oradata\MAXIMO_DATA02.dbf ';
Set newname for datafile 8 to ' C:\app\Administrator\oradata\MAXIMO_index02.dbf ';
Set newname for Tempfile 1 to ' C:\app\Administrator\oradata\temp01.dbf ';
Set newname for Tempfile 2 to ' C:\app\Administrator\oradata\MAXIMO_temp.dbf ';
Restore database;
Switch datafile all;
Switch Tempfile all;
Release channel Ch0;
}
Recover database;
Handling Redolog
Handling Tempfile
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/