Mir Sayeed Hassan – Oracle Blog

Oracle DBA – Tips & Techniques | Learn with real-time examples

  • Translate

  • It’s Me




  • My Certificates

  • Links

    My Acclaim Certification : Credly Profile
    My Oracle ACE Pro Profile

  • Achievements

    Awarded Top 100 Oracle Blogs from Worldwide - #RANK 39
  • VISITORS COUNT

  • Verified International Academic Qualification from World Education Service (WES)

    Verified International Academic Qualification from World Education Service (WES)

  • Jobs

Archive for the 'DBA Scripts' Category

Create an alert of failed login attempt of users in Oracle database 11gR2 (11.2.0.4)

Posted by Mir Sayeed Hassan on 19th February 2019

Create an alert of failed login attempt of users in Oracle database 11gR2 (11.2.0.4) [oracle@testdb ~]$ !sq sqlplus /as sysdba sys@TESTDB> select instance_name,status,version from v$instance; INSTANCE_NAME    STATUS       VERSION ———————————————————— testdb                          … Read more..

Posted in DBA Scripts | Comments Off on Create an alert of failed login attempt of users in Oracle database 11gR2 (11.2.0.4)

How to take the Online Fulldb backup using Backup Script in Oracle 11gR2

Posted by Mir Sayeed Hassan on 4th February 2019

How to take the Online Fulldb backup using Backup Script in Oracle 11gR2 Database Status sys@TESTDB> select instance_name,status,version from v$instance; INSTANCE_NAME    STATUS       VERSION —————- ———— —————– testdb           OPEN         11.2.0.4.0 Create  the script… Read more..

Posted in DBA Scripts | Comments Off on How to take the Online Fulldb backup using Backup Script in Oracle 11gR2

Script to Delete Log Files in Oracle Database by using the Crontab Job

Posted by Mir Sayeed Hassan on 25th July 2018

Script to Delete Log Files in Oracle Database by using the Crontab Job The given script is tested in our test env The logfiles are deleTrace File i.e (,trc,.trm) , Audit File (.aud), Listener log (.trc,.trm) & .xml files In order to manage space in better way, the best practice is to clear the logs Read More

Posted in DBA Scripts | Comments Off on Script to Delete Log Files in Oracle Database by using the Crontab Job

Script to verify the database for Primary & standby

Posted by Mir Sayeed Hassan on 17th June 2018

Script to verify the database for Primary & standby [oracle@Prim-DB ~]$ cd /home/oracle/scripts/ [oracle@Prim-DB scripts]$ vi dblogsummary.sql !df -h !free !uptime !last reboot set linesize 500 col host_name format a40; select INST_ID,instance_name,STARTUP_TIME,status,archiver from gv$instance; select name,log_mode,protection_mode,… Read more..

Posted in DBA Scripts | Comments Off on Script to verify the database for Primary & standby

Script to check the datafile size used in Oracle database

Posted by Mir Sayeed Hassan on 16th May 2018

Script to check the datafile size used in Oracle database [oracle@testdb scripts]$ pwd /home/oracle/scripts [oracle@testdb scripts]$ cat checkdf.sql SET PAUSE ON SET PAUSE ‘Press Return to Continue’ SET PAGESIZE 60 SET LINESIZE 300 COLUMN “Tablespace Name” FORMAT A20 COLUMN “File Name” FORMAT A80 SELECT… Read more..

Posted in DBA Scripts | Comments Off on Script to check the datafile size used in Oracle database

Script to check the tablespace size used in Oracle database

Posted by Mir Sayeed Hassan on 16th May 2018

Script to check the tablespace size used in Oracle database [oracle@testdb scripts]$ pwd /home/oracle/scripts [oracle@testdb scripts]$ cat checktbs.sql set linesize 180 set pagesize 30 select fs.tablespace_name “Tablespace”, (df.totalspace – fs.freespace) “Used MB”, fs.freespace “Free MB”, df.totalspace… Read more..

Posted in DBA Scripts | Comments Off on Script to check the tablespace size used in Oracle database