Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Database logon trigger issue Oracle
  • Find all users who have DML privileges Oracle
  • Absolute file number and relative file number Oracle
  • Debugging Shell FIles Linux/Unix
  • Follwoing korn shell is used to move files from source folder to destination folder and gzip it in destination folder. mv_iotto.ksh Linux/Unix
  • cp_filesystem.sql Oracle
  • catting.sh Linux/Unix
  • find_pk.sql /* Find Primary Key */ Oracle
  • Display the top 5 salaries for each department using single SQL Oracle
  • Jai Shree Ram Oracle
  • good note for shared pool tunnig Oracle
  • fdisk -l explaination about Primary-Logical-Extended Partitions Linux/Unix
  • Proc Compilation Oracle
  • longtx.sql Oracle
  • How to choose Driver table in SQL statement Oracle

Category: Oracle

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

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

Posts pagination

Previous 1 … 36 37 38 … 40 Next

Categories

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

Recent Posts

  • Trace a SQL session from another session using ORADEBUG30-Sep-2025
  • 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

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • For Search and replace unix command. Linux/Unix
  • Physical Standby switchover with session active Oracle
  • Looping for remote servers and find its database from oratab file. Linux/Unix
  • Optimizer_Index init.ora parameter explaination. Oracle
  • good linux notes Linux/Unix
  • Deleting first line and lastline of a file using sed Linux/Unix
  • find_log_switch.sql Find log switches in graphical manner Oracle
  • find_string_in_database.sql Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme