Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Oracle 10g Installation/Applying Patches Tips Oracle
  • Debugging Shell FIles Linux/Unix
  • New Latest Param.sql for finding all hidden parameters also Oracle
  • Backup and Recovery Scenarios Oracle
  • move_arch_files.ksh Linux/Unix
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • ORA-8031 issue and solution if it is occuring due to truncate. Oracle
  • cp_filesystem.sql Oracle
  • T-SQL Vs PL/SQL Syntax SQL Server
  • find_pk.sql /* Find Primary Key */ Oracle
  • get_vmstat_linux Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • how to find OS block size Oracle
  • dbinv.sql Oracle
  • Search and Replace vi editor command. Linux/Unix

Category: SQL scripts

Wait time tuning research

Posted on 02-Aug-2005 By Admin No Comments on Wait time tuning research

http://www.dba-oracle.com/art_otn_waits.htm v$session.paddr = v$process.addr v$session.sid = v$session_wait.sid v$session.sql_address = v$sqlarea.address v$session.sql_hash_value = v$sqlarea.hash_value v$session.sql_id = v$sqlares.sql_id v$session.server shows Dedicated or MTS configuration. The fields module and action of v$session can be set with dbms_application_info.set_module. The field client_info can be set with dbms_application_info.set_client_info Join sid with v$sesstat if you want to get some statistical information for…

Read More “Wait time tuning research” »

Oracle, SQL scripts

crtgr.sql /* For creating trigger from data dictionary */

Posted on 02-Aug-2005 By Admin No Comments on crtgr.sql /* For creating trigger from data dictionary */

SET LONG 1000000 UNDEFINE trigger_name SET PAGES 0 SET FEEDBACK OFF SET LINES 132 set echo off set numwidth 9 Set head off set verify off set time off set timing off COLUMN text FORMAT A302 word_wrapped COLUMN spool_name NEW_VALUE spool_name NOPRINT SELECT lower(trigger_name||’.ctr’) spool_name FROM dba_triggers WHERE trigger_NAME = UPPER(‘&&trigger_name’); SPOOL &spool_name select ‘CREATE…

Read More “crtgr.sql /* For creating trigger from data dictionary */” »

Oracle, SQL scripts

eplan9i.sql

Posted on 02-Aug-2005 By Admin No Comments on eplan9i.sql

set pages 300 set lines 100 truncate table plan_table; EXPLAIN PLAN SET STATEMENT_ID = ‘pvm’ FOR SELECT * FROM emp; SELECT rpad(cardinality, 10, ‘ ‘) || ‘ ‘ || rpad(cost, 10, ‘ ‘) || ‘ ‘ || lpad(‘ ‘,level-1)||operation||’ ‘|| options||’ ‘||object_name “Rows Cost Plan” FROM PLAN_TABLE CONNECT BY prior id = parent_id AND prior…

Read More “eplan9i.sql” »

Oracle, SQL scripts

Rename Oracle Instance Name

Posted on 02-Aug-2005 By Admin No Comments on Rename Oracle Instance Name

Renaming oracle instance (from UOCTEST to UAS) Note : Remember to rename datafile, logfile, controlfile, parameterfile and passwordfile. Aslo need to change listener. ******** Parameter File *************************** (1) check whether instance is using SPFIlE. using “show parameter spfile” (2) SQL> connect / as sysdba SQL> “create pfile from spfile” in 10g by default it will…

Read More “Rename Oracle Instance Name” »

Oracle, SQL scripts

PLSQL Table Syntax 2

Posted on 02-Aug-2005 By Admin No Comments on PLSQL Table Syntax 2

DECLARE TYPE EmpTabTyp IS TABLE OF emp%ROWTYPE INDEX BY BINARY_INTEGER; emp_tab EmpTabTyp; BEGIN /* Retrieve employee record. */ SELECT * INTO emp_tab(7468) FROM emp WHERE empno = 7468; END;

Oracle, SQL scripts

PLSQL Table Syntax 1

Posted on 02-Aug-2005 By Admin No Comments on PLSQL Table Syntax 1

DECLARE TYPE DeptRecTab IS TABLE OF dept%ROWTYPE; dept_recs DeptRecTab; CURSOR c1 IS SELECT deptno, dname, loc FROM dept WHERE deptno > 10; BEGIN OPEN c1; FETCH c1 BULK COLLECT INTO dept_recs; END;

Oracle, SQL scripts

create user with unlimited quota

Posted on 02-Aug-2005 By Admin No Comments on create user with unlimited quota

create user uoc identified by uoc default tablespace uoc_data temporary tablespace temp; grant connect, resource to uoc; alter user uoc quota unlimited on uoc_data; alter user uoc quota unlimited on temp;

Oracle, SQL scripts

create trigger syntax

Posted on 02-Aug-2005 By Admin No Comments on create trigger syntax

CREATE OR REPLACE TRIGGER “MESG”.ats_pdt_base_pre_ins_dbt BEFORE INSERT ON mesg.ats_product_base REFERENCING NEW AS NEW OLD AS OLD FOR EACH ROW DECLARE BEGIN BEGIN set_audit_proc(‘I’, :new.usr_crtd, :new.dt_crtd, :new.usr_mdfd, :new.dt_mdfd); END; END; /

Oracle, SQL scripts

v$backup.status information

Posted on 02-Aug-2005 By Admin No Comments on v$backup.status information

when you apply “ALTER TABLESPACE ABC BEGIN BACKUP;”, then status of all dbfs of that tablespace become ACTIVE in v$backup view. It become INACTIVE once you applu “ALTER TABLESPACE ABC END BACKUP;”.

Oracle, SQL scripts

create database syntax

Posted on 02-Aug-2005 By Admin No Comments on create database syntax

create database PARESH CONTROLFILE REUSE MAXLOGFILES 50 MAXLOGMEMBERS 5 MAXDATAFILES 1000 MAXINSTANCES 1 MAXLOGHISTORY 1357 LOGFILE GROUP 1 ( ‘/db1/oradata/800PARESH/redo01a.log’, ‘/db2/oradata/800PARESH/redo01b.log’ ) SIZE 25M REUSE, GROUP 2 ( ‘/db1/oradata/800PARESH/redo02a.log’, ‘/db2/oradata/800PARESH/redo02b.log’ ) SIZE 25M REUSE, GROUP 3 ( ‘/db1/oradata/800PARESH/redo03a.log’, ‘/db2/oradata/800PARESH/redo03b.log’ ) SIZE 25M REUSE DATAFILE ‘/db3/oradata/800PARESH/system01.dbf’ size 200M reuse;

Oracle, SQL scripts

Posts pagination

Previous 1 … 31 32 33 … 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
  • ENQ: KO – FAST OBJECT CHECKPOINT tips Oracle
  • 556976.1 Oracle Clusterware: Components installed Oracle
  • get_aix_vmstat.ksh Oracle
  • Windows based Command line mailing program like mailx (Sednmail for windows) PHP/MYSQL/Wordpress
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • Index Range Scan Oracle
  • Monitor Long Running Job Oracle
  • Oracle 10g Wait Model Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme