Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Reading parameter file and printing Linux/Unix
  • checking connectivity between two servers Linux/Unix
  • Identical Dblink Issue… Oracle
  • Reading config file from other folder inside class Python/PySpark
  • default permission on ~/.ssh/authorized_keys2 or authorized_keys Linux/Unix
  • PLSQL Table Syntax 1 Oracle
  • Unix command for system configuration Linux/Unix
  • Find long Running Transaction Linux/Unix
  • Set Role explaination. Oracle
  • Process Map for CPU and Memory for OS processes Linux/Unix
  • get_ratio.sql get the ratio of users from v$session and this uses CASE-WHEN-THEN clause Oracle
  • How to set Processes Parameter Oracle
  • create PLAN_TABLE command. Oracle
  • copying/removing directory with all its subdirectory Linux/Unix
  • Good Link from metalink 1 Oracle

Category: Oracle

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

findobj.sql

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

select * from user_objects where object_name = upper(‘&objnm’);

Oracle, SQL scripts

find_cons.sql

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

set pagesize 300 set linesize 130 set head on set echo off accept tab prompt “Enter The Table Name -> ” select b.constraint_name “Cons Name”, b.status, decode(b.constraint_type, ‘P’, ‘PRIMARY’, ‘C’, ‘CHECK’, ‘U’, ‘UNIQUE’, ‘R’, ‘FOREIGN KEY’) “Cons Type”, substr(a.column_name, 1, 20) “Column Name”, decode(b.constraint_type, ‘C’, ‘ MUST NOT BE NULL’ , ‘ Position : ‘)…

Read More “find_cons.sql” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 36 37 38 … 40 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
  • Adding a new disk and mount it automatically. on VMWARE LINUX Linux/Unix
  • CTAS with LONG Column for 9i and higher Oracle
  • Processes parameter and its dependencies on OS kernel parameters Linux/Unix
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • True Session Wait Activity in Oracle 10g Verygood Oracle
  • Oracle Material from OTN Oracle
  • create a folder in multiple places Linux/Unix
  • To Find Orphan OS processes. Linux/Unix

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme