Data Guard / Standby: ORA-01156: recovery or flashback in progress may need access to files


Error Description:
In standby or Data guard the clear logfile group, drop logfile group commands are failing with following error.

SQL> ALTER DATABASE CLEAR LOGFILE GROUP 1;
ALTER DATABASE CLEAR LOGFILE GROUP 1
*
ERROR at line 1:

How to see / Check the Step by Step Execution of a Shell Script for Debugging?

It is very important have the step by step execution feature for debugging for any kind of programming language. Using this feature you can see the variable values which are getting assigned during the script execution. In shell script you can use the –x option to see the step by step execution. See an example here.


I have a sample program here.

How to Set / Unset Default Value for Command Line Arguments For a shell script?


While doing shell scripting you will use command line arguments to pass the values to the program. The program has to verify the value of the command line arguments whether it is having proper values assigned before further execution. Otherwise you can assign a default value for the parameter or argument if applicable.
Syntax:

Shell Script to Repeat the Execution of Command / Job Based on Time Interval Periodically


Suppose if you are copying some huge files from server to another server and you wanted to see the progress in size, number you can use these scripts. These scripts will run periodically according to the sleep commands.

Using yes Command

Data guard / Stand by: What are the Steps to Move Datafiles / Logfiles to Different Location?


Primary database Steps
1.   Confirm your primary database instance where you wanted to perform the activity
SQL> select name from v$database;
NAME
---------
TRANPRD

Data Guard / Standby: ORA-01624: log %s needed for crash recovery of instance %s (thread %s)


Error Description:
Drop redo log group in data guard database is giving following error.
 
SQL> alter database drop logfile group 1;
alter database drop logfile group 1
*
ERROR at line 1:
ORA-01624: log 1 needed for crash recovery of instance TRANPRD_STANDBY (thread 1)
ORA-00312: online log 1 thread 1:

Fix DGMGRL: Warning: ORA-16826: apply service state is inconsistent with the DelayMins property


Error Description:
Show configuration command shows following warning in DGMGRL.
 
DGMGRL> show configuration
 
Configuration - PRDCONFIG
 
  Protection Mode: MaxAvailability
  Databases:

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-25 All Rights Reserved | Site Map | Contact | Disclaimer