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有个回 ...
随机推荐
- php不会的点
1.DIRECTORY_SEPARATOR:DIRECTORY_SEPARATOR是一个显示系统分隔符的命令,DIRECTORY_SEPARATOR是PHP的内部常量,不需要任何定义与包含即可直接使用 ...
- vs2015升级后台mvc视图编辑器默认不是razor视图引擎问题
1.问题的原因 vs2013中创建的mvc4.0应用默认使用的razor2.0版本 在vs2015编辑器中默认使用的razor视图引擎是3.0版本 解决方案: 第一步:升级mvc应用的版本为mvc5. ...
- 练习--分治法--Merge k Sorted Lists
Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. / ...
- C++新式类型转换
C++的四种强制类型转换,所以C++不是类型安全的.分别为:static_cast , dynamic_cast , const_cast , reinterpret_cast 新类型的强制转换可以提 ...
- PHP中的魔术方法总结 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep, __wakeup, __toStr
PHP中的魔术方法总结 :__construct, __destruct , __call, __callStatic,__get, __set, __isset, __unset , __sleep ...
- 查看Linux系统相关版本信息
1.“uname -a” 查看电脑以及操作系统的相关信息 2.“cat /proc/version” 查看运行的内核版本 3."cat /etc/redhat-release", ...
- IIS 7.0 的 ASP.NET 应用程序生命周期概述(转载)
IIS 7.0 的 ASP.NET 应用程序生命周期概述更新:2007 年 11 月本主题介绍在 IIS 7.0 集成模式下运行以及与 IIS 7.0 或更高版本一起运行的 ASP.NET 应用程序的 ...
- 用jquery可以用使用serialize()序列化表单值,那有没有什么方法可以将值填充到表单中呢? (一段不错的代码)
serialize()的作用,是生成一个类似这种格式的字符串用于ajax提交 a=&b=&c=.你想将值填写到表单,首先要有值,然后就是表单控件的id或者能唯一定位控件的属性.然后就$ ...
- NSRunLoop 详解
今天看到了NSRunloop,其实之前也有看了关于NSRunloop的内容,在这里想简单的就个人的理解总结一下.其实自己在开发的过程当中,还没有更多的涉及到NSRunloop的功能.总的来说,NSRu ...
- [HDU] 1394 Minimum Inversion Number [线段树求逆序数]
Minimum Inversion Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java ...