0% found this document useful (0 votes)
66 views8 pages

Source:: Archive Log List

The document describes copying database files from one Oracle database to another using RMAN. It shows the source database configuration, initiating a backup, copying the files to the destination, and recovering the database using the archived redo logs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views8 pages

Source:: Archive Log List

The document describes copying database files from one Oracle database to another using RMAN. It shows the source database configuration, initiating a backup, copying the files to the destination, and recovering the database using the archived redo logs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Source:

SQL> archive log list;

Database log mode Archive Mode

Automatic archival Enabled

Archive destination USE_DB_RECOVERY_FILE_DEST

Oldest online log sequence 18

Next log sequence to archive 20

Current log sequence 20

SQL> select status from v$instance;

STATUS

-----------

OPEN

SQL> alter database begin backup;

Database altered.

[orcl@primary test]$ pwd

/u01/app/oracle/oradata/test

[orcl@primary test]$ ll

total 1980620

-rwxrwxr-x. 1 orcl dba 9748480 May 31 10:42 control01.ctl

-rwxrwxr-x. 1 orcl dba 362422272 May 31 10:41 example01.dbf

-rwxrwxr-x. 1 orcl dba 52429312 May 30 19:13 redo01.log

-rwxrwxr-x. 1 orcl dba 52429312 May 31 10:41 redo02.log

-rwxrwxr-x. 1 orcl dba 52429312 May 30 19:13 redo03.log


-rwxrwxr-x. 1 orcl dba 629153792 May 31 10:41 sysaux01.dbf

-rwxrwxr-x. 1 orcl dba 786440192 May 31 10:41 system01.dbf

-rwxrwxr-x. 1 orcl dba 20979712 May 31 10:24 temp01.dbf

-rwxrwxr-x. 1 orcl dba 73408512 May 31 10:41 undotbs01.dbf

-rwxrwxr-x. 1 orcl dba 5251072 May 31 10:41 users01.dbf

[orcl@primary test]$ su

Password: root123

[root@primary test]# cp *.dbf /u02/app/oracle/oradata/exam

[root@primary test]# su orcl

[orcl@primary test]$ !sq

sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Wed May 31 10:48:26 2017

Copyright (c) 1982, 2011, Oracle. All rights reserved.

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> select status from v$instance;

STATUS

------------

OPEN

SQL> alter database end backup;

Database altered.
SQL> alter system archive log current;

System altered.

SQL> alter database backup controlfile to trace as '/tmp/control.sql';

Database altered.

Destination:

[root@primary ~]# cd /u02/app/oracle/oradata/exam

[root@primary exam]# su dbauser

[dbauser@primary exam]$ ll

total 1817712

-rwxr-xr-x. 1 root root 362422272 May 31 10:45 example01.dbf

-rwxr-xr-x. 1 root root 629153792 May 31 10:45 sysaux01.dbf

-rwxr-xr-x. 1 root root 786440192 May 31 10:46 system01.dbf

-rwxr-xr-x. 1 root root 20979712 May 31 10:46 temp01.dbf

-rwxr-xr-x. 1 root root 73408512 May 31 10:46 undotbs01.dbf

-rwxr-xr-x. 1 root root 5251072 May 31 10:46 users01.dbf

[dbauser@primary exam]$ su

Password:

[root@primary exam]# chown -R dbauser:dba *

[root@primary exam]# chmod -R 775 *

[root@primary exam]# ll

total 1817716
-rwxrwxr-x. 1 dbauser dba 362422272 May 31 10:45 example01.dbf

-rwxrwxr-x. 1 dbauser dba 629153792 May 31 10:45 sysaux01.dbf

-rwxrwxr-x. 1 dbauser dba 786440192 May 31 10:46 system01.dbf

-rwxrwxr-x. 1 dbauser dba 20979712 May 31 10:46 temp01.dbf

-rwxrwxr-x. 1 dbauser dba 73408512 May 31 10:46 undotbs01.dbf

-rwxrwxr-x. 1 dbauser dba 5251072 May 31 10:46 users01.dbf

[root@primary exam]# cd /tmp

[root@primary tmp]# ll

total 12

-rw-r--r--. 1 orcl dba 5951 May 31 10:49 control.sql

drwx------. 2 root root 4096 May 31 10:42 pulse-DGVwBLiLcrWp

[root@primary tmp]# chown -R dbauser:dba *

[root@primary tmp]# chmod -R 775 *

[root@primary tmp]# su dbauser

[dbauser@primary tmp]$ ll

total 12

-rwxrwxr-x. 1 dbauser dba 5951 May 31 10:49 control.sql

