oracle--drop user 和 drop user cascade 的区别【转载】
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.
被删除用户建立的其他用户不会被删除
来自:DAVE
oracle--drop user 和 drop user cascade 的区别【转载】的更多相关文章
- oracle 中 cursor 与refcursor及sys_refcursor的区别 (转载)
http://blog.csdn.net/gyflyx/article/details/6889028 引用一.显式cursor 显式是相对与隐式cursor而言的,就是有一个明确的声明的cursor ...
- Oracle中drop user和drop user cascade的区别
drop user : 仅仅是删除用户,drop user username cascade :会删除此用户名下的所有表和视图. userSpecify the user to be dropped. ...
- drop user和drop user cascade的区别
SQL> delete user itp2;delete user itp2 *第 1 行出现错误:ORA-00903: 表名无效 SQL> drop user itp2;dr ...
- oracle 中删除表 drop delete truncate
oracle 中删除表 drop delete truncate 相同点,使用drop delete truncate 都会删除表中的内容 drop table 表名 delete from 表名 ...
- oracle中delete、truncate、drop的区别 (转载)
一.delete 1.delete是DML,执行delete操作时,每次从表中删除一行,并且同时将该行的的删除操作记录在redo和undo表空间中以便进行回滚(rollback)和重做操作,但要注意表 ...
- drop、truncate和delete的区别 [转载]
drop.truncate和delete的区别 本文转载自: https://www.cnblogs.com/zhizhao/p/7825469.html (1)DELETE语句执行删除的过程 ...
- 你搞懂 ORACLE、 SQLSERVER、MYSQL与DB2的区别了吗
ORACLE. SQLSERVER.MYSQL与DB2的区别--平台性: Oracle.MYSQL与DB2可在所有主流平台上运行: SQL Server只能在Windows下运行: --安 ...
- MySQL存储过程中的3种循环,存储过程的基本语法,ORACLE与MYSQL的存储过程/函数的使用区别,退出存储过程方法
在MySQL存储过程的语句中有三个标准的循环方式:WHILE循环,LOOP循环以及REPEAT循环.还有一种非标准的循环方式:GOTO,不过这种循环方式最好别用,很容易引起程序的混乱,在这里就不错具体 ...
- sql: oracle, for update和for update nowait的区别
1. oracle for update和for update nowait的区别 http://www.cnblogs.com/quanweiru/archive/2012/11/09/276222 ...
随机推荐
- 一个简单的利用 WebClient 异步下载的示例(四)
接上一篇,我们继续优化它. 1. DownloadEntry 类 public class DownloadEntry { public string Url { get; set; } public ...
- Django学习笔记(18)——BBS+Blog项目开发(2)主体思路及流程
这篇博客主要完成一个BBS+Blog项目,那么主要是模仿博客园的博客思路,使用Django框架进行练习. 准备:项目需求分析 在做一个项目的时候,我们首先做的就是谈清楚项目需求,功能需求,然后才开始写 ...
- ELK学习笔记之Elasticsearch和Kibana数据导出实战
0x00 问题引出 以下两个导出问题来自Elastic中文社区. 问题1.kibana怎么导出查询数据?问题2:elasticsearch数据导出就像数据库数据导出一样,elasticsearch可以 ...
- ConsoleColor原来有16种, enumData.GetValue(i)
Console.WriteLine("Name:{0},Value:{0:D}", enumData.GetValue(i)); Name:Black,Value:0Name:Da ...
- Python - 标准库概况 - 第二十一天
Python 标准库概览 操作系统接口 os模块提供了不少与操作系统相关联的函数. 建议使用 "import os" 风格而非 "from os import *&quo ...
- python中的三个读read(),readline()和readlines()
Python 将文本文件的内容读入可以操作的字符串变量非常容易. 文件对象提供了三个“读”方法: .read()..readline() 和 .readlines(). 每种方法可以接受一个变量以限制 ...
- 前端开发JS——快速入门
1.JS的核心标准ECMAScript 组成 ECMAScript------>核心语法标准 DOM------------->对文档节点的操作 ...
- 实战篇丨聊一聊SSRF漏洞的挖掘思路与技巧
在刚结束的互联网安全城市巡回赛中,R师傅凭借丰富的挖洞经验,实现了8家SRC大满贯,获得了第一名的好成绩!R师傅结合自身经验并期许新手小白要多了解各种安全漏洞,并应用到实际操作中,从而丰富自己的挖洞经 ...
- Python3返回函数
函数作为返回值 高阶函数除了可以接受函数作为参数外,还可以把函数作为结果值返回. 我们来实现一个可变参数的求和.通常情况下,求和的函数是这样定义的: def calc_sum(*args): ax = ...
- bat脚本弹出消息示例(msg命令详细解释)
弹出消息的bat,其实就是通过批处理调用msg命令,msg是系统自在的一个可以发送信息的命令. 示例: @echo off rem 测试MSG msg * "ok" rem 测试M ...