Friday, March 21, 2025

Incremental Backup and Restore in New Test Server

 

Incremental Backup

[oracle@db19c ~]$ env |grep ORA

ORACLE_SID=db19c

ORACLE_BASE=/u01/app/oracle

ORACLE_HOME=/u01/app/oracle/product/19.0.0/dbhome_1

ORACLE_TERM=xterm

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 02:23:01 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

RMAN> connect target sys/s;

 

connected to target database: DB19C (DBID=2321312598)

 

RMAN>

RMAN> backup as backupset incremental level 0 database format '/u02/backup/DB19C_LEVEL_0_%d_%T_%U' plus archivelog format '/u02/backup/DB19C_Archivelog_%d_%T_%U';

 

 

Starting backup at 22-MAR-25

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=41 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=17 RECID=10 STAMP=1195748696

input archived log thread=1 sequence=18 RECID=11 STAMP=1195750862

input archived log thread=1 sequence=19 RECID=12 STAMP=1195756094

input archived log thread=1 sequence=20 RECID=13 STAMP=1195834401

input archived log thread=1 sequence=21 RECID=14 STAMP=1195834529

input archived log thread=1 sequence=22 RECID=15 STAMP=1195834661

input archived log thread=1 sequence=23 RECID=16 STAMP=1195836798

input archived log thread=1 sequence=24 RECID=17 STAMP=1195836860

input archived log thread=1 sequence=25 RECID=18 STAMP=1196042469

input archived log thread=1 sequence=26 RECID=19 STAMP=1196042790

input archived log thread=1 sequence=27 RECID=20 STAMP=1196042895

input archived log thread=1 sequence=28 RECID=21 STAMP=1196042946

input archived log thread=1 sequence=29 RECID=22 STAMP=1196042989

input archived log thread=1 sequence=30 RECID=23 STAMP=1196043133

input archived log thread=1 sequence=31 RECID=24 STAMP=1196043183

input archived log thread=1 sequence=32 RECID=25 STAMP=1196043581

input archived log thread=1 sequence=33 RECID=26 STAMP=1196043614

input archived log thread=1 sequence=34 RECID=27 STAMP=1196258418

input archived log thread=1 sequence=35 RECID=28 STAMP=1196333789

input archived log thread=1 sequence=36 RECID=29 STAMP=1196336812

input archived log thread=1 sequence=37 RECID=30 STAMP=1196336894

input archived log thread=1 sequence=38 RECID=31 STAMP=1196337444

input archived log thread=1 sequence=39 RECID=32 STAMP=1196337486

input archived log thread=1 sequence=40 RECID=33 STAMP=1196337527

input archived log thread=1 sequence=41 RECID=34 STAMP=1196388782

input archived log thread=1 sequence=42 RECID=35 STAMP=1196389157

input archived log thread=1 sequence=43 RECID=36 STAMP=1196389270

input archived log thread=1 sequence=44 RECID=37 STAMP=1196389400

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_263kut0p_1_1 tag=TAG20250322T022321 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 0 datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB19C/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB19C/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB19C/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1 tag=TAG20250322T022346 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=45 RECID=38 STAMP=1196389502

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_283kut3v_1_1 tag=TAG20250322T022503 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389504_mxvls1w0_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup current controlfile format '/u02/backup/Controlback_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1 tag=TAG20250322T022645 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389607_mxvlw80r_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup spfile format '/u02/backup/spfile_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1 tag=TAG20250322T022657 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196389618_mxvlwlly_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

RMAN> exit

Recovery Manager complete.

 

 

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 02:29:00 2025

Version 19.3.0.0.0

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

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

SQL>

create user hrs identified by hrs;

grant connect, resource, create session,dba to hrs;

conn hrs/hrs

create table test(serial number(2),name varchar2(5));

insert into test values(1,'one');

insert into test values(2,'Two');

insert into test values(3,'Three');

insert into test values(4,'Four');

commit;

SQL> exit

 

[oracle@db19c ~]$

[oracle@db19c ~]$

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 02:33:24 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

RMAN>

RMAN> connect target sys/s;

connected to target database: DB19C (DBID=2321312598)

RMAN>

RMAN> backup as backupset incremental level 1 database format '/u02/backup/DB19C_LEVEL_1_%d_%T_%U' plus archivelog format '/u02/backup/DB19C_Archivelog_%d_%T_%U';

 

 

Starting backup at 22-MAR-25

current log archived

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=31 device type=DISK

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=19 RECID=12 STAMP=1195756094

input archived log thread=1 sequence=20 RECID=13 STAMP=1195834401

input archived log thread=1 sequence=21 RECID=14 STAMP=1195834529

input archived log thread=1 sequence=22 RECID=15 STAMP=1195834661

input archived log thread=1 sequence=23 RECID=16 STAMP=1195836798

input archived log thread=1 sequence=24 RECID=17 STAMP=1195836860

input archived log thread=1 sequence=25 RECID=18 STAMP=1196042469

input archived log thread=1 sequence=26 RECID=19 STAMP=1196042790

input archived log thread=1 sequence=27 RECID=20 STAMP=1196042895

input archived log thread=1 sequence=28 RECID=21 STAMP=1196042946

input archived log thread=1 sequence=29 RECID=22 STAMP=1196042989

input archived log thread=1 sequence=30 RECID=23 STAMP=1196043133

input archived log thread=1 sequence=31 RECID=24 STAMP=1196043183

input archived log thread=1 sequence=32 RECID=25 STAMP=1196043581

input archived log thread=1 sequence=33 RECID=26 STAMP=1196043614

input archived log thread=1 sequence=34 RECID=27 STAMP=1196258418

input archived log thread=1 sequence=35 RECID=28 STAMP=1196333789

input archived log thread=1 sequence=36 RECID=29 STAMP=1196336812

input archived log thread=1 sequence=37 RECID=30 STAMP=1196336894

input archived log thread=1 sequence=38 RECID=31 STAMP=1196337444

input archived log thread=1 sequence=39 RECID=32 STAMP=1196337486

input archived log thread=1 sequence=40 RECID=33 STAMP=1196337527

input archived log thread=1 sequence=41 RECID=34 STAMP=1196388782

input archived log thread=1 sequence=42 RECID=35 STAMP=1196389157

input archived log thread=1 sequence=43 RECID=36 STAMP=1196389270

input archived log thread=1 sequence=44 RECID=37 STAMP=1196389400

input archived log thread=1 sequence=45 RECID=38 STAMP=1196389502

input archived log thread=1 sequence=46 RECID=39 STAMP=1196390031

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1 tag=TAG20250322T023352 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental level 1 datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

input datafile file number=00001 name=/u01/app/oracle/oradata/DB19C/system01.dbf

input datafile file number=00003 name=/u01/app/oracle/oradata/DB19C/sysaux01.dbf

input datafile file number=00004 name=/u01/app/oracle/oradata/DB19C/undotbs01.dbf

input datafile file number=00007 name=/u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1 tag=TAG20250322T023418 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:15

Finished backup at 22-MAR-25

 

Starting backup at 22-MAR-25

current log archived

using channel ORA_DISK_1

channel ORA_DISK_1: starting archived log backup set

channel ORA_DISK_1: specifying archived log(s) in backup set

input archived log thread=1 sequence=47 RECID=40 STAMP=1196390074

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1 tag=TAG20250322T023434 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390075_mxvmbvmt_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup current controlfile format '/u02/backup/Controlback_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current control file in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1 tag=TAG20250322T023509 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390111_mxvmd038_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN> backup spfile format '/u02/backup/spfile_%d_%T_%U';

 

Starting backup at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting full datafile backup set

channel ORA_DISK_1: specifying datafile(s) in backup set

including current SPFILE in backup set

channel ORA_DISK_1: starting piece 1 at 22-MAR-25

channel ORA_DISK_1: finished piece 1 at 22-MAR-25

piece handle=/u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1 tag=TAG20250322T023523 comment=NONE

channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01

Finished backup at 22-MAR-25

 

Starting Control File and SPFILE Autobackup at 22-MAR-25

piece handle=/u01/app/oracle/fast_recovery_area/DB19C/autobackup/2025_03_22/o1_mf_s_1196390124_mxvmdf4q_.bkp comment=NONE

Finished Control File and SPFILE Autobackup at 22-MAR-25

 

RMAN>exit

[oracle@db19c ~]$ cd /u02/backup/

[oracle@db19c backup]$ ls -lrt

total 2436068

-rw-r----- 1 oracle oinstall  499270144 Mar 22 02:23 DB19C_Archivelog_DB19C_20250322_263kut0p_1_1

-rw-r----- 1 oracle oinstall 1438392320 Mar 22 02:24 DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

-rw-r----- 1 oracle oinstall    3743744 Mar 22 02:25 DB19C_Archivelog_DB19C_20250322_283kut3v_1_1

-rw-r----- 1 oracle oinstall   18808832 Mar 22 02:26 Controlback_DB19C_20250322_2a3kut75_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:26 spfile_DB19C_20250322_2c3kut7h_1_1

-rw-r----- 1 oracle oinstall  503408640 Mar 22 02:34 DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

-rw-r----- 1 oracle oinstall   11821056 Mar 22 02:34 DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

-rw-r----- 1 oracle oinstall      11264 Mar 22 02:34 DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

-rw-r----- 1 oracle oinstall   18841600 Mar 22 02:35 Controlback_DB19C_20250322_2i3kutmt_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:35 spfile_DB19C_20250322_2k3kutnb_1_1

[oracle@db19c backup]$

[oracle@db19c backup]$ scp * oracle@192.168.0.204:/u02/backup/

oracle@192.168.0.204's password:

Controlback_DB19C_20250322_2a3kut75_1_1                                                                                    100%   18MB  23.8MB/s   00:00

Controlback_DB19C_20250322_2i3kutmt_1_1                                                                                    100%   18MB  41.6MB/s   00:00

DB19C_Archivelog_DB19C_20250322_263kut0p_1_1                                                                               100%  476MB  52.9MB/s   00:08

DB19C_Archivelog_DB19C_20250322_283kut3v_1_1                                                                               100% 3656KB   4.0MB/s   00:00

DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1                                                                               100%  480MB  58.3MB/s   00:08

DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1                                                                               100%   11KB  19.2KB/s   00:00

DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1                                                                                  100% 1372MB  17.5MB/s   01:18

DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1                                                                                  100%   11MB  20.8MB/s   00:00

spfile_DB19C_20250322_2c3kut7h_1_1                                                                                         100%  112KB 549.4KB/s   00:00

spfile_DB19C_20250322_2k3kutnb_1_1                                                                                         100%  112KB 869.7KB/s   00:00

[oracle@db19c backup]$

[oracle@db19c backup]$ cd $ORACLE_HOME/dbs

[oracle@db19c dbs]$ ls -lrt

total 18340

-rw-r--r--. 1 oracle oinstall     3079 May 14  2015 init.ora

-rw-r-----  1 oracle oinstall       24 Feb 17 03:00 lkDB19C

-rw-r-----  1 oracle oinstall     2048 Mar 21 11:00 orapwdb19c

-rw-rw----  1 oracle oinstall     1544 Mar 22 02:12 hc_db19c.dat

-rw-r-----  1 oracle oinstall     3584 Mar 22 02:13 spfiledb19c.ora

-rw-r-----  1 oracle oinstall 18759680 Mar 22 02:35 snapcf_db19c.f

[oracle@db19c dbs]$ scp spfiledb19c.ora  oracle@192.168.0.204:/u01/app/oracle/product/19.0.0/dbhome_1/dbs/

oracle@192.168.0.204's password:

spfiledb19c.ora                                                                                                            100% 3584   843.8KB/s   00:00

[oracle@db19c dbs]$

 

Restoration

New Server

[root@db19c ~]# mkdir /u02/backup/

[root@db19c ~]# chmod 775 /u02/backup/

[root@db19c ~]# chown oracle:oinstall /u02/backup/

                                                                                                             

[root@db19c ~]# su - oracle

[oracle@db19c ~]$

[oracle@db19c ~]$ cd /u02/backup/

[oracle@db19c backup]$ ls -lrt

total 2436068

-rw-r----- 1 oracle oinstall   18808832 Mar 22 02:46 Controlback_DB19C_20250322_2a3kut75_1_1

-rw-r----- 1 oracle oinstall   18841600 Mar 22 02:46 Controlback_DB19C_20250322_2i3kutmt_1_1

-rw-r----- 1 oracle oinstall  499270144 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_263kut0p_1_1

-rw-r----- 1 oracle oinstall    3743744 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_283kut3v_1_1

-rw-r----- 1 oracle oinstall  503408640 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

-rw-r----- 1 oracle oinstall      11264 Mar 22 02:46 DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

-rw-r----- 1 oracle oinstall 1438392320 Mar 22 02:47 DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

-rw-r----- 1 oracle oinstall   11821056 Mar 22 02:47 DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:47 spfile_DB19C_20250322_2c3kut7h_1_1

-rw-r----- 1 oracle oinstall     114688 Mar 22 02:47 spfile_DB19C_20250322_2k3kutnb_1_1

[oracle@db19c backup]$

 

[oracle@db19c dbs]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 02:56:33 2025

Version 19.3.0.0.0

 

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

 

Connected to an idle instance.

 

SQL> CREATE PFILE='/u02/initdb19c.ora' FROM SPFILE='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiledb19c.ora';

File created.

[oracle@db19c dbs]$

[oracle@db19c dbs]$ cat /u02/initdb19c.ora

db19c.__data_transfer_cache_size=0

db19c.__db_cache_size=1258291200

