Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122

    Unanswered: What is the best way to clean up a schema

    Using Toad, when viewing constraints under the schema browser,
    I see constraint names that appear to be trash. Example of a constraint name== BIN$/9YSr800TxCMdTDZ/TJFTg==$0
    The tool also indicates that this constraint is on table SCOTT.BIN$BWwf29LDSU63jK6nLzz2nQ==$0.

    ALTER TABLE SCOTT.BIN$BWwf29LDSU63jK6nLzz2nQ==$0 DROP CONSTRAINT BIN$/9YSr800TxCMdTDZ/TJFTg==$0

    How would I go about cleaning up this trash?

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    who cares? the scott schema is a test schema that is normally never used.
    just drop the scott schema

    drop user scott cascade;
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122
    I realize that I can simply drop the schema. But if trash should ever need to be cleaned up in a schema of more significance, I would like to have a method to deal with it.

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Those seem to be 'recycle bin' objects.

    In 10g Oracle has introduced the RECYCLE BIN which is a logical entity to hold all the deleted objects, and works exactly like the recycle bin provided in Windows operating system for example. All the deleted objects are kept in the recylce bin, these objects can be retrieved from the recycle bin or deleted permanently by using the PURGE command. Either an individual object like a table or an index can be deleted from the recycle bin:

    Code:
    SQL> PURGE TABLE Employee;
    or the whole recylce bin can be 'emptied out' by using the PURGE command:
    Code:
    SQL> PURGE recyclebin;
    or the recylce bin can be 'shut down':
    Code:
    ALTER SYSTEM SET RECYCLEBIN =  OFF;


    Last edited by LKBrwn_DBA; 06-14-06 at 12:21.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  5. #5
    Join Date
    Oct 2004
    Location
    Oklahoma City OK -
    Posts
    122
    Thank you.

  6. #6
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Cool


    Glad to be of some help.
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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