Skip to main content

Posts

Showing posts from May, 2013

oracle extract schema dll and permissions

extract schema ddl and permissions from oracle database  =================== set pages 500 set lines 200 set long 100000 select dbms_metadata.get_ddl( 'USER', 'AIRTEL' ) from dual UNION ALL select dbms_metadata.get_granted_ddl( 'SYSTEM_GRANT', 'AIRTEL' ) from dual UNION ALL select dbms_metadata.get_granted_ddl( 'OBJECT_GRANT', 'AIRTEL' ) from dual UNION ALL select dbms_metadata.get_granted_ddl( 'ROLE_GRANT', 'AIRTEL' ) from dual;

about oracle lock

some links are helpful. http://jonathanlewis.wordpress.com/2010/06/21/locks/ http://psoug.org/blogs/mohan/exploring-internal-params/detect-and-resolve-locks/ Lock Modes Filed under: Infrastructure , Locks — Jonathan Lewis @ 7:05 pm UTC Jun 21,2010 I usually think about locks (and the meaning of the lmode and request columns in v$lock ) in terms of numbers, and never seem to remember which number goes with which name – apart from mode 6 = exclusive. So I’ve finally put up a little list somewhere I’ll always be able to find it if I need it. Value Name(s) Table method (TM lock) 0 No lock n/a 1 Null lock (NL) Used during some parallel DML operations (e.g. update) by the pX slaves while the QC is holding an exclusive lock. 2 Sub-share (SS) Until 9.2.0.5/6 "select for update" Row-share (RS) Since 9.2.0.1/2

11g unindexed foreign key cause lock issue

http://richardfoote.wordpress.com/2010/11/10/oracle11g-new-locking-modes-when-policing-fk-constraints-a-wolf-at-the-door/ Oracle11g: New Locking Modes When Policing FK Constraints (A Wolf at the Door) November 10, 2010 Posted by Richard Foote in  11g ,  Foreign Keys ,  Locking Issues ,  Oracle Indexes .  trackback As I’ve been focusing mainly with Oracle 11g at work these days, thought I might look at a number of Oracle 11g related topics in the coming weeks.   To start with, there’s been a subtle but potentially significant change introduced in Oracle 11g (since 11.1.0.6) with regard to the manner in which locks are held in relation to policing Foreign Key constraints. The following has been tested on both 11.2.0.1 and 11.2.0.2.   To set the scene and replicate the issue we hit at work, I’m just going to create a little table (ALBUMS) that has 2 FK constraints pointing to two parent tables (ARTISTS and FORMATS) and populate them with a few rows.   1 2 3 4 5 6