SHELL SCRIPT

Oracle Database Administration Scripts | DBA Bundle

If you were googling for a DBA scripts/tools to help you out with managing the mighty Oracle DB then you have landed on the right blog 🙂 I know you’re super busy and have no time for reading long articles, so let me jump to the bottom line, the DBA Bundle is a group of shell scripts […]

Script to Export Database | Schema | Table using (Data pump expdp or Legacy export exp)

Update on 05-Feb-2020: This post is not valid anymore. Sorry for inconvenience!  A new script has been released, please follow this link to get the final script:http://dba-tips.blogspot.com/2020/02/new-script-for-exporting-data.htmlCreating a script to export the data is not a big deal, but importing the dump file is a time-consuming job for the DBA. export_data.sh script will not only do the export […]

Extract Oracle Audit Records Script

Today I’ll share with you one of my scripts I’m using to easily retrieve the audit records of an oracle database user. Note: Auditing should be enabled on the database or the script will return no rows.              To enable auditing please check this article:            […]

Script to TRACE Oracle Session

In order to simplify the steps of enabling, stopping the trace on Oracle sessions and make the output trace data readable, I’ve written two scripts, start_tracing.sh will let you enable tracing on a specific session, and stop_tracing.sh to stop tracing the session and provide the original trace file along with another readable version of the trace file […]

Oracle Logs CLEANUP Script

In this post, I’ll share a script to backup & cleanup Oracle logs associated with a specific database on the Oracle server. This script was tested on Linux & SUN environments. You can download the script from here:https://www.dropbox.com/s/eytsv5duxe95lrh/oracle_cleanup.sh?dl=0 Once you run it, it will ask you to select a database (in case you have multiple running […]

Oracle Database COLD BACKUP Shell Script

Creating a script to take a cold backup of a database may be a time-consuming task, but creating a script to restore this cold backup later is certainly a daunting task. The shell script I’m sharing will take a database cold backup and then will create a restore script (to be used in case you […]

Oracle Database Monitoring Script

  The backbone monitoring solution for Oracle databases in my environment is dbalarm.sh script. It’s a kind of “deploy and forget” script where it can monitor lots of database system components in one go. The script can report/monitor Database, ASM, Clusterware, Golden Gate and OS main events, including:    – Database Monitoring:   – Monitor the DB […]