drwxrwxr-x. 2 dbauser dba 4096 May 31 10:42 pulse-DGVwBLiLcrWp

[dbauser@primary tmp]$ vi control.sql

[dbauser@primary tmp]$ !sq

sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.3.0 Production on Wed May 31 10:53:54 2017

Copyright (c) 1982, 2011, Oracle. All rights reserved.


Connected to an idle instance.

SQL> @/tmp/control.sql

ORACLE instance started.

Total System Global Area 835104768 bytes

Fixed Size 2232960 bytes

Variable Size 654314880 bytes

Database Buffers 176160768 bytes

Redo Buffers 2396160 bytes

Control file created.

SQL> recover database using backup control file until cancel;

ORA-00279: change 1464936 generated at 05/31/2017 10:41:27 needed for thread 1

ORA-00289: suggestion :

/u02/app/oracle/fast_recovery_area/EXAM/archivelog/2017_05_31/o1_mf_1_20_%u_.
arc

ORA-00280: change 1464936 for thread 1 is in sequence #20

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

/u01/app/oracle/fast_recovery_area/TEST/archivelog/2017_05_31/o1_mf_1_20_dlwo2
fvj_.arc

ORA-00279: change 1465741 generated at 05/31/2017 10:57:41 needed for thread 1

ORA-00289: suggestion :

/u02/app/oracle/fast_recovery_area/EXAM/archivelog/2017_05_31/o1_mf_1_21_%u_.
arc

ORA-00280: change 1465741 for thread 1 is in sequence #21

ORA-00278: log file


Source:
[orcl@primary fast_recovery_area]$ ll

total 8

drwxr-x---. 2 orcl dba 4096 May 19 16:55 test

drwxr-x---. 4 orcl dba 4096 May 24 15:14 TEST

[orcl@primary fast_recovery_area]$ cd TEST/

[orcl@primary TEST]$ ll

total 8

drwxr-x---. 9 orcl dba 4096 May 31 10:49 archivelog

drwxr-x---. 2 orcl dba 4096 May 19 16:55 onlinelog

[orcl@primary TEST]$ cd archivelog/

[orcl@primary archivelog]$ ll

total 28

drwxr-x---. 2 orcl dba 4096 May 24 15:14 2017_05_24

drwxr-x---. 2 orcl dba 4096 May 25 10:57 2017_05_25

drwxr-x---. 2 orcl dba 4096 May 26 11:41 2017_05_26

drwxr-x---. 2 orcl dba 4096 May 27 22:14 2017_05_27

drwxr-x---. 2 orcl dba 4096 May 29 22:12 2017_05_29

drwxr-x---. 2 orcl dba 4096 May 30 10:27 2017_05_30

drwxr-x---. 2 orcl dba 4096 May 31 10:57 2017_05_31

[orcl@primary archivelog]$ cd 2017_05_31

[orcl@primary 2017_05_31]$ ll
total 18812

-rw-r-----. 1 orcl dba 19262464 May 31 10:57 o1_mf_1_20_dlwo2fvj_.arc

[orcl@primary 2017_05_31]$ pwd

/u01/app/oracle/fast_recovery_area/TEST/archivelog/2017_05_31

[orcl@primary 2017_05_31]$ su

Password:

[root@primary 2017_05_31]# chmod -R 777 o1_mf_1_20_dlwo2fvj_.arc

Destination:
SQL> recover database using backup control file until cancel;

ORA-00279: change 1464936 generated at 05/31/2017 10:41:27 needed for thread 1

ORA-00289: suggestion :

/u02/app/oracle/fast_recovery_area/EXAM/archivelog/2017_05_31/o1_mf_1_20_%u_.
arc

ORA-00280: change 1464936 for thread 1 is in sequence #20

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

/u01/app/oracle/fast_recovery_area/TEST/archivelog/2017_05_31/o1_mf_1_20_dlwo2
fvj_.arc

ORA-00279: change 1465741 generated at 05/31/2017 10:57:41 needed for thread 1

ORA-00289: suggestion :

/u02/app/oracle/fast_recovery_area/EXAM/archivelog/2017_05_31/o1_mf_1_21_%u_.
arc

ORA-00280: change 1465741 for thread 1 is in sequence #21

ORA-00278: log file


Copy this path from source and then paste it
'/u01/app/oracle/fast_recovery_area/TEST/archivelog/2017_05_31/o1_mf_1_20_dlwo
2f

vj_.arc' no longer needed for this recovery

Specify log: {<RET>=suggested | filename | AUTO | CANCEL}

Type cancel

Media recovery cancelled.

SQL> alter database open resetlogs;

Database altered.

SQL> select status from v$instance;

STATUS

------------

OPEN

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy