Database Administration (MOSC)

MOSC Banner

Dropped some of SYSTEM's objects

edited Mar 19, 2018 11:24AM in Database Administration (MOSC) 4 commentsAnswered ✓

Hi, one junior DBA dropped by mistake some of SYSTEM's objects.  He generated a DROP.... script, and ran it thinking he was connected as some other user.  When he realized he was dropping the wrong objects, he canceled the execution.  Here´s a list of what the script did:

select decode(object_type,'TABLE','drop '||object_type||' "'||object_name||'" cascade constraints;','drop '||object_type||' "'||object_name||'";')

  from user_objects where object_type in ('TABLE','SEQUENCE','PACKAGE','PROCEDURE','FUNCTION','VIEW','SYNONYM','MATERIALIZED VIEW')

order by object_Type, object_name

/

drop FUNCTION "LOGMNR$COL_GG_TABF_PUBLIC";

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center