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

转载于:https://www.cnblogs.com/Hiberniane/archive/2010/06/08/2488662.html

Oracle中 drop user 和 drop user cascade 的区别相关推荐

  1. 【DB笔试面试766】在Oracle中,RAC、DG和OGG的区别有哪些?

    ♣ 题目部分 在Oracle中,RAC.DG和OGG的区别有哪些? ♣ 答案部分 (一)什么是高可用? 高可用(High Availability,HA)也可以称为高可用性或高可用环境.HA是分布式系 ...

  2. Oracle中insert into select和select into的区别

    文章转自:http://www.linuxidc.com/Linux/2012-09/70984.htm 在Oracle中,将一张表的数据复制到另外一个对象中.通常会有这两种方法:insert int ...

  3. 在Oracle中如何使用Flashback Drop以及管理回收站

    在Oracle11G中,当你删除一张表的时候,Oracle并不会立马就把这个表从数据库中移除,而是将该表与其相关的对象,比如建立在该表上的索引等改一个名字然后一起放在回收站当中.这个特性叫做Flash ...

  4. oracle表没有数据判断,Oracle中判断有表DROP无表CREATE的存储过程

    CREATE OR REPLACE PROCEDURE PD_GENERATE_HELP_LAST_TABLES IS --把从sqlserver中生成的vw_last_xxx所对应的视图生成本地的数 ...

  5. Oracle 中 for update 和 for update nowait 的区别

    原文出处http://bijian1013.iteye.com/blog/1895412 一.for update 和 for update nowait 的区别 首先一点,如果只是select 的话 ...

  6. oracle数据库variable,oracle中的define,declare,variable的差别

    当前位置:我的异常网» 数据库 » oracle中的define,declare,variable的差别 oracle中的define,declare,variable的差别 www.myexcept ...

  7. oracle中into字句,oracle中into语句

    oracle 中select into是什么意思 这是一个复制表数据的操作. 创建aaa表,这里没有定义aaa表的字段以及类型,而是用select * from bbb,这就是把bbb里面所有的字段包 ...

  8. oracle rownum_,oracle中rownum和row_number()

    row_number()over(partition by col1 order by col2)表示根据col1分组,在分组内部根据col2排序,而此函数计算的值就表示每组内部排序后的顺序编号(组内 ...

  9. oracle没有提交更新,oracle 中更新update不成功的原因

    oracle 中执行insert into 与delete 都正常,但是执行update 却没有反应. 原因: 是因为记录锁.这种只有update无法执行其他语句可以执行的其实是因为记录锁导致的,在o ...

  10. oracle数据库insert into,oracle中insert into用法 oracle中insert如何带条件添加数据?

    oracle insert into 脚本怎么写 INSE INTO BOOK(bookid,name,price) VALUES('100123','oracle ',54); 或者 INSE IN ...

最新文章

  1. SQL Server 2017 AlwaysOn on Linux 配置和维护(18)
  2. 领航商务之选——金立M5 plus体验札记
  3. 通过Chrome模拟和调试网速慢的情况来限制一些P2P视频网站上传速度占满的情况...
  4. Jupyterlab 安装配置手册
  5. 怎么统计是否内宿_第二关:描述统计分析
  6. mybatis入门(三)之Mapper XML 文件
  7. VIM使用系统剪切板
  8. 公布一个硬盘杀手的分析报告
  9. 一份关于如何为回归任务选择机器学习算法指南
  10. Mono 开发 (使用.NET技术的你,绝对不能忽略Mono)
  11. 开发岗位面试你应该知道的回答技巧!
  12. 补码乘法实验原理_你真的理解补码吗?
  13. Android 安全 (一)
  14. linuxmake没有指明目标并且找不到makefile_如何写makefile?
  15. mysql 授权类型_MySQL-02-授权及数据类型
  16. 996是人类社会的倒退
  17. 数字转日期 matlab,excel – 如何在MATLAB中将日期转换为数字并再返回
  18. 简支梁挠度计算公式推导_简支梁的最大挠度计算公式 l.ppt
  19. manjaro开启热点设置密码WPA/WPA2后iphone连不上
  20. ASCII 编码对照表 一览表

热门文章

  1. Event Handling Guide for iOS——由触摸事件传递想到的
  2. 统计字符串中出现最多的单词和次多的单词
  3. 我的软件用了那些技术
  4. 把这个写成一个类吧TREEVIEW
  5. 诗与远方:无题(五十七)
  6. 批处理BAT命令创建日期文件夹
  7. C# OpenTK教程 - 1.2 你好三角形
  8. rocketmq常用命令
  9. 微服务模块综合管理(模块视图管理,自动化热部署,前端资源实时刷新......)
  10. java 高德地图数据库_【爬虫】Java关于高德地图爬取数据