DBA Scripts and Articles

Subscribe to DBA Scripts and Articles feed
This blog is intended to share my knowledge on Oracle and various scripts that I use as an oracle DBA.
Updated: 9 hours 4 min ago

Renaming a RAC cluster

Thu, 2018-09-27 09:34

Introduction Renaming an Oracle RAC cluster is not an easy thing, unfortunately for me I had to do this today because the name chosen for the newly installed cluster was wrong. Oracle does not provide a simple command to do this and you have to go through a deconfiguration/reconfiguration of the whole cluster. Changing the … Continue reading Renaming a RAC cluster

The post Renaming a RAC cluster appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Stop/Start all RAC databases at once

Wed, 2018-09-26 12:33

Introduction Stopping all RAC databases running on an ORACLE_HOME at once and saving the state before shutting them down is really helpfull when you are doing patching on a server. In my case I have databases running on some nodes and not the others, it’s getting complicated to keep track of which database is running … Continue reading Stop/Start all RAC databases at once

The post Stop/Start all RAC databases at once appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

RMAN Backup script

Wed, 2017-11-08 03:54

This is a sample backup script I used, it has already a lot of options. Feel free to make any modification you want. If you add some good enhancements, let me know I can put them here so everybody can profit from them. RMAN Backup script [crayon-5a031da255613263047755/]  

The post RMAN Backup script appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Intoduction to Oracle Rest Data Services

Tue, 2017-11-07 03:06

Presentation First, let’s talk about REST apis. REST apis are very popular nowdays because they are easily accessible from any client able to make http(s) requests. The beauty of this is that you can access different systems through these rest apis independantly of how the system is built in the backend. For example I can … Continue reading Intoduction to Oracle Rest Data Services

The post Intoduction to Oracle Rest Data Services appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Creating an ACFS filesystem

Mon, 2017-05-01 15:12

About ACFS filesystem ACFS mean  Automatic Storage Management Cluster File System. This filesystem volume resides inside the ASM database and can be used to store database files but also any type of files with or without direct relation to the database. Oracle ACFS does not support Oracle Grid Infrastructure or Oracle Cluster Registry voting files. … Continue reading Creating an ACFS filesystem

The post Creating an ACFS filesystem appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Datapump in parallel with a shell script

Thu, 2016-12-29 14:23

I recently came across an issue while exporting a huge partitioned table for a data migration. The export took years without any obvious reason. After some research I found that the parallelism wasn’t working, I could only see one datapump worker at a time, then I found this note explaining the behaviour (Doc ID 1467662.1) … Continue reading Datapump in parallel with a shell script

The post Datapump in parallel with a shell script appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Datapump in parallel with a shell script

Thu, 2016-12-29 14:23

I recently came across an issue while exporting a huge partitioned table for a data migration. The export took years without any obvious reason. After some research I found that the parallelism wasn’t working, I could only see one datapump worker at a time, then I found this note explaining the behaviour (Doc ID 1467662.1) … Continue reading Datapump in parallel with a shell script

The post Datapump in parallel with a shell script appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Monitoring long running operations

Tue, 2016-12-27 11:03

It can be quite useful to be able to monitor long running operations on your database, the view v$session_longops can be used to estimate the time necessary for certain operations to finish. Monitoring long running operations scripts Here is a script to monitor a RMAN backup: [crayon-5863774448cb1162851675/] Here is a sample result: [crayon-5863774448cbb212560092/] Here is … Continue reading Monitoring long running operations

The post Monitoring long running operations appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Monitoring long running operations

Tue, 2016-12-27 11:03

It can be quite useful to be able to monitor long running operations on your database, the view v$session_longops can be used to estimate the time necessary for certain operations to finish. Monitoring long running operations scripts Here is a script to monitor a RMAN backup: [crayon-5908925b9135b502422156/] Here is a sample result: [crayon-5908925b91363147312183/] Here is … Continue reading Monitoring long running operations

The post Monitoring long running operations appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Moving objects from one tablespace to another

Mon, 2016-11-07 10:57

This script will help you to move all objects from one tablespace to another, note that you will need downtime to move tables to other tablespace with this script, the operation can be done online using the dbms_redefinition package thought. Moving objects [crayon-5820d56021c6e347798014/] You can also modify the script to move objects of a specific … Continue reading Moving objects from one tablespace to another

The post Moving objects from one tablespace to another appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Moving objects from one tablespace to another

Mon, 2016-11-07 10:57

This script will help you to move all objects from one tablespace to another, note that you will need downtime to move tables to another tablespace with this script, the operation can be done online using the dbms_redefinition package thought. Moving objects [crayon-5908925b91584858349268/] You can also modify the script to move objects of a specific … Continue reading Moving objects from one tablespace to another

The post Moving objects from one tablespace to another appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Database maintenance tasks

Wed, 2016-03-23 15:46

The default maintenance window is not a good fit for every database, by default the maintenance window start at 10 PM and run for 4 hours during the week and start at 6 AM and last for 20 hours during the week-end. A different window exists for each day of the week and all the windows … Continue reading Database maintenance tasks

The post Database maintenance tasks appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Database maintenance tasks

Wed, 2016-03-23 15:46

The default maintenance window is not a good fit for every database, by default the maintenance window start at 10 PM and run for 4 hours during the week and start at 6 AM and last for 20 hours during the week-end. A different window exists for each day of the week and all the windows … Continue reading Database maintenance tasks

The post Database maintenance tasks appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Find missing or stale statistics

Wed, 2016-03-16 15:20

Purpose Statistics are primordial for the optimizer to choose the best execution plan possible. Sometimes you encounter a sub-optimal plan and need to find out if the tables involved in the statement are up to date. This query will help you find out which tables have been modified significantly since the last statistics gathering. For … Continue reading Find missing or stale statistics

The post Find missing or stale statistics appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Find missing or stale statistics

Wed, 2016-03-16 15:20

Purpose Statistics are primordial for the optimizer to choose the best execution plan possible. Sometimes you encounter a sub-optimal plan and need to find out if the tables involved in the statement are up to date. This query will help you find out which tables have been modified significantly since the last statistics gathering. For … Continue reading Find missing or stale statistics

The post Find missing or stale statistics appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Analyze database activity using v$log_history

Wed, 2015-09-09 13:26

The v$log_history view contains important information on how application’s users use the database , this view can help you define periods with the most activity in the database. v$log_history queries You can adapt the query to your needs, you just have to change the way you format the date to be able to drilldown to the … Continue reading Analyze database activity using v$log_history

The post Analyze database activity using v$log_history appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Analyze database activity using v$log_history

Wed, 2015-09-09 13:26

The v$log_history view contains important information on how application’s users use the database , this view can help you define periods with the most activity in the database. v$log_history queries You can adapt the query to your needs, you just have to change the way you format the date to be able to drilldown to the … Continue reading Analyze database activity using v$log_history

The post Analyze database activity using v$log_history appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

SQLcl, a revolution for SQL*Plus users

Thu, 2015-04-02 09:34

What is SQLcl ? SQLcl is a new command line interface like SQL*PLUS coming along with SQL Developper 4.1 Early Adopter. It is a lightweight tool (only 11MB) developed by the SQL Developer team fully compatible with Windows and Unix/Linux. You don’t need to install it so it is totally portable. The tool does not need … Continue reading SQLcl, a revolution for SQL*Plus users

The post SQLcl, a revolution for SQL*Plus users appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

SQLcl, a revolution for SQL*Plus users

Thu, 2015-04-02 09:34

What is SQLcl ? SQLcl is a new command line interface like SQL*PLUS coming along with SQL Developper 4.1 Early Adopter. It is a lightweight tool (only 11MB) developed by the SQL Developer team fully compatible with Windows and Unix/Linux. You don’t need to install it so it is totally portable. The tool does not need … Continue reading SQLcl, a revolution for SQL*Plus users

The post SQLcl, a revolution for SQL*Plus users appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Top 5 wait events from v$active_session_history

Mon, 2014-11-24 09:30

This query returns the top 5 wait events for the last hour from the v$active_session_history view. Be careful, this view is part of the diagnostic pack, you should not query this view if you not licensed for it. Top 5 wait events from v$active_session_history [crayon-5820d56023beb531338939/] This is obviously an approximation, because v$active_session_history contains only 1 second samples, and … Continue reading Top 5 wait events from v$active_session_history

The post Top 5 wait events from v$active_session_history appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Pages