Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.



My Cloud Certifications:

GIAC Cloud Penetration Tester (GCPN)

GIAC Cloud Security Automation (GCSA)

GIAC Security Essentials (GSEC)

Certified Kubernetes Administrator (CKA)

Cloud Certified Security Professional (ISC2)

CyberSecurity Certified Professional (ISC2)

AWS Certified Solutions Architect Associate

Azure Certified Architect Expert

Azure Certified Architect

Azure Certified Administrator

Oracle Cloud Infrastructure 2018 Certified Architect Associate.

Oracle Cloud Infrastructure Classic 2018 Certified Architect Associate.

Oracle Database Cloud Administrator Certified Professional.

Oracle Database Cloud Service Operations Certified Associate.

Search This Blog

Tuesday, July 3, 2012

Disable gather stats ( default autotask jobs) job in 11g

Disable the auto stats job in 11g.


SQL> select client_name,status from Dba_Autotask_Client;

CLIENT_NAME                                                      STATUS
---------------------------------------------------------------- --------
auto optimizer stats collection                                  ENABLED
auto space advisor                                               ENABLED
sql tuning advisor                                               ENABLED



SQL> exec dbms_auto_task_admin.disable('auto optimizer stats collection',NULL,NULL);

PL/SQL procedure successfully completed.

SQL> exec dbms_auto_task_admin.disable(client_name =>'auto space advisor',operation => NULL,window_name => NULL);

PL/SQL procedure successfully completed.

SQL>  exec dbms_auto_task_admin.disable(client_name =>'sql tuning advisor',operation => NULL,window_name => NULL);

PL/SQL procedure successfully completed.

Related views related to automated database maintenance tasks:
DBA_AUTOTASK_CLIENT
DBA_AUTOTASK_CLIENT_HISTORY
DBA_AUTOTASK_CLIENT_JOB
DBA_AUTOTASK_JOB_HISTORY
DBA_AUTOTASK_OPERATION
DBA_AUTOTASK_SCHEDULE
DBA_AUTOTASK_TASK
DBA_AUTOTASK_WINDOW_CLIENTS
DBA_AUTOTASK_WINDOW_HISTORY

SQL Profiles- ENABLE, DISABLE and DROP


SQL> exec dbms_sqltune.alter_sql_profile('SYS_SQLPROF_0236d8f37a490001','STATUS','DISABLED');

PL/SQL procedure successfully completed.

SQL> exec dbms_sqltune.alter_sql_profile('SQL_PROF_FOR_DELETE','STATUS','ENABLED');

PL/SQL procedure successfully completed.


SQL> EXEC DBMS_SQLTUNE.DROP_SQL_PROFILE('SYS_SQLPROF_02384d2b5e320000');

PL/SQL procedure successfully completed.


SQL> COMMIT;

Commit complete.

Tuesday, June 26, 2012

Exadata Documentation

Exadata and Storage cell documentation will be installed by default on the below path on the storage cell server.


[celladmin@cellserver]$ pwd
/opt/oracle/cell/doc

[celladmin@cellserver ]$ ls -lrt
total 42884
drwxr-xr-x  3 root root     4096 Jun  6 15:08 Japanese
-rwxr-xr-x  1 root root     5957 Jun  6 15:08 welcome.html
drwxr-xr-x 10 root root     4096 Jun  6 15:08 doc
-rw-r--r--  1 root root 43829040 Jun 11 22:43 doc.zip

Thursday, May 10, 2012

Copy file from source to destination when size > 0 bytes

#!/bin/ksh
wdate=`date '+%Y-%m-%d'`
wdate1=`date '+%m%d%y'`
logdate=`date '+%m%d%y%H%M%S'`
source=/your source/$wdate
destination=/yourdestination
log_dir=/loglocations/log
log=$log_dir/logfilename_$wdate1.log
while true
do
  if [ -d "$source" ]
  then
echo $source
echo $source/*.csv
      if [ ! -s "$source/*.csv"  ]
      then
         echo " File exists- copying the File to destination @$logdate" >> $log
         cp  $source/*.csv $destination/logfilename_$wdate1.csv
         echo " copied the file..exiting now  $logdate" >>$log
         exit 0
      else
   echo "sleepping ..."
          sleep 10
      fi
  fi
echo $wdate
done

Tuesday, May 1, 2012

find files within directories



find . -type f -exec grep -il "hello" {} \;

or if you know the file type

find . -type f -name "*.ext" -exec grep -il "hello" {} \