Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Configure ssh authentications for RAC Oracle
  • backspace in SQL Plus not working then..? Linux/Unix
  • how to find OS block size Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • PHP code to add WordPress posts in bulk programmatically PHP/MYSQL/Wordpress
  • UNderstand and eliminate Latch contention. Oracle
  • DBMS_JOB all example Oracle
  • Metalink Note: Note:250655.1 : ADDM Basics USING THE AUTOMATIC DATABASE DIAGNOSTIC MONITOR Oracle
  • dbinv.sql Oracle
  • move_arch_files.ksh Linux/Unix
  • create user with unlimited quota Oracle
  • purge_trc.sh Linux/Unix
  • Renaming the column name Oracle
  • Oracle Data Direct to TAPE Oracle
  • Distributed Transaction Troubleshooting. Oracle

Category: SQL scripts

TRUNCATE Privs

Posted on 10-Mar-2006 By Admin No Comments on TRUNCATE Privs

To truncate a table or cluster, the table or cluster must be in your schema or you must have DROP ANY TABLE system privilege.

Oracle, SQL scripts

Create type and Grant on it.

Posted on 06-Mar-2006 By Admin No Comments on Create type and Grant on it.

conn cs/XXX Create TYPE VARCHAR2_ARRAY AS VARRAY(5000) OF VARCHAR2(50); Grant execute on VARCHAR2_ARRAY to r_exec_cs;

Oracle, SQL scripts

cur_sql.sql

Posted on 27-Feb-2006 By Admin No Comments on cur_sql.sql

spool cur_sql set lines 132 set pages 300 col USR format a14 col PAR heading “Parsing ID” format 9999999 col ELA heading “ELP time(Sec)” format 9999999.0 col HASH heading “Hash Value” col USR heading “Parsing User” col T heading “SQL Text having Elapsed time > 1 sec” break on HASH on USR on ELA skip…

Read More “cur_sql.sql” »

Oracle, SQL scripts

Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

Posted on 22-Feb-2006 By Admin No Comments on Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

Follwing is the script for manually gathering Stats using DBMS_STATS. Execution will be like ./analyze_schema.ksh /oracle/app/oracle/oraprocs/ora_SID.env CIF – Script Start #!/usr/bin/ksh ########## Configuration ############# ENV_FILE=$1 SCHEMA_NAME=$2

Oracle, SQL scripts

Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

Posted on 22-Feb-2006 By Admin No Comments on Gather Stats manually using DBMS_STATS after disabling DBMS_SCHEDULER jobs as previous entry

. $ENV_FILE echo “Started Analyze Schema of $SCHEMA_NAME at `date +%D-%T`” $ORACLE_HOME/bin/sqlplus -s DBMS_STATS.DEFAULT_DEGREE, cascade => TRUE, granularity=> ‘ALL’ ); EOF echo “Ended at `date +%D-%T`” – Script End Also, configure cron for execution on every sunday 11.00 PM as following. 00 11 * * 0 /export/home/oracle/oraprocs/analyze_schema.ksh /oracle/app/oracle/oraprocs/ora_SID.env CIF > /export/home/oracle/oraprocs/logs/analyze_schema_CIF.log 2> /export/home/oracle/oraprocs/logs/analyze_schema_CIF.err

Oracle, SQL scripts

Disbaling DBA_SCHEDULER_JOBS

Posted on 21-Feb-2006 By Admin No Comments on Disbaling DBA_SCHEDULER_JOBS

select job_name, state from dba_scheduler_jobs SQL> execute DBMS_SCHEDULER.DISABLE(‘GATHER_STATS_JOB’); PL/SQL procedure successfully completed. SQL> execute DBMS_SCHEDULER.DISABLE(‘PURGE_LOG’); PL/SQL procedure successfully completed. SQL> commit; Commit complete. SQL>

Oracle, SQL scripts

sid_wise_sql.sql Further explaination

Posted on 31-Jan-2006 By Admin No Comments on sid_wise_sql.sql Further explaination

After getting output from sid_wise_sql.sql, you can use TOP unix command to see whether those unix processes are consuming some CPU or Memory?? This will be useful to detelrmine whether a session is doing somehing or just hanging..

Oracle, SQL scripts

Roles and Stored Procs II

Posted on 31-Jan-2006 By Admin No Comments on Roles and Stored Procs II

Problem Resolution For roles and Stored Procedures. http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:961430030094 http://asktom.oracle.com/~tkyte/Misc/RolesAndProcedures.html As per http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:961430030094 with tom kyte, he has mentioned that we cannot compile this unless we give direct object privs to Owner of procedure, as at compile time AUTHID DEFINER and AUTHID CURRENT_USERS behave same. They both compile as per the definers privs. We can resolve…

Read More “Roles and Stored Procs II” »

Oracle, SQL scripts

Identical Dblink Issue…

Posted on 30-Jan-2006 By Admin No Comments on Identical Dblink Issue…

After discussion with The Oracle Support following is the conclusion. This appears to be the same problem as discussed in the following note and bug report: – Note:215123.1 “Procedures Get Invalidated When Database Link Names are Identical” – Bug:2485372 “OBJECTS SHARED SAME REMOTE OBJECT NAME INVALIDATES EACH OTHER” The conclusion is that this is working…

Read More “Identical Dblink Issue…” »

Oracle, SQL scripts

How to check current redo log progress redo_progress.sql

Posted on 30-Jan-2006 By Admin No Comments on How to check current redo log progress redo_progress.sql

select le.leseq “Current log sequence No”, 100*cp.cpodr_bno/le.lesiz “Percent Full”, cp.cpodr_bno “Current Block No”, le.lesiz “Size of Log in Blocks” from x$kcccp cp, x$kccle le where LE.leseq =CP.cpodr_seq and bitand(le.leflg,24)=8;

Oracle, SQL scripts

Posts pagination

Previous 1 … 22 23 24 … 35 Next

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • load SPM baseline from cursor cache05-Jun-2025
  • Drop all SPM baselines for SQL handle05-Jun-2025
  • Load SPM baseline from AWR05-Jun-2025
  • Drop specific SQL plan baseline – spm05-Jun-2025
  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • send email from unix mailx with attachment. Linux/Unix
  • How to choose Driver table in SQL statement Oracle
  • 10g RAC: Troubleshooting CRS Root.sh Problems Oracle
  • Reading parameter file and printing Linux/Unix
  • Jai Shree Ram Oracle
  • oracle fast start failover best practice Oracle
  • find_pk.sql /* Find Primary Key */ Oracle
  • Processes parameter and its dependencies on OS kernel parameters Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme