Oracle中drop user和drop user cascade的区别
drop user ; 仅仅是删除用户,drop user username 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不会被删除,只会被置为无效
Views or synonyms for objects in the dropped user's schema
视图,同义词
Stored procedures, functions, or packages that query objects in the dropped user's schema
存储过程,函数,包
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.
其他用户建立的基于被删除用户的物化视图不会被删除,只是不能在刷新了。
Oracle Database drops all triggers in the user's schema.
用户模式下的所有触发器全部被删除
Oracle Database does not drop roles created by the user.
被删除用户建立的其他用户不会被删除
Oracle中drop user和drop user cascade的区别的更多相关文章
- Oracle中的rownum 和rowid的用法和区别
Oracle中的rownum 和rowid的用法和区别 1.rownum是伪列,是在获取查询结果集后再加上去的 (获取一条记录加一个rownum).对符合条件的结果添加一个从1开始的序列号. eg ...
- oracle中删除表:drop、delete、truncate
相同点,使用drop delete truncate 都会删除表中的内容 drop table 表名 delete from 表名(后面不跟where语句,则删除表中所有的数据) truncate t ...
- ORACLE中主键约束跟唯一索引的区别
分类: DB 2011-12-03 21:34 611人阅读 评论(0) 收藏 举报 oracleconstraintsimmutableusertabledomain 1. 分别用两种方法创建主键 ...
- Oracle 中for update和for update nowait的区别
http://www.cnblogs.com/quanweiru/archive/2012/11/09/2762223.html 1.for update 和 for update nowait 的区 ...
- Oracle 中 for update 和 for update nowait 的区别
原文出处http://bijian1013.iteye.com/blog/1895412 一.for update 和 for update nowait 的区别 首先一点,如果只是select 的话 ...
- oracle中 some、any、all 三者的区别及个人总结,归纳!
any :如果是大于号时( a > b ),那么a中所有大于b中最小的那个数的值,就会被输出出来. 如果是小于号时( a < b ),那么a中所有小于b中最大的那个数的值,就会被输出出来. ...
- ORACLE 中rownum和row_number()的使用区别(可指定取sql结果集的第几个数据)
这篇文章主要介绍了oracle中rownum和row_number()的使用方法以及区别和联系,十分的详细,有需要的小伙伴可以参考下. row_number()over(partition by ...
- ORACLE中Drop table cascade constraints之后果.
当你要drop一个table时,如果删除table的动作会造成trigger或constraint产生矛盾,系统会出现错误警告的讯息而不会允许执行..一个极简单的例子,例如你有一个员工基本资料表,上面 ...
- 在Oracle中恢复被DROP掉的表
在Oracle中可能不小心会DROP掉一个表,如果没有定期做备份的话,将会带来很大的麻烦.如果有的情况下,每天的数据都很重要,而定期备份的周期又稍长,情况恐怕也不容乐观!以前只知道Windows有个回 ...
随机推荐
- jedis处理redis cluster集群的密码问题
环境介绍:jedis:2.8.0 redis版本:3.2 首先说一下redis集群的方式,一种是cluster的 一种是sentinel的,cluster的是redis 3.0之后出来新的集群方式 本 ...
- hdu5322 Hope(dp)
转载请注明出处: http://www.cnblogs.com/fraud/ ——by fraud Hope Time Limit: 10000/5000 MS (Java/Othe ...
- 通过jqueryui实现邮件提示
//js代码$(function () { var availableTags = ["@qq.com", "@gmail.com", "@126.c ...
- WordPress插件制作教程(六): 插件函数之动作(Actions)函数
这一篇为大家说一下WordPress插件函数吧,要制作插件,了解这些函数是非常有必要的 WordPress插件函数分为“动作”(Actions)和过滤器”(Filters),WordPress 使用这 ...
- 阅读书目_2014H1
1.<程序员修炼之道 专业程序员必知的33个技巧>(完成) 注:更多是面向程序员全工作流程的. 2.linux shell脚本攻略 适合初学,但不方便作为参考手册查阅. 3.编写可读代码的 ...
- libevent使用之安装(一)
1.下载安装包,在官网http://www.monkey.org/~provos/libevent/下载 2.解压 运行命令: tar zxvf libevent-2.0.10-stable.tar. ...
- python描述符 descriptor
descriptor 在python中,如果一个新式类定义了__get__, __set__, __delete__方法中的一个或者多个,那么称之为descriptor.descriptor通常用来改 ...
- [HDU] 3711 Binary Number [位运算]
Binary Number Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Tot ...
- 关于Android界面编程与视图(View)组件
UI组件--------------->android.widget.* View组件------------->android.view.* 视图(View)组件 所有UI组件都是建立在 ...
- 如何向投资人展示——How to Present to Investors
著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处.作者:茶叶末链接:http://www.zhihu.com/question/23638879/answer/34525204来源: ...