Skip navigation.

DBA Scripts and Articles

Syndicate content
This blog is intended to share my knowledge on Oracle and various scripts that I use as an oracle DBA.
Updated: 35 min 55 sec ago

SQL Tuning Health Check (SQLHC)

Thu, 2014-08-14 09:12

What is SQL Tuning Health Check? The SQL Tuning Health Check is provided by Oracle (Doc ID 1366133.1) in order to check the environment where the problematic SQL query runs. It checks the statistics, the metadata, initialization parameters and other elements that may influence the performance of the SQL being analyzed. The script generates an [...]

The post SQL Tuning Health Check (SQLHC) appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Space used by objects

Thu, 2014-08-07 12:35

Calculate the space used by a single object This script will help you calculate the size of a single object : [crayon-53f777ab4932e354412601/] Calculate the space used by a whole schema If you want the space used by a whole schema, then here is a variation of the first query : [crayon-53f777ab4933f594248112/]

The post Space used by objects appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Keep jobs active with screen command

Thu, 2014-06-12 12:00

What is the screen command ? When you have long running jobs, you need to keep them active when you disconnect from server. The screen command allows you to detach your terminal from you session. By doing this there is no link between your session and your terminal and you can disconnect from server while [...]

The post Keep jobs active with screen command appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Export data to excel

Tue, 2014-05-27 16:59

who never needed to export data to excel from sqlplus ? everybody had one day needed to do that. Sqlplus support the HTML markup which provides an excellent result once opened in excel. With the HTML markup, sqlplus create a table with all columns from your query including the name of your columns as table [...]

The post Export data to excel appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

Unindexed foreign keys

Sun, 2014-05-25 16:09

Unindexed foreign keys can lead to bad database performance due to lock contention and full table scans performed on the child table. Here is a diagram which illustrate the situation: In this exemple Oracle needs to lock the entire employees table when the primary key of the departments table is modified, in addition to that [...]

The post Unindexed foreign keys appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs

SQL Activity for the last hour

Sat, 2014-05-17 12:59

This script can be used to show the top 10 SQL activity for the last hour. It uses the v$active_session_history view to search top SQL by resource consumption. Top 10 SQL Activity [crayon-53f777ab49d8d474738424/] Here is the result you can obtain: and the active sessions history graph for the same period:

The post SQL Activity for the last hour appeared first on Oracle DBA Scripts and Articles (Montreal).

Categories: DBA Blogs