Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • My FTP Job Scheduling for www.pvmehta.com PHP/MYSQL/Wordpress
  • How to see which patches are applied. Oracle
  • Paste command syntax Linux/Unix
  • get_vmstat.ksh Linux/Unix
  • Jai Shree Ram Oracle
  • Distributed Transaction Troubleshooting. Oracle
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • Oracle Support Metalink ID 161818.1 Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Rman Notes -1 Oracle
  • To see how much time or progress of long transaction Oracle
  • pvm_rbs1.sql (to collect rbs info from db) Oracle
  • Reclaim temp tablespace for oracle 8, 8i Oracle
  • Library cahe Latches and internal explaination Oracle

Category: SQL scripts

Kill a session dynanically using execute immediate

Posted on 04-Jan-2009 By Admin No Comments on Kill a session dynanically using execute immediate

In this Document Goal Solution References Applies to: PL/SQL – Version: 8.1.7.4 to 10.1.0.2 Information in this document applies to any platform. Goal This article presents one suggested way of killing a session using an “ALTER SYSTEM KILL SESSION ‘sid,serial#’ ” statement in PL/SQL dynamically where the sid and serial# are values being passed in…

Read More “Kill a session dynanically using execute immediate” »

Oracle, SQL scripts

Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository

Posted on 22-Dec-2008 By Admin No Comments on Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository

PURPOSE This article is a step by step demonstration on how to use the Oracle10g SQLAccess Advisor (DBMS_ADVISOR) package to get recommendations on what Materialized Views to create in order to support a given set of queries (a workload) issued on the database. The workload is imported from the Oracle10g Automatic Workload Repository using a…

Read More “Oracle10g – Using SQLAccess Advisor (DBMS_ADVISOR) with the Automatic Workload Repository” »

Oracle, SQL scripts

SQL_PROFILE – I explaination

Posted on 22-Dec-2008 By Admin No Comments on SQL_PROFILE – I explaination

Checked for relevance on 12-May-2008. Clarification/Explanation ========================== The query optimizer can sometimes produce inaccurate estimates about an attribute of a statement due to lack of information,leading to poor execution plans. Traditionally, users have corrected this problem by manually adding hints to the application code to guide the optimizer into making correct decisions. For packaged applications,…

Read More “SQL_PROFILE – I explaination” »

Oracle, SQL scripts

Temporary Tablespace Information and restriction.

Posted on 27-Oct-2008 By Admin No Comments on Temporary Tablespace Information and restriction.

Temporary Tablespace (1) The DEFAULT TEMPORARY TABLESPACE must be of TEMPORARY type. (2) The DEFAULT TEMPORARY TABLESPACE cannot be converted to PERMANENT once it has been defined as the DEFAULT TEMPORARY TABLESPACE. (3) Before dropping the DEFAULT TEMPORARY TABLESPACE, create another one. (4) The DEFAULT TEMPORARY TABLESPACE cannot be taken OFFLINE: (5) The temporary tablespace…

Read More “Temporary Tablespace Information and restriction.” »

Oracle, SQL scripts

When error comes for temporary tablespace with version <= 9i

Posted on 16-Sep-2008 By Admin No Comments on When error comes for temporary tablespace with version <= 9i

Step-1 Run @temp_use.sql as following. Following is the code for temp_use.sql SELECT b.TABLESPACE, b.segfile#, b.segblk#, b.blocks, a.SID, a.serial#, a.username, a.osuser, a.status, c.sql_text FROM v$session a, v$sort_usage b, v$sqlarea c WHERE a.saddr = b.session_addr AND a.SQL_HASH_VALUE = c.HASH_VALUE and a.sid not in (select distinct sid from v$mystat) ORDER BY b.TABLESPACE, b.segfile#, b.segblk#, b.blocks / set pagesize…

Read More “When error comes for temporary tablespace with version <= 9i” »

Oracle, SQL scripts

longtx.sql

Posted on 10-Jul-2008 By Admin No Comments on longtx.sql

Find long running transaction that are running for more than 5 minutes with transaction id. col machine format a30 col sid format 99999 col Transaction_id format a20 col username format a10 col days format 99.99 col minutes format 999999 set lines 120 pages 200 select a.sid, a.username, a.machine, round((sysdate – to_date(b.start_time, ‘MM/DD/YY HH24:MI:SS’)) * 1440)…

Read More “longtx.sql” »

Oracle, SQL scripts

V$transaction notes for finding XID composition.

Posted on 10-Jul-2008 By Admin No Comments on V$transaction notes for finding XID composition.

Notes on v$transaction The information here contains the view description from the Oracle9i documentation Earlier versions of Oracle may not include all columns. The v$transaction view lists the active transactions in the system. Column Datatype Description ————- ————– ————————————– ADDR RAW(4) Address of transaction state object XIDUSN NUMBER Undo segment number XIDSLOT NUMBER Slot number…

Read More “V$transaction notes for finding XID composition.” »

Oracle, SQL scripts

UTL_FILE test program

Posted on 03-Jul-2008 By Admin No Comments on UTL_FILE test program

Declare v_filehandle UTL_FILE.FILE_TYPE; file_dir VARCHAR2(50) :=’/db3/oracle/utlfiles’; begin t_file_name :=’Vatti_test.dat’; v_filehandle := UTL_FILE.FOPEN(file_dir, t_file_name, ‘w’); UTL_FILE.PUT_LINE(v_filehandle, ‘Hello TEST’); UTL_FILE.FCLOSE(v_filehandle); exception when others then dbms_output.put_line(sqlcode || ‘ ‘ || sqlerrm); end; /

Oracle, SQL scripts

V$CONTROLFILE_RECORD_SECTION reference notes.

Posted on 02-Jul-2008 By Admin No Comments on V$CONTROLFILE_RECORD_SECTION reference notes.

TYPE VARCHAR2(17) Identifies the type of record section: DATABASE, CKPT PROGRESS, REDO THREAD, REDO LOG, DATAFILE, FILENAME, TABLESPACE, LOG HISTORY, OFFLINE RANGE, ARCHIVED LOG, BACKUP SET, BACKUP PIECE, BACKUP DATAFILE, BACKUP REDOLOG, DATAFILE COPY, BACKUP CORRUPTION, COPY CORRUPTION, DELETED OBJECT, or PROXY COPY RECORD_SIZE NUMBER Record size in bytes RECORDS_TOTAL NUMBER Number of records allocated…

Read More “V$CONTROLFILE_RECORD_SECTION reference notes.” »

Oracle, SQL scripts

metalink all dynamic view reference notes.

Posted on 02-Jul-2008 By Admin No Comments on metalink all dynamic view reference notes.

V$ View Definitions Library Doc ID: Note:220021.1

Oracle, SQL scripts

Posts pagination

Previous 1 … 10 11 12 … 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
  • UNderstand and eliminate Latch contention. Oracle
  • TRUNCATE table and disabling referential constraints. Oracle
  • Find_table_size.sql Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • chk_space_SID.ksh Linux/Unix
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • Export Oracle data and Compress at same time Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme