DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Dorping Objects.

  1. #1
    Join Date
    Dec 2000
    Location
    Virginia, USA
    Posts
    455
    Hello,

    How do I drop all the objects own by user TEST, with out droping the user, Please give me the full syntax.

    Thanks in Advance.

  2. #2
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    Refer to note # 1019468.6 on Metalink.

  3. #3
    Join Date
    Dec 2000
    Location
    Virginia, USA
    Posts
    455
    Sorry I don't have access to Metalink.

  4. #4
    Join Date
    Apr 2000
    Location
    Baltimore, MD
    Posts
    759
    1. login as TEST
    2. run this script:

    accept 1st char prompt 'Enter object specification to drop: '
    select 'DROP ' ||object_type || ' ' || object_name || ';'
    from user_objects
    where object_type != 'INDEX' and object_name like upper('&1st')

    When you are prompted, type --> % (this drops all objects owner by the user TEST)

  5. #5
    Join Date
    Jun 2000
    Location
    Madrid, Spain
    Posts
    7,447
    I think you have to spool the output to a text file then run the spool file as a script

    spool drop.sql

    accept 1st char prompt 'Enter object specification to drop: '
    select 'DROP ' ||object_type || ' ' || object_name || ';'
    from user_objects
    where object_type != 'INDEX' and object_name like upper('&1st')

    spool off

    then run drop.sql

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width