Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • myfile Oracle
  • Jai Shree Ram Oracle
  • Sample WW22 listener.ora Oracle
  • DBMS_SQL for alter session. Oracle
  • How to see which patches are applied. Oracle
  • plan10g.sql good Oracle
  • Implementing Listener Security Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • Reading parameter file and printing Linux/Unix
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • rm_backup_arch_file.ksh Linux/Unix
  • GSQ.sql Oracle
  • Python class import from different folders Python/PySpark
  • Oracle 11g Environment Setup Oracle
  • kill all processes from specific user in solaris. Linux/Unix

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

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

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Find_table_size.sql Oracle
  • Oracle Internal Good Websites 1 Oracle
  • find_open_cur.sql Find open cursorts per session Oracle
  • currwaitobj.sql SQl_ID and SQL statement you can get from currwaitobj.sql Oracle
  • grep multuple patterns Linux/Unix
  • UNderstand and eliminate Latch contention. Oracle
  • logminer and my_lbu Oracle
  • All About Trace Fils Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme