Search This Blog

Total Pageviews

Saturday 22 April 2023

RMAN Restoring the Spfile



 Rman Restoring the spfile form backup.. 


export NLS_DATE_FORMAT='dd/mm/yyyy hh24:mi:ss'; rman TARGET / RMAN> STARTUP FORCE NOMOUNT; Restore the server parameter file. If restoring to the default location, then run: RMAN> RESTORE SPFILE FROM AUTOBACKUP; If restoring to a nondefault location, RMAN> RESTORE SPFILE TO '/tmp/spfileTEMP.ora' FROM AUTOBACKUP; ===== RMAN> list backup ; BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ ------------------- 2409 Full 15.34M DISK 00:00:01 22/04/2023 02:00:37 BP Key: 2409 Status: AVAILABLE Compressed: NO Tag: TAG20230422T020036 Piece Name: /u01/app/oracle/VIHAAN8/cf_c-3962735431-20230422-01 rman > restore spfile to '/tmp/spvihaan8.ora' from '/u01/app/oracle/VIHAAN8/cf_c-3962735431-20230422-01'; Starting restore at 22/04/2023 10:12:05 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=1348 device type=DISK channel ORA_DISK_1: restoring spfile from AUTOBACKUP /u01/app/oracle/VIHAAN8/cf_c-3962735431-20230422-01 channel ORA_DISK_1: SPFILE restore from AUTOBACKUP complete Finished restore at 22/04/2023 10:12:07 RMAN> ls -ltr /tmp/*.ora -rw-r----- 1 oracle oinstall 4608 Apr 22 10:12 /tmp/spvihaan8.ora CREATE PFILE='/tmp/spvihaan8.txt' FROM SPFILE = '/tmp/spvihaan8.ora'; CREATE PFILE='/tmp/spvihaan8.txt' FROM SPFILE = '/tmp/spvihaan8.ora';primary:sys@IBRAC-ibrac2 sqlplus> File created. sqlplus> !ls -ltr /tmp/*.txt -rw-r--r-- 1 oracle oinstall 1503 Apr 22 10:15 /tmp/spvihaan8.txt

===

restore spfile from autobackup db_recovery_file_dest='XXXXXXXX' db_name='vihaan08';

=========

RMAN> list backup of spfile;

using target database control file instead of recovery catalog

List of Backup Sets
===================


BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
2405    Full    15.34M     DISK        00:00:00     21-04-2023 02:00:37
        BP Key: 2405   Status: AVAILABLE  Compressed: NO  Tag: TAG20230421T020037
        Piece Name: /u01/app/oracle/VIHAAN8/cf_c-3962735431-20230421-01
  SPFILE Included: Modification time: 20-04-2023 14:11:36
  SPFILE db_unique_name: VIHCDBD8

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
2407    Full    15.34M     DISK        00:00:01     22-04-2023 02:00:30
        BP Key: 2407   Status: AVAILABLE  Compressed: NO  Tag: TAG20230422T020029
        Piece Name: /u01/app/oracle/VIHAAN8/cf_c-3962735431-20230422-00
  SPFILE Included: Modification time: 20-04-2023 14:11:36
  SPFILE db_unique_name: VIHCDBD8

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ -------------------
2409    Full    15.34M     DISK        00:00:01     22-04-2023 02:00:37
        BP Key: 2409   Status: AVAILABLE  Compressed: NO  Tag: TAG20230422T020036
        Piece Name: /u01/app/oracle/VIHAAN8/cf_c-3962735431-20230422-01
  SPFILE Included: Modification time: 20-04-2023 14:11:36
  SPFILE db_unique_name: VIHCDBD8


Oracle DBA

anuj blog Archive