Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • cache buffer chain latch Oracle
  • Identical Dblink Issue… Oracle
  • Oracle 11g Environment Setup Oracle
  • Remove DOS CR/LFs (^M) Linux/Unix
  • oracle fast start failover best practice Oracle
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • age_alert.ksh aging out alert.log Linux/Unix
  • Gathering statistics with DBMS_STATS Oracle
  • Rman Notes -1 Oracle
  • pvm_metric.sql for gathering report from vmstat tables Oracle
  • tblwopk.sql /* Find Tables Without PK */ Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Oracle GoldenGate lag monitoring shell script Linux/Unix
  • How to change hostname in Linux Linux/Unix
  • rm_backup_arch_file.ksh Linux/Unix

Category: SQL scripts

Does DBMS_JOB recompute the NEXT_DATE interval after or before

Posted on 24-Jan-2010 By Admin No Comments on Does DBMS_JOB recompute the NEXT_DATE interval after or before

goal: Does DBMS_JOB recompute the NEXT_DATE interval after or before executing the procedure or job? fact: PL/SQL fix: The NEXT_DATE is computed AFTER the job gets executed successfully. The INTERVAL date function is evaluated immediately before a job is executed. If the job completes successfully, the date calculated from INTERVAL becomes the new NEXT_DATE. If…

Read More “Does DBMS_JOB recompute the NEXT_DATE interval after or before” »

Oracle, SQL scripts

Committing distributed transaction using commit force

Posted on 22-Jan-2010 By Admin No Comments on Committing distributed transaction using commit force

Committing Using Only the Transaction ID The following SQL statement commits an in-doubt transaction: COMMIT FORCE ‘transaction_id’; The variable transaction_id is the identifier of the transaction as specified in either the LOCAL_TRAN_ID or GLOBAL_TRAN_ID columns of the DBA_2PC_PENDING data dictionary view. For example, assume that you query DBA_2PC_PENDING and determine that LOCAL_TRAN_ID for a distributed…

Read More “Committing distributed transaction using commit force” »

Oracle, SQL scripts

Rollback force for distributed transactions

Posted on 22-Jan-2010 By Admin No Comments on Rollback force for distributed transactions

FORCE Clause Specify FORCE to manually roll back an in-doubt distributed transaction. The transaction is identified by the text containing its local or global transaction ID. To find the IDs of such transactions, query the data dictionary view DBA_2PC_PENDING. A ROLLBACK statement with a FORCE clause rolls back only the specified transaction. Such a statement…

Read More “Rollback force for distributed transactions” »

Oracle, SQL scripts

How to find password change date for user

Posted on 13-Jan-2010 By Admin No Comments on How to find password change date for user

Check user$ table for same.

Oracle, SQL scripts

Monitor Long Running Job

Posted on 20-Dec-2009 By Admin No Comments on Monitor Long Running Job

SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND(SOFAR/TOTALWORK*100,2) “% COMPLETE” FROM V$SESSION_LONGOPS WHERE OPNAME LIKE ‘RMAN%’ AND OPNAME NOT LIKE ‘%aggregate%’ AND TOTALWORK != 0 AND SOFAR TOTALWORK /

Oracle, SQL scripts

Find_table_size.sql

Posted on 09-Dec-2009 By Admin No Comments on Find_table_size.sql

set lines 120 pages 500 col owner format a30 col segment_name format a30 col tab_sum format 999999999999999 col indx_sum format 999999999999999 col MB format 999999999 accept pvm_owner prompt ‘Enter Owner Name -> ‘ accept pvm_table prompt ‘Enter Table Name -> ‘ select tab.owner, tab.segment_name, tab.tablespace_name, (tab_sum+indx_sum)/(1024*1024) MB from (select p.owner, p.segment_name, p.tablespace_name, sum(p.bytes) tab_sum from…

Read More “Find_table_size.sql” »

Oracle, SQL scripts

Database link password in user_db_links

Posted on 09-Dec-2009 By Admin No Comments on Database link password in user_db_links

Problem Description: ~~~~~~~~~~~~~~~~~~~~ Database link passwords are stored as plaintext. A database link is a mechanism used to provide a method of transparently accessing one server from another. When creating a database link, a user name and password of the account on the remote server can be specified. Creating the database link without credentials works…

Read More “Database link password in user_db_links” »

Oracle, SQL scripts

find_err.sql for finding errors from dba_errors.

Posted on 04-Dec-2009 By Admin No Comments on find_err.sql for finding errors from dba_errors.

set lines 120 pages 200 col line format 9999 col position format 999 col text format a80 select line, position, text from dba_errors where owner= upper(‘&owner_name’) and name = upper(‘&obj_name’) order by SEQUENCE;

Oracle, SQL scripts

Oracle 10g for solaris 10

Posted on 28-Oct-2009 By Admin No Comments on Oracle 10g for solaris 10

Oracle 10g for Solaris 10 I got error message “Checking operating system version: must be 5.8 or 5.9. Actual 5.10 Failed

Oracle, SQL scripts

Error Handling in Proc

Posted on 21-Oct-2009 By Admin No Comments on Error Handling in Proc

There is a standard way of trapping any SQL or database errors in Pro*C.This is done using EXEC SQL WHENEVER SQLERROR DO ; just ensure that the above statement goes before any sql statements whenever an error is encountered , the control goes to the function function_name in the body of the function_name , just…

Read More “Error Handling in Proc” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 5 6 7 … 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
  • Oracle Connections expire_time and firewall Oracle
  • sess_server.sql Oracle
  • process id based files and processes Linux/Unix
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • sid_wise_sql.sql Oracle
  • Removing Ctrl-M from end of line using vi Linux/Unix
  • Oracle Release Explaination Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme