drop user : 僅僅是刪除使用者,
drop user ×× cascade :會刪除此使用者名稱下的所有表和視圖。
user
Specify the user to be dropped. Oracle Database does not drop users whose schemas
contain objects unless you specify CASCADE or unless you first explicitly drop the
user's objects.
CASCADE
Specify CASCADE to drop all objects in the user's schema before dropping the user. You
must specify this clause to drop a user whose schema contains any objects.
使用cascade參數可以刪除該使用者的全部objects。要說明的如下:
1 . If the user's schema contains tables, then Oracle Database drops the tables and automatically drops any referential integrity constraints on tables in other schemas that refer to primary and unique keys on these tables.
如果使用者的schema中有表,則在刪除表的時候自動刪除與該表相關的主鍵和外鍵。
2 . If this clause results in tables being dropped, then the database also drops all domain indexes created on columns of those tables and invokes appropriate drop routines.
如果使用者的schema中有表,則在刪除表的時候自動刪除與該表相關的索引。
3. Oracle Database invalidates, but does not drop, the following objects in other schemas:
刪除使用者時,下列在其他使用者中的objects不會被刪除,只會被置為無效
3.1 Views or synonyms for objects in the dropped user's schema
視圖,同義字
3.2 Stored procedures, functions, or packages that query objects in the dropped user's schema
預存程序,函數,包
4. Oracle Database does not drop materialized views in other schemas that are based on tables in the dropped user's schema. However, because the base tables no longer exist, the materialized views in the other schemas can no longer be refreshed.
其他使用者建立的基於被刪除使用者的物化視圖不會被刪除,只是不能在重新整理了。
5. Oracle Database drops all triggers in the user's schema.
使用者模式下的所有觸發器全部被刪除
6 . Oracle Database does not drop roles created by the user.
被刪除使用者建立的其他使用者不會被刪除
------------------------------------------------------------------------------
Blog: http://blog.csdn.net/tianlesoftware
網上資源: http://tianlesoftware.download.csdn.net
相關視頻:http://blog.csdn.net/tianlesoftware/archive/2009/11/27/4886500.aspx
DBA1 群:62697716(滿); DBA2 群:62697977