db19c.__inmemory_ext_roarea=0

db19c.__inmemory_ext_rwarea=0

db19c.__java_pool_size=0

db19c.__large_pool_size=16777216

db19c.__oracle_base='/u01/app/oracle'#ORACLE_BASE set from environment

db19c.__pga_aggregate_target=603979776

db19c.__sga_target=1778384896

db19c.__shared_io_pool_size=83886080

db19c.__shared_pool_size=402653184

db19c.__streams_pool_size=0

db19c.__unified_pga_pool_size=0

*.audit_file_dest='/u01/app/oracle/admin/db19c/adump'

*.audit_trail='db'

*.compatible='19.0.0'

*.control_files='/u01/app/oracle/oradata/DB19C/control01.ctl','/u01/app/oracle/fast_recovery_area/DB19C/control02.ctl'

*.db_block_size=8192

*.db_name='db19c'

*.db_recovery_file_dest='/u01/app/oracle/fast_recovery_area'

*.db_recovery_file_dest_size=8256m

*.diagnostic_dest='/u01/app/oracle'

*.dispatchers='(PROTOCOL=TCP) (SERVICE=db19cXDB)'

*.nls_language='AMERICAN'

*.nls_territory='AMERICA'

*.open_cursors=300

*.pga_aggregate_target=562m

*.processes=300

*.remote_login_passwordfile='EXCLUSIVE'

*.sga_target=1686m

*.undo_tablespace='UNDOTBS1'

[oracle@db19c dbs]$

[root@db19c ~]# mkdir -p /u01/app/oracle/admin/db19c/adump

[root@db19c ~]# mkdir -p /u01/app/oracle/oradata/DB19C/

[root@db19c ~]# mkdir -p /u01/app/oracle/fast_recovery_area/DB19C/

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/admin/db19c/adump

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/oradata/DB19C

[root@db19c ~]# chown -R oracle:oinstall /u01/app/oracle/fast_recovery_area/DB19C

[root@db19c ~]# chown -R oracle:oinstall /u02/backup/

[root@db19c ~]# chmod 770 /u02/backup/

 

SQL> STARTUP PFILE='/u02/initdb19c.ora';

ORACLE instance started.

 

Total System Global Area 1778381840 bytes

Fixed Size                  8897552 bytes

Variable Size             419430400 bytes

Database Buffers         1342177280 bytes

Redo Buffers                7876608 bytes

ORA-00205: error in identifying control file, check alert log for more info

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 03:05:44 2025

Version 19.3.0.0.0

 

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

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL>

SQL> startup nomount;

ORACLE instance started.

 

Total System Global Area 1778381840 bytes

Fixed Size                  8897552 bytes

Variable Size             419430400 bytes

Database Buffers         1342177280 bytes

Redo Buffers                7876608 bytes

SQL>

 

[oracle@db19c ~]$ rman

 

Recovery Manager: Release 19.0.0.0.0 - Production on Sat Mar 22 03:08:22 2025

Version 19.3.0.0.0

 

Copyright (c) 1982, 2019, Oracle and/or its affiliates.  All rights reserved.

 

RMAN>

 

RMAN> connect target sys/s;

 

connected to target database: DB19C (not mounted)

 

RMAN>

 

RMAN>

 

RMAN>

 

RMAN> restore controlfile from '/u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1';

 

Starting restore at 22-MAR-25

using target database control file instead of recovery catalog

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=21 device type=DISK

 

channel ORA_DISK_1: restoring control file

channel ORA_DISK_1: restore complete, elapsed time: 00:00:03

output file name=/u01/app/oracle/oradata/DB19C/control01.ctl

output file name=/u01/app/oracle/fast_recovery_area/DB19C/control02.ctl

Finished restore at 22-MAR-25

 

RMAN> alter database mount;

 

released channel: ORA_DISK_1

Statement processed

 

RMAN> catalog start with '/u02/backup/';

 

Starting implicit crosscheck backup at 22-MAR-25

allocated channel: ORA_DISK_1

channel ORA_DISK_1: SID=25 device type=DISK

Crosschecked 61 objects

Finished implicit crosscheck backup at 22-MAR-25

 

Starting implicit crosscheck copy at 22-MAR-25

using channel ORA_DISK_1

Finished implicit crosscheck copy at 22-MAR-25

 

searching for all files in the recovery area

cataloging files...

no files cataloged

 

searching for all files that match the pattern /u02/backup/

 

List of Files Unknown to the Database

=====================================

File Name: /u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1

File Name: /u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

File Name: /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1

 

Do you really want to catalog the above files (enter YES or NO)? YES

cataloging files...

cataloging done

 

List of Cataloged Files

=======================

File Name: /u02/backup/Controlback_DB19C_20250322_2a3kut75_1_1

File Name: /u02/backup/Controlback_DB19C_20250322_2i3kutmt_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

File Name: /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

File Name: /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2c3kut7h_1_1

File Name: /u02/backup/spfile_DB19C_20250322_2k3kutnb_1_1

 

RMAN> restore database;

 

Starting restore at 22-MAR-25

using channel ORA_DISK_1

 

channel ORA_DISK_1: starting datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/DB19C/system01.dbf

channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/DB19C/sysaux01.dbf

channel ORA_DISK_1: restoring datafile 00004 to /u01/app/oracle/oradata/DB19C/undotbs01.dbf

channel ORA_DISK_1: restoring datafile 00007 to /u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_LEVEL_0_DB19C_20250322_273kut1i_1_1 tag=TAG20250322T022346

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:01:15

Finished restore at 22-MAR-25

 

RMAN> RECOVER DATABASE;

 

Starting recover at 22-MAR-25

using channel ORA_DISK_1

channel ORA_DISK_1: starting incremental datafile backup set restore

channel ORA_DISK_1: specifying datafile(s) to restore from backup set

destination for restore of datafile 00001: /u01/app/oracle/oradata/DB19C/system01.dbf

destination for restore of datafile 00003: /u01/app/oracle/oradata/DB19C/sysaux01.dbf

destination for restore of datafile 00004: /u01/app/oracle/oradata/DB19C/undotbs01.dbf

destination for restore of datafile 00007: /u01/app/oracle/oradata/DB19C/users01.dbf

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_LEVEL_1_DB19C_20250322_2f3kutla_1_1 tag=TAG20250322T023418

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

 

starting media recovery

 

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=46

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2e3kutkh_1_1 tag=TAG20250322T023352

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:07

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_46_mxvortxh_.arc thread=1 sequence=46

channel default: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_46_mxvortxh_.arc RECID=39 STAMP=1196392571

channel ORA_DISK_1: starting archived log restore to default destination

channel ORA_DISK_1: restoring archived log

archived log thread=1 sequence=47

channel ORA_DISK_1: reading from backup piece /u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1

channel ORA_DISK_1: piece handle=/u02/backup/DB19C_Archivelog_DB19C_20250322_2g3kutlq_1_1 tag=TAG20250322T023434

channel ORA_DISK_1: restored backup piece 1

channel ORA_DISK_1: restore complete, elapsed time: 00:00:01

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_47_mxvoryl8_.arc thread=1 sequence=47

channel default: deleting archived log(s)

archived log file name=/u01/app/oracle/fast_recovery_area/DB19C/archivelog/2025_03_22/o1_mf_1_47_mxvoryl8_.arc RECID=40 STAMP=1196392574

unable to find archived log

archived log thread=1 sequence=48

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of recover command at 03/22/2025 03:16:16

RMAN-06054: media recovery requesting unknown archived log for thread 1 with sequence 48 and starting SCN of 3865509

 

RMAN>

 

 

[oracle@db19c ~]$ sqlplus / as sysdba

 

SQL*Plus: Release 19.0.0.0.0 - Production on Sat Mar 22 03:18:47 2025

Version 19.3.0.0.0

 

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

 

 

Connected to:

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

SQL>

SQL>

SQL> select open_mode from v$database;

 

OPEN_MODE

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

MOUNTED

 

SQL> alter database open resetlogs;

 

Database altered.

 

SQL> select open_mode from v$database;

 

OPEN_MODE

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

READ WRITE

 

SQL> SELECT SUM (bytes) / 1024 / 1024 / 1024 AS GB FROM dba_data_files;

 

        GB

----------

1.96777344

 

 

SQL> SELECT SUM (bytes) / 1024 / 1024 / 1024 AS GB FROM dba_data_files;

 

        GB

----------

1.96777344

 

SQL> conn hrs/hrs

Connected.

SQL>

SQL>

SQL>

SQL> select * from test;

 

    SERIAL NAME

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

         1 one

         2 Two

         3 Three

         4 Four

 

SQL>

 

SQL>

 

SQL>

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

To create a PFILE from an SPFILE on a new server, you need to follow these steps:

 

CREATE PFILE='/u02/initdb19c.ora' FROM SPFILE='/u01/app/oracle/product/19.0.0/dbhome_1/dbs/spfiledb19c.ora';

 

STARTUP PFILE='/u02/initdb19c.ora';

 

No comments:

Post a Comment

 https://www.linkedin.com/pulse/building-real-time-database-monitoring-dashboard-oracle-khaleeq-tpwxf/