Beruflich Dokumente
Kultur Dokumente
Enter password:
Connected to an idle instance.
File created.
Note- make required changes here in the init.ora file to
take care of new directories for control files, audit
dump, fast recovery area etc
SQL> create spfile from pfile;
File created.
database mounted
released channel: ORA_DISK_1
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition
Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and
Real Application Testing options
SQL> @rename_files.sql
SET NEWNAME FOR DATAFILE 1 TO
'/home/oracle/sqlfun/system01.dbf';
SET NEWNAME FOR DATAFILE 2 TO
'/home/oracle/sqlfun/sysaux01.dbf';
SET NEWNAME FOR DATAFILE 3 TO
'/home/oracle/sqlfun/undotbs01.dbf';
SET NEWNAME FOR DATAFILE 4 TO
'/home/oracle/sqlfun/users01.dbf';
SET NEWNAME FOR DATAFILE 5 TO
'/home/oracle/sqlfun/threatened_fauna_data.d
bf';
SET NEWNAME FOR DATAFILE 6 TO
'/home/oracle/sqlfun/example_temp01.dbf';
SET NEWNAME FOR DATAFILE 7 TO
'/home/oracle/sqlfun/EXAMPLE_5';
SET NEWNAME FOR DATAFILE 8 TO
'/home/oracle/sqlfun/INDEX_DATA_6';
RMAN>
the error can be ignored as RMAN has applied all the
available archive log files and is now trying to apply a non-
existent archive log file.
Open the database with RESETLOGS
The RESETLOGS command will fail because we do not
have the same directory path which existed on the source
for the Online Redo Log files.
So we create a script which will generate the new online
redo log file names.
These are the contents of the rename_logfiles.sql file
set head off pages 0 feed off echo off verify off
set lines 200
spool rename_logfiles.lst
select ‘alter database rename file ”’|| member ||”’ ‘||chr(10)|| ‘
TO ”’ || ‘/home/oracle/sqlfun/’ ||
substr(member,instr(member,’/',-1)+1) || ”’;’ from v$logfile;
spool off
exit;
$ sqlplus sys as sysdba
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition
Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and
Real Application Testing options
SQL> @rename_logfiles.sql
alter database rename file
'/u01/app/oracle/oradata/sqlfun/redo03.log'
TO '/home/oracle/sqlfun/redo03.log';
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition
Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and
Real Application Testing options
SQL> @rename_logfiles.lst
Database altered.
Database altered.
Database altered.
Database altered.