Database Blog

Script to find total no of database startup in the year or month

Description : This script is used to find total number of database startup in the year or month. You can schedule the script in crontab for every month. Script :…

Read More

Script to find total number of database shutdown within the year or month

Description: This Shell script is very useful to calculate and review total no of database shutdown in the year or month. We can schedule the script to crontab for every…

Read More

How to Identify If a Disk/Partition Is Still Used by ASM

How to Identify If a Disk/Partition Is Still Used by ASM Introduction: To find whether an ASM disk is still used by ASM, or has Been used by ASM or…

Read More

Oracle Clusterware (CRS/GI) – ASM – Database Version Compatibility

Oracle Clusterware (CRS/GI) – ASM – Database Version Compatibility Introduction: You can have different release combinations of Oracle Clusterware, ASM and database software running on your cluster. However all cluster…

Read More

What is ocssd.bin, how To Stop-Start This Process To Apply A Patch in non-RAC

What is ocssd.bin ? How To Stop/Start This Process To Apply A Patch in non-RAC Introduction: You have installed Oracle Database 10g Products into the Oracle Home. Now you’re trying…

Read More

Troubleshooting ASMLIB on Linux

Troubleshooting ASMLIB on Linux     ASMLIB Disk Discovery troubleshooting checklist ———————————————— In Oracle10g, storage management and provisioning for Oracle databases is more simplified with a new feature called Automatic…

Read More

ASM is Unable to Detect ASMLIB Disks-Devices

ASM is Unable to Detect ASMLIB Disks/Devices   Introduction: We can detect ASMLIB devices/disks thru the ASM instance using the below steps. How to detect ASM devices/disks: 1) First of…

Read More

How to restrict a particular database user to login within time period

Description: We are restricting the logon time for a particular database user so the user can only access the database within defined periods. If the user attempts to logon during…

Read More

Script to spool SQL query output to HTML

set pages 5000 SET MARKUP HTML ON SPOOL ON PREFORMAT OFF ENTMAP ON – HEAD “<TITLE>EMPLOYEE REPORT</TITLE> – <STYLE type=’text/css’> – <!– BODY {background: #FFFFC6} –> – </STYLE>” – BODY…

Read More

Script to resize datafile without ORA-03297 error

select ‘alter database datafile’||’ ”’||file_name||””||’ resize ‘||round(highwater+2)||’ ‘||’m’||’;’ from ( select /*+ rule */ a.tablespace_name, a.file_name, a.bytes/1024/1024 file_size_MB, (b.maximum+c.blocks-1)*d.db_block_size/1024/1024 highwater from dba_data_files a , (select file_id,max(block_id) maximum from dba_extents group…

Read More