How to remove everything from my schema?

connect via sqlplus and execute:

set heading off

set pagesize 0

set feedback off

set timing off

set time off

set trimspool on

set trimout on

set linesize 100

set echo off

spool t

select 'drop '||object_type||' '||object_name||

decode(object_type,'CLUSTER',' including tables cascade constraints',

'OPERATOR', ' force',

'TABLE',' cascade constraints',

'TYPE', ' force',

'VIEW',' cascade constraints',

'')||';'

from user_objects

where object_type in ('CLUSTER', 'CONTEXT', 'DATABASE LINK', 'DIMENSION',

'DIRECTORY', 'FUNCTION', 'INDEX TYPE', 'JAVA',

'LIBRARY', 'MATERIALIZED VIEW', 'OPERATOR',

'OUTLINE', 'PACKAGE', 'PROCEDURE', 'SEQUENCE',

'SYNONYM', 'TABLE', 'TYPE', 'VIEW')

order by object_type, object_name

/

spool off

@t.lst

purge recyclebin;

  • 0 Benutzer fanden dies hilfreich
War diese Antwort hilfreich?

Verwandte Artikel

How to create an Oracle Wallet?

In order to secure your domain you need to the following:  We complete all necessary...

Can I use my domain name with Apex?

Absolutely, you will have full ftp/sftp access to the server as well.

Do you support SSL/https with APEX Hosting package?

Yes, we do. We can create temporary ssl certificate and when you are ready for a production you...

How do I send e-mail messages from PL/SQL?

Please follow this greate example: below: (http://www.orafaq.com/scripts/plsql/smtp.txt) rem...