Skip to main content

Posts

Showing posts from 2021

ASMCMD-9521: AFD is already configured

  <<Back to Oracle ASM Main Page ASMCMD-9521: AFD is already configured while labeling the disk #export ORACLE_HOME=/u01/app/product/19c/grid #export ORACLE_BASE=/u01/app # $ORACLE_HOME/bin/asmcmd afd_label FRA_01_RAC_001  /dev/dm-10 --init   ASMCMD-9521: AFD is already configured After checking the disk status I found the disk is available to lable #$ORACLE_HOME/bin/asmcmd afd_lslbl /dev/dm-10 No devices to be scanned. The Permission is also fine # ls -lrt /dev/dm-10  lrwxrwxrwx 1 root root 8 Sep 28 10:19 /dev/dm-10  Lets read the header of this disk # $ORACLE_HOME/bin/kfed read /dev/dm-10  kfbh.endian:                          0 ; 0x000: 0x00 kfbh.hard:                            0 ; 0x001: 0x00 kfbh.type:                            0 ; 0x002: KFBT...

Oracle Scheduler Jobs not Running Post Patching

  <<Back to DB Administration Main Page  Scheduler Jobs not Running Post DB Patching on Windows  After Database patching it was identified that the scheduled jobs using oracle job scheduler was not running any more Tried to run the job manually was successful  SQL>exec dbms_scheduler.run_job('<JOBNAME>') After some troubleshooting come across that the following tables/view were missing  sys.scheduler$_job_refresh sys.scheduler$_lwjob_refresh sys.scheduler$_window_refresh Solution executing below script created the missing tables which fixed the scheduler issue and all jobs running again SQL>@?/rdbms/admin/catschv.sql

Showing and Modifying Default RMAN Configuration

  <<Back to Oracle Backup & Recovery Main Page After connecting to target database using RMAN you can run show all to display the default RMAN configuration. As you see Backup and recovery environment is preconfigured and the configuration is persistent across the restart  Showing  Default RMAN Configuration localhost:~/ [ORCL1P] rman target / Recovery Manager: Release 18.0.0.0.0 - Production on Fri May 14 11:24:12 2021 Version 18.13.0.0.0 Copyright (c) 1982, 2018, Oracle and/or its affiliates.  All rights reserved. connected to target database: ORCL1P (DBID=4215484517, not open) RMAN> show all; using target database control file instead of recovery catalog RMAN configuration parameters for database with db_unique_name ORCL1P are: CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default CONFIGURE BACKUP OPTIMIZATION OFF; # default CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default CONFIGURE CONTROLFILE AUTOBACKUP ON; # default CONFIGURE CONTROLFILE AUTOBACKUP...

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...