Posts

Showing posts with the label shell script

ARCHIVE LOG Switch - shell script (for Oracle)

I think many of database admins will agree that it is always good idea to switch log file atleast every 20 mins or so. Especially when you have standby server setup. Doing this will ensure that redo logs are cleared up every 20 mins or so and they are shipped and applied onto standby database. Script Benefits: This is a simple shell script that uses plsql for checking the mount state of Database (oracle) and switch the archive log file when the open_mode of database is Read Write.   This script can be setup on both Primary and standby DB servers. This will avoid the enabling and disabling process on both servers after switchover/failover. You can setup this on crontab job on both Primary and standby DB servers, This will only switch log file if the DB is on Read Write mode ----------    Script Starts Here    ----------- #!/usr/bin/ksh #!/usr/bin/ksh ## ---- Created by Arvind Toorpu ## ----   Create Date 10/15/2015 ## ----   This script can be sch...