--. SQL script-the only note is the following f: dropobj. SQL is the operation. SQL; -- if your computer does not have a drive F, replace it with D or E. -- used to delete the current user
--. SQL script-the only note is the following f: \ dropobj. SQL is the operation. SQL; -- if your computer does not have a drive F, replace it with D or E. -- used to delete the current user
Homepage → Database Technology
Background:
Read News
Oracle SQL * PLUS-delete all objects of the current user
[Date: 2010-10-24] Source: Oracle community Author: langxspirit [Font:]
--. SQL script
-- The only note is that f: \ dropobj. SQL is the operated. SQL;
-- Your computer does not have a drive F. Replace it with D or E.
-- Used to delete all objects of the current user
-- Use for drop all objects in current user;
Set heading off;
Set feedback off;
Spool f: \ dropobj. SQL;
Prompt -- delete Constraints
Select 'alter table' | table_name | 'drop constraint' | constraint_name | ';'
From user_constraints where constraint_type = 'R ';
Prompt -- delete a tablespace
Select 'drop table' | table_name | ';' from user_tables;
Prompt -- delete View
Select 'drop view' | view_name | ';' from user_views;
Prompt -- delete a sequence of numbers
Select 'drop sequence '| sequence_name |'; 'from user_sequences;
Prompt -- delete a function
Select 'drop function' | object_name | ';' from user_objects
Where object_type = 'function ';
Prompt -- delete a stored procedure
Select 'drop procedure '| object_name |'; 'from user_objects
Where object_type = 'processure ';
Prompt -- delete a package
Prompt -- delete Package content
Select 'drop package' | object_name | ';' from user_objects
Where object_type = 'package ';
Prompt -- delete a database link
Select 'drop database link' | object_name | ';' from user_objects
Where object_type = 'database link ';
Spool off;
Set heading on;
Set feedback on;
@ F: \ dropobj. SQL;
Host del f: \ dropobj. SQL;
-- Done for drop objects in current user;
-- Import the entire segment in SQL * PLUS as. SQL or directly copy and paste it, and press F5 to complete the operation.
0
Install Oracle 10.2.0.1 on the minimum RedHat i386
MySQL tool series-mysqldump: database backup program
Oracle
Image Information
View All comments in this article (0)
Comments
Latest Information
Popular this week
Introduction to Linux community-advertisement service-website map-help Info-contact us
The articles published on this site (LinuxIDC) do not mean that they agree with the statement or description. They only provide more information and do not constitute any suggestions.
Copyright©2006-2014 Linux community All rights reserved Zhejiang ICP backup No. 06018118