Skip to main content

Posts

Starting RMAN and connecting to Database

  <<Back to Oracle Backup & Recovery Main Page Starting RMAN and connecting to Database Starting RMAN and connecting to Database To start RMAN you need to set the environment and type rman and press enter. You can connect to database either using connect command or using command line option. using command line option localhost:$ export ORACLE_HOME=/ora_app/product/18c/dbd2 localhost:$ export PATH=$ORACLE_HOME/bin:$PATH localhost:$ export ORACLE_SID=ORCL1P localhost:$ rman target / Recovery Manager: Release 18.0.0.0.0 - Production on Sun Apr 4 08:11:01 2021 Version 18.11.0.0.0 Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved. connected to target database: ORCL1P (DBID=4215484517) RMAN> using connect option localhost:$ rman RMAN> connect target sys@ORCL1P  target database Password:******** connected to target database: ORCL1P (DBID=4215484517) NOTE: To use connect command you need to ensure that  you have proper TNS sentry...

Getting Started with RMAN

  <<Back to Oracle Backup & Recovery Main Page Introduction to RMAN RMAN (Recovery Manager) is a backup and restore utility provided by oracle.  To start rman you need to set the environment and type rman and press enter as shown below export ORACLE_HOME=<ORACLE_INSTALLATION_DIR_LOC> export PATH=$ORACLE_HOME/bin:$PATH RMAN related terminologies  Lets understand some components in reference with RMAN utility • A target database A target database is a database on which RMAN is performing backup and recovery operations. RMAN always maintains metadata about its operations on a database in the control file of the database known as RMAN repository. • The RMAN client Its the executable that interprets commands, directs server sessions to execute those commands, and records its activity in the target database control file. The RMAN executable is automatically installed with the database and is located in $ORACLE_HOME/bin directory • A fast recovery area (FRA) A di...

ORA-19568: a device is already allocated to this session

  <<Back to Oracle Backup & Recovery Main Page Cause: Previous channel not released Solution: Just restart from rman session and try again  RMAN> exit rman target / and try again ................... RMAN> run { allocate channel ch1 device type disk; BACKUP INCREMENTAL FROM SCN 3459834 DATABASE FORMAT '/ora_work/rman/ORCL1P/ForStandby_%U' tag 'FORSTANDBY'; } allocated channel: ch1 channel ch1: SID=50 device type=DISK Starting backup at 04-MAR-21 using channel ORA_SBT_TAPE_1 released channel: ORA_SBT_TAPE_1 released channel: ORA_SBT_TAPE_2 released channel: ch1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of backup command at 03/04/2021 09:12:53 ORA-19568: a device is already allocated to this session

How to Restore and Recover a Database on a New Host with a Different Directory Structure

<<Back to Oracle Backup & Recovery Main Page How to Restore and Recover a Database on a New Host with a Different Directory Structure from Tape backup Step1> Install oracle software (same version as old host) on new host To perform binary installation you can refer below post Oracle 12c Software Only Installation in Silent Mode Step2> Apply required patches Step3> set environmental variables export ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/dbhome1 export PATH=$PATH:$ORACLE_HOME/bin export ORACLE_SID=ORCL1P Step4> Create initfile create init file under $ORACLE_HOME/dbs with db_name parameter in it. cat $ORACLE_HOME/dbs/initORCL1P.ora db_name=ORCL1P Step5> invoke rman as follows invoke RMAN connect to target and catalog database. set dbid you want to restore rman target /  catalog rman/xxxxxx@catalogdb RMAN> set dbid=915313462; Step6> restore spfile as pfile run { allocate  channel ch1 DEVICE TYPE 'SBT_TAPE' PARMS  'ENV=(TDPO_OPTFILE=??_db....

ORA-16072: a minimum of one standby database destination is required

<<Back to Oracle Backup & Recovery Main Page LGWR: Minimum of 1 LGWR standby database required- RMAN Restore After database restore when tried to open , encountered below error. SQL> alter database open; alter database open * ERROR at line 1: ORA-03113: end-of-file on communication channel Process ID: 17034 Session ID: 387 Serial number: 7 Checking at Alterlog LGWR: Minimum of 1 LGWR standby database required Errors in file /ora_log/diag/rdbms/shfus1pp/SHFUS1P/trace/SHFUS1P_lgwr_17009.trc: ORA-16072: a minimum of one standby database destination is required Sun Jan 17 11:14:29 2021 ARC1 started with pid=20, OS id=17046 LGWR (ospid: 17009): terminating the instance due to error 16072 Sun Jan 17 11:14:30 2021 System state dump requested by (instance=1, osid=17009 (LGWR)), summary=[abnormal instance termination]. System State dumped to trace file /ora_log/diag/rdbms/shfus1pp/SHFUS1P/trace/SHFUS1P_diag_16999_20210117111430.trc Dumping diagnostic data in directory=[cdmp_2021011...

Could not copy OCR locations

<<Back to Oracle RAC Main Page CLSRSC-101: Could not copy OCR locations Problem Summary Encountered below error while running the root.sh. I was trying to add a node to RAC cluster. econfigured the server and tried to add to CLUSTER01 cluster using addNode.sh script. root.sh is now failing with the errros: Using configuration parameter file: /grid_home/oracle/12.1.0.2/grid/crs/install/crsconfig_params 2020/11/21 10:15:30 CLSRSC-4001: Installing Oracle Trace File Analyzer (TFA) Collector. 2020/11/21 10:15:30 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector. 2020/11/21 10:15:36 CLSRSC-101: Could not copy OCR locations 2020/11/21 10:15:36 CLSRSC-293: Error: validation of OCR location 'NO_VAL' failed Died at /grid_home/oracle/12.1.0.2/grid/crs/install/crsinstall.pm line 1696. The command '/grid_home/oracle/12.1.0.2/grid/perl/bin/perl -I/grid_home/oracle/12.1.0.2/grid/perl/lib -I/grid_home/oracle/12.1.0.2/grid/crs/install /grid_home/oracle/12....