Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Syed Saad Ali

Oracle ACE Pro

Oracle Solution Architect

Oracle E-Business Suite

Oracle Cloud Infrastructure

Oracle Fusion Middleware

Oracle Database Administration

Oracle Weblogic Administration

Author: Syed Saad Ali

September 1, 2017 PL/SQL Code For Dropping All Objects in Schema
Database ScriptsScripts

PL/SQL Code For Dropping All Objects in Schema

 

DECLARE
v_itemcount INTEGER;
BEGIN
SELECT Count(*)
INTO   v_itemcount
FROM   all_objects AO
WHERE  AO.owner = USER
AND AO.object_type NOT IN ( ‘INDEX’ )
AND AO.object_name NOT LIKE ‘BIN$%’;

WHILE ( v_itemcount > 0 ) LOOP
FOR v_cmd IN (SELECT ‘drop ‘
|| AO.object_type
|| ‘ ‘
|| AO.object_name
|| Decode(AO.object_type, ‘TABLE’,
‘ CASCADE CONSTRAINTS’,
) AS DROPCMD
FROM   all_objects AO
WHERE  AO.owner = USER
AND AO.object_type NOT IN ( ‘INDEX’ )
AND AO.object_name NOT LIKE ‘BIN$%’) LOOP
BEGIN
EXECUTE IMMEDIATE v_cmd.dropcmd;
EXCEPTION
WHEN OTHERS THEN
NULL; — ignore errors
END;
END LOOP;

SELECT Count(*)
INTO   v_itemcount
FROM   all_objects AO
WHERE  AO.owner = USER
AND AO.object_type NOT IN ( ‘INDEX’ )
AND AO.object_name NOT LIKE ‘BIN$%’;
END LOOP;

EXECUTE IMMEDIATE ‘purge recyclebin’;
END;

[edsanimate_start entry_animation_type= “fadeIn” entry_delay= “0” entry_duration= “2” entry_timing= “linear” exit_animation_type= “” exit_delay= “” exit_duration= “” exit_timing= “” animation_repeat= “infinite” keep= “yes” animate_on= “load” scroll_offset= “” custom_css_class= “”]

NOTE: Be Careful Before Running it On Production Environment [edsanimate_end]

 

September 1, 2017 RAC Voting Disk
Installation/Configurations10gInstallation/Configurations11gInstallation/Configurations12cOracle Database Material

Rac Voting Disk

The Voting Disk File is a file on the shared cluster system or a shared raw device file.

Voting disk a key component of clusterware and its failure can lead to inoperability of the cluster.

In RAC at any point in time the clusterware must know which nodes are member of the rso that

  • it can perform load balancing
  • In case a node fails, it can perform failover of resources as defined in the resource profiles
  • If a node joins, it can start resources on it as defined in OCR/OLR
  • If a node joins, it can assign VIP to it in case GNS is in use
  • If a node fails, it can execute callouts if defined

Adding

crsctl add css votedisk <file>

deleting

crsctl delete css votedisk <file>

querying

crsctl query css votedisk

 

 

September 1, 2017 Undo Related Queries Part 1
APPS DBAAppsDBA ScriptsScripts

To check Retention Guarantee for Undo Tablespace

(more…)