Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Sending email with file attachment. Linux/Unix
  • Important Solaris Commands Linux/Unix
  • Jai Shree Ram Oracle
  • sbind.sql Find Bind variable from sql_id sqlid Oracle
  • How can I tell if ASO is installed ? Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Very Good Oralce Internal Tuning Book Oracle
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Clean up Oracle
  • JSON/XML Types in Oracle Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • metalink all dynamic view reference notes. Oracle
  • Disbaling DBA_SCHEDULER_JOBS Oracle
  • changing kernel parameter in Oracle Enterpise Linux Linux/Unix
  • Sort with ASCII order and Numeric Order Linux/Unix

Author: Admin

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

Explain Plan Output 2

Posted on 02-Aug-2005 By Admin No Comments on Explain Plan Output 2

set markup html preformat on Rem Rem Use the display table function from the dbms_xplan package to display the last Rem explain plan. Force serial option for backward compatibility Rem select plan_table_output from table(dbms_xplan.display(‘plan_table’,null,’serial’));

Oracle, SQL scripts

Formatter Explain plan Output 1

Posted on 02-Aug-2005 By Admin No Comments on Formatter Explain plan Output 1

set markup html preformat on Rem Rem Use the display table function from the dbms_xplan package to display the last Rem explain plan. Use default mode which will display only relevant information Rem select * from table(dbms_xplan.display());

Oracle, SQL scripts

create PLAN_TABLE command.

Posted on 02-Aug-2005 By Admin No Comments on create PLAN_TABLE command.

create table PLAN_TABLE ( statement_id varchar2(30), plan_id number, timestamp date, remarks varchar2(4000), operation varchar2(30), options varchar2(255), object_node varchar2(128), object_owner varchar2(30), object_name varchar2(30), object_alias varchar2(65), object_instance numeric, object_type varchar2(30), optimizer varchar2(255), search_columns number, id numeric, parent_id numeric, depth numeric, position numeric, cost numeric, cardinality numeric, bytes numeric, other_tag varchar2(255), partition_start varchar2(255), partition_stop varchar2(255), partition_id numeric, other…

Read More “create PLAN_TABLE command.” »

Oracle, SQL scripts

Posts pagination

Previous 1 … 51 52 53 … 56 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
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • Small sample shell program Linux/Unix
  • plan10g.sql good Oracle
  • Alter procedure auditing Oracle
  • how to find VIP from ifconfig Linux/Unix
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • AWR license Oracle
  • DBMS_UTILITY.ANALYZE_SCHEMA Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme