- 浏览: 654708 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (609)
- java (139)
- 数据库 (107)
- 微信 (23)
- IT生活 (5)
- web前端 (74)
- SSH (11)
- 设计模式 (12)
- 重要资料 (11)
- 其他 (15)
- java技巧 (23)
- 服务器 (9)
- 2D/GUI (3)
- JAVA3D (2)
- ANT (5)
- Apache项目 (19)
- 数据类型 (10)
- 报表 (3)
- Collections (6)
- SQL/JDBC (15)
- 开发类 (6)
- EJB (6)
- Email (6)
- 文件读写 (2)
- 游戏 (0)
- Flex (2)
- Generic (2)
- HIbernate (12)
- I18N (5)
- Java EE (9)
- java ME (4)
- JDK 6 (8)
- JNDI/LDAP (5)
- JSP (7)
- JSTL (2)
- 正则表达式 (2)
- 安全 (2)
- Struts2 (12)
- Spring (4)
- Web服务 (10)
- Xml (1)
- JavaScript (30)
- AJAX (7)
- 验证 (4)
- 上传下载 (1)
- office办公软件 (1)
- Android (2)
- IOS (0)
- Dubbo (3)
- memcached/redis (1)
- 小程序 (1)
- 微信公众号 (0)
最新评论
-
wf_wangfeng:
怎么我用第一种方法不行呢 alert(document.rea ...
当jsp页面完全加载完成后执行一个js函数 -
Lori_Liu:
有帮助,至少可以解决了目前所遇到的问题!谢谢..
当jsp页面完全加载完成后执行一个js函数 -
starbhhc:
String actionMessage = new Stri ...
Java读取txt文件乱码 -
starbhhc:
Sev7en_jun 写道GOOD
客气,互相交流。。
javaeye论坛规则小测验(答案)--star -
Sev7en_jun:
GOOD
javaeye论坛规则小测验(答案)--star
当删除数据出现 ORA-02292: 违反完整约束条件 (CCMS.REFWORK_AREA27) - 已找到子记录日志
-- 查询完整约束条件涉及的表和字段.
Select CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME
FROM SYS.ALL_CONS_COLUMNS A
WHERE OWNER = user
and CONSTRAINT_NAME like 'REFWORK_AREA27'
ORDER BY TABLE_NAME, CONSTRAINT_NAME, POSITION, COLUMN_NAME
-- 查询所有 sequence
Select SEQUENCE_NAME, to_char(MIN_VALUE) min_value, to_char(MAX_VALUE) max_value, INCREMENT_BY, CYCLE_FLAG, ORDER_FLAG, CACHE_SIZE, to_char(LAST_NUMBER) last_number
from SYS.USER_SEQUENCES
where 1=1
-- 查询所有表名 及其物理参数
Select t.*, user owner from sys.user_all_tables t where 1=1
and ((iot_type is null) or (iot_type <> 'IOT_MAPPING'))
-- 查询单个 表 字段的
Select table_name, column_name, data_type, data_type_mod, data_type_owner,
decode(data_type, 'CHAR', char_length,
'VARCHAR', char_length,
'VARCHAR2', char_length,
'NCHAR', char_length,
'NVARCHAR', char_length,
'NVARCHAR2', char_length,
data_length) data_length,
data_precision, data_scale, nullable, char_used
, user owner
FROM SYS.USER_TAB_COLUMNS
WHERE 1=1
and table_name ='ACTIONS'
order by column_id
-- 查询所有存储过程
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PACKAGE' ;
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PACKAGE BODY' ;
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PROCEDURE'
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'FUNCTION'
-- 查询视图
Select v.view_name, v.text_length, v.text, o.status
,v.type_text, v.oid_text, v.view_type_owner, v.view_type
, superview_name
from SYS.ALL_VIEWS v, SYS.ALL_OBJECTS o
where v.owner = o.owner
and o.object_type = 'VIEW'
and v.view_name = o.object_name
and o.owner = user
-- 查询视图中的字段定义
Select COLUMN_NAME, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, TABLE_NAME, DATA_TYPE
,DATA_TYPE_MOD, DATA_TYPE_OWNER
FROM SYS.USER_TAB_COLUMNS
WHERE 1=1
and table_name = 'V_STAFF'
order by column_id
-- 查询所有存储过程,函数或包的代码
-- 对象类型 = 'PACKAGE', 'PACKAGE BODY', 'PROCEDURE', 'FUNCTION'
-- 对象名称 = 存储过程,函数或包的名称
Select
decode(SUBSTRB(text, LENGTHB(text), 1), CHR(10), SUBSTRB(text, 1, LENGTHB(text) - 1), CHR(13), SUBSTRB(text, 1, LENGTHB(text) - 1), text) as text
from SYS.USER_SOURCE
where 1=1
and type = 对象类型
and name = 对象名称
order by line;
-- 查询所有的索引名称,及其字段
Select INDEX_NAME, COLUMN_NAME, COLUMN_LENGTH, TABLE_OWNER, TABLE_NAME, COLUMN_POSITION
, DESCEND
FROM SYS.ALL_IND_COLUMNS
WHERE INDEX_OWNER = user
ORDER BY INDEX_NAME, COLUMN_POSITION;
-- 查询所有表定义的 注释
Select c.TABLE_NAME, NULL COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_TAB_COMMENTS c, SYS.ALL_TABLES t
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
-- 查询所有表 的所有字段的 注释
Select c.TABLE_NAME, c.COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_COL_COMMENTS c, SYS.ALL_TAB_COLUMNS t
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
and c.COLUMN_NAME = t.COLUMN_NAME
-- 查询所有视图的 注释
Select c.TABLE_NAME, NULL COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_TAB_COMMENTS c, SYS.ALL_VIEWS v
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = v.OWNER
and c.TABLE_NAME = V.VIEW_NAME;
-- 查询所有视图的所有字段的 注释
Select c.TABLE_NAME, c.COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_COL_COMMENTS c, SYS.ALL_VIEWS v
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = V.OWNER
and c.TABLE_NAME = V.VIEW_NAME;
-- 查询 所有 的约束的 表名 及其字段
DECLARE
TYPE rslt_tbl IS TABLE OF VARCHAR2 (98)
INDEX BY BINARY_INTEGER;
rslt1 rslt_tbl;
rslt_size NUMBER;
i NUMBER;
CURSOR cs
IS
SELECT c.constraint_name, c.table_name, cc.column_name, c.search_condition
FROM SYS.all_constraints c, SYS.all_cons_columns cc
WHERE c.owner = cc.owner
AND c.table_name = cc.table_name
AND c.constraint_name = cc.constraint_name
AND c.constraint_type = 'C'
AND c.owner = USER;
cs_var cs%ROWTYPE;
PROCEDURE addit (in_str VARCHAR2)
IS
BEGIN
rslt_size := rslt_size + 1;
rslt1 (rslt_size) := in_str;
DBMS_OUTPUT.put_line ('---> ' || in_str);
END;
BEGIN
rslt_size := 0;
FOR cs_var IN cs LOOP
IF (cs_var.search_condition = cs_var.column_name || ' IS NOT NULL')
OR (cs_var.search_condition = '"' || cs_var.column_name || '" IS NOT NULL') THEN
addit ( cs_var.constraint_name
|| '.TN='
|| cs_var.table_name
|| '.CN='
|| cs_var.column_name
);
END IF;
END LOOP;
END;
-- 查询所有失效或关闭(Disable) 的约束
/* Formatted on 2005/08/13 11:44 (Formatter Plus v4.8.0) */
DECLARE
TYPE rslt_tbl IS TABLE OF VARCHAR2 (255)
INDEX BY BINARY_INTEGER;
rslt1 rslt_tbl;
rslt_size NUMBER;
CURSOR c
IS
SELECT c.constraint_name, cc.column_name, c.search_condition, c.GENERATED, c.owner,
c.table_name
FROM SYS.all_cons_columns cc, SYS.all_constraints c
WHERE c.owner = cc.owner
AND c.constraint_name = cc.constraint_name
AND c.table_name = cc.table_name
AND c.owner = USER
AND c.constraint_type = 'C'
ORDER BY 1, 2;
c_var c%ROWTYPE;
s VARCHAR2 (255);
LAST VARCHAR2 (32);
nbl VARCHAR2 (1);
PROCEDURE addit (in_str VARCHAR2)
IS
BEGIN
rslt_size := rslt_size + 1;
rslt1 (rslt_size) := in_str;
DBMS_OUTPUT.put_line ('---> ' || in_str);
END;
BEGIN
s := NULL;
LAST := '!';
rslt_size := 0;
FOR c_var IN c LOOP
nbl := 'Y';
IF (c_var.GENERATED <> 'USER NAME')
AND ( (c_var.search_condition = '"' || c_var.column_name || '" IS NOT NULL')
OR (c_var.search_condition = c_var.column_name || ' IS NOT NULL')
) THEN
SELECT nullable
INTO nbl
FROM all_tab_columns
WHERE owner = c_var.owner
AND table_name = c_var.table_name
AND column_name = c_var.column_name;
END IF;
IF (c_var.GENERATED = 'USER_NAME') OR (nbl = 'Y') THEN
IF (LAST <> c_var.constraint_name)
AND (s IS NULL OR INSTR (s, '''' || c_var.constraint_name || '''') = 0) THEN
s := s || '''' || c_var.constraint_name || '''' || ',';
LAST := c_var.constraint_name;
IF (LENGTH (s) >= 223) OR (LENGTHB (s) >= 223) THEN
addit (SUBSTRB (s, 1, LENGTHB (s) - 1));
s := NULL;
END IF;
END IF;
END IF;
END LOOP;
IF s IS NOT NULL THEN
addit (SUBSTRB (s, 1, LENGTHB (s) - 1));
END IF;
END;
-- 查询 指定的 约束 的信息
SELECT constraint_name, owner, table_name, constraint_type, SUBSTRB (status, 1, 1) status,
search_condition, SUBSTRB (DEFERRABLE, 1, 1) DEFERRABLE,
SUBSTRB (DEFERRED, 1, 1) DEFERRED, SUBSTRB (GENERATED, 1, 1) GENERATED, RELY
FROM SYS.all_constraints
WHERE owner = USER
AND constraint_type = 'C'
AND constraint_name IN ('SYS_C003296')
-- 查询 约束类型为xxx 的信息
-- 约束类型 P:未知 U:未知 R:relation, C:column
Select CONSTRAINT_NAME, OWNER, TABLE_NAME, CONSTRAINT_TYPE, SUBSTRB(STATUS, 1, 1) STATUS
, SUBSTRB(DEFERRABLE, 1, 1) deferrable, SUBSTRB(DEFERRED, 1, 1) deferred, SUBSTRB(GENERATED, 1, 1) generated
, RELY
FROM SYS.ALL_CONSTRAINTS
WHERE OWNER = user
AND CONSTRAINT_TYPE = 'P'
-- 查询约束的表名,字段名
Select TABLE_NAME, COLUMN_NAME
FROM USER_CONS_COLUMNS A
WHERE CONSTRAINT_NAME = 'SYS_C003297'
ORDER BY TABLE_NAME, POSITION
Select CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME
FROM SYS.ALL_CONS_COLUMNS A
WHERE OWNER = user
ORDER BY TABLE_NAME, CONSTRAINT_NAME, POSITION, COLUMN_NAME
-- 查询所有外键约束的引用关系
Select cfk.OWNER, cfk.TABLE_NAME name, 'FOREIGN KEY' TYPE,
'TABLE' referenced_type, ct.OWNER referenced_owner,
ct.TABLE_NAME referenced_name, null referenced_link_name, cfk.constraint_name
FROM SYS.ALL_CONSTRAINTS cfk, SYS.ALL_CONSTRAINTS ct
where cfk.OWNER = user
and ct.OWNER = cfk.R_OWNER
and cfk.CONSTRAINT_TYPE = 'R'
and cfk.r_CONSTRAINT_NAME = ct.CONSTRAINT_NAME
-- 查询所有的 JOB
Select *
from ALL_JOBS
where log_user = user
-- 查询 存储过程,视图的引用关系
SELECT /*+ ALL_ROWS */
NAME, TYPE, referenced_owner, referenced_name, referenced_type, referenced_link_name
FROM SYS.all_dependencies
WHERE owner = USER
AND owner || NAME || TYPE <> referenced_owner || referenced_name || TYPE
AND TYPE IN
('FUNCTION',
'INDEX',
'MATERIALIZED VIEW',
'SNAPSHOT',
'PACKAGE',
'PACKAGE BODY',
'PROCEDURE',
'TRIGGER',
'TABLE',
'TYPE',
'TYPE BODY',
'VIEW'
)
ORDER BY NAME;
-- 查询完整约束条件涉及的表和字段.
Select CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME
FROM SYS.ALL_CONS_COLUMNS A
WHERE OWNER = user
and CONSTRAINT_NAME like 'REFWORK_AREA27'
ORDER BY TABLE_NAME, CONSTRAINT_NAME, POSITION, COLUMN_NAME
-- 查询所有 sequence
Select SEQUENCE_NAME, to_char(MIN_VALUE) min_value, to_char(MAX_VALUE) max_value, INCREMENT_BY, CYCLE_FLAG, ORDER_FLAG, CACHE_SIZE, to_char(LAST_NUMBER) last_number
from SYS.USER_SEQUENCES
where 1=1
-- 查询所有表名 及其物理参数
Select t.*, user owner from sys.user_all_tables t where 1=1
and ((iot_type is null) or (iot_type <> 'IOT_MAPPING'))
-- 查询单个 表 字段的
Select table_name, column_name, data_type, data_type_mod, data_type_owner,
decode(data_type, 'CHAR', char_length,
'VARCHAR', char_length,
'VARCHAR2', char_length,
'NCHAR', char_length,
'NVARCHAR', char_length,
'NVARCHAR2', char_length,
data_length) data_length,
data_precision, data_scale, nullable, char_used
, user owner
FROM SYS.USER_TAB_COLUMNS
WHERE 1=1
and table_name ='ACTIONS'
order by column_id
-- 查询所有存储过程
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PACKAGE' ;
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PACKAGE BODY' ;
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'PROCEDURE'
Select * from SYS.ALL_OBJECTS where owner = user AND OBJECT_TYPE = 'FUNCTION'
-- 查询视图
Select v.view_name, v.text_length, v.text, o.status
,v.type_text, v.oid_text, v.view_type_owner, v.view_type
, superview_name
from SYS.ALL_VIEWS v, SYS.ALL_OBJECTS o
where v.owner = o.owner
and o.object_type = 'VIEW'
and v.view_name = o.object_name
and o.owner = user
-- 查询视图中的字段定义
Select COLUMN_NAME, DATA_LENGTH, DATA_PRECISION, DATA_SCALE, NULLABLE, TABLE_NAME, DATA_TYPE
,DATA_TYPE_MOD, DATA_TYPE_OWNER
FROM SYS.USER_TAB_COLUMNS
WHERE 1=1
and table_name = 'V_STAFF'
order by column_id
-- 查询所有存储过程,函数或包的代码
-- 对象类型 = 'PACKAGE', 'PACKAGE BODY', 'PROCEDURE', 'FUNCTION'
-- 对象名称 = 存储过程,函数或包的名称
Select
decode(SUBSTRB(text, LENGTHB(text), 1), CHR(10), SUBSTRB(text, 1, LENGTHB(text) - 1), CHR(13), SUBSTRB(text, 1, LENGTHB(text) - 1), text) as text
from SYS.USER_SOURCE
where 1=1
and type = 对象类型
and name = 对象名称
order by line;
-- 查询所有的索引名称,及其字段
Select INDEX_NAME, COLUMN_NAME, COLUMN_LENGTH, TABLE_OWNER, TABLE_NAME, COLUMN_POSITION
, DESCEND
FROM SYS.ALL_IND_COLUMNS
WHERE INDEX_OWNER = user
ORDER BY INDEX_NAME, COLUMN_POSITION;
-- 查询所有表定义的 注释
Select c.TABLE_NAME, NULL COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_TAB_COMMENTS c, SYS.ALL_TABLES t
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
-- 查询所有表 的所有字段的 注释
Select c.TABLE_NAME, c.COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_COL_COMMENTS c, SYS.ALL_TAB_COLUMNS t
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = t.OWNER
and c.TABLE_NAME = t.TABLE_NAME
and c.COLUMN_NAME = t.COLUMN_NAME
-- 查询所有视图的 注释
Select c.TABLE_NAME, NULL COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_TAB_COMMENTS c, SYS.ALL_VIEWS v
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = v.OWNER
and c.TABLE_NAME = V.VIEW_NAME;
-- 查询所有视图的所有字段的 注释
Select c.TABLE_NAME, c.COLUMN_NAME, c.COMMENTS
FROM SYS.ALL_COL_COMMENTS c, SYS.ALL_VIEWS v
WHERE c.OWNER = user
AND c.COMMENTS IS NOT NULL
and c.OWNER = V.OWNER
and c.TABLE_NAME = V.VIEW_NAME;
-- 查询 所有 的约束的 表名 及其字段
DECLARE
TYPE rslt_tbl IS TABLE OF VARCHAR2 (98)
INDEX BY BINARY_INTEGER;
rslt1 rslt_tbl;
rslt_size NUMBER;
i NUMBER;
CURSOR cs
IS
SELECT c.constraint_name, c.table_name, cc.column_name, c.search_condition
FROM SYS.all_constraints c, SYS.all_cons_columns cc
WHERE c.owner = cc.owner
AND c.table_name = cc.table_name
AND c.constraint_name = cc.constraint_name
AND c.constraint_type = 'C'
AND c.owner = USER;
cs_var cs%ROWTYPE;
PROCEDURE addit (in_str VARCHAR2)
IS
BEGIN
rslt_size := rslt_size + 1;
rslt1 (rslt_size) := in_str;
DBMS_OUTPUT.put_line ('---> ' || in_str);
END;
BEGIN
rslt_size := 0;
FOR cs_var IN cs LOOP
IF (cs_var.search_condition = cs_var.column_name || ' IS NOT NULL')
OR (cs_var.search_condition = '"' || cs_var.column_name || '" IS NOT NULL') THEN
addit ( cs_var.constraint_name
|| '.TN='
|| cs_var.table_name
|| '.CN='
|| cs_var.column_name
);
END IF;
END LOOP;
END;
-- 查询所有失效或关闭(Disable) 的约束
/* Formatted on 2005/08/13 11:44 (Formatter Plus v4.8.0) */
DECLARE
TYPE rslt_tbl IS TABLE OF VARCHAR2 (255)
INDEX BY BINARY_INTEGER;
rslt1 rslt_tbl;
rslt_size NUMBER;
CURSOR c
IS
SELECT c.constraint_name, cc.column_name, c.search_condition, c.GENERATED, c.owner,
c.table_name
FROM SYS.all_cons_columns cc, SYS.all_constraints c
WHERE c.owner = cc.owner
AND c.constraint_name = cc.constraint_name
AND c.table_name = cc.table_name
AND c.owner = USER
AND c.constraint_type = 'C'
ORDER BY 1, 2;
c_var c%ROWTYPE;
s VARCHAR2 (255);
LAST VARCHAR2 (32);
nbl VARCHAR2 (1);
PROCEDURE addit (in_str VARCHAR2)
IS
BEGIN
rslt_size := rslt_size + 1;
rslt1 (rslt_size) := in_str;
DBMS_OUTPUT.put_line ('---> ' || in_str);
END;
BEGIN
s := NULL;
LAST := '!';
rslt_size := 0;
FOR c_var IN c LOOP
nbl := 'Y';
IF (c_var.GENERATED <> 'USER NAME')
AND ( (c_var.search_condition = '"' || c_var.column_name || '" IS NOT NULL')
OR (c_var.search_condition = c_var.column_name || ' IS NOT NULL')
) THEN
SELECT nullable
INTO nbl
FROM all_tab_columns
WHERE owner = c_var.owner
AND table_name = c_var.table_name
AND column_name = c_var.column_name;
END IF;
IF (c_var.GENERATED = 'USER_NAME') OR (nbl = 'Y') THEN
IF (LAST <> c_var.constraint_name)
AND (s IS NULL OR INSTR (s, '''' || c_var.constraint_name || '''') = 0) THEN
s := s || '''' || c_var.constraint_name || '''' || ',';
LAST := c_var.constraint_name;
IF (LENGTH (s) >= 223) OR (LENGTHB (s) >= 223) THEN
addit (SUBSTRB (s, 1, LENGTHB (s) - 1));
s := NULL;
END IF;
END IF;
END IF;
END LOOP;
IF s IS NOT NULL THEN
addit (SUBSTRB (s, 1, LENGTHB (s) - 1));
END IF;
END;
-- 查询 指定的 约束 的信息
SELECT constraint_name, owner, table_name, constraint_type, SUBSTRB (status, 1, 1) status,
search_condition, SUBSTRB (DEFERRABLE, 1, 1) DEFERRABLE,
SUBSTRB (DEFERRED, 1, 1) DEFERRED, SUBSTRB (GENERATED, 1, 1) GENERATED, RELY
FROM SYS.all_constraints
WHERE owner = USER
AND constraint_type = 'C'
AND constraint_name IN ('SYS_C003296')
-- 查询 约束类型为xxx 的信息
-- 约束类型 P:未知 U:未知 R:relation, C:column
Select CONSTRAINT_NAME, OWNER, TABLE_NAME, CONSTRAINT_TYPE, SUBSTRB(STATUS, 1, 1) STATUS
, SUBSTRB(DEFERRABLE, 1, 1) deferrable, SUBSTRB(DEFERRED, 1, 1) deferred, SUBSTRB(GENERATED, 1, 1) generated
, RELY
FROM SYS.ALL_CONSTRAINTS
WHERE OWNER = user
AND CONSTRAINT_TYPE = 'P'
-- 查询约束的表名,字段名
Select TABLE_NAME, COLUMN_NAME
FROM USER_CONS_COLUMNS A
WHERE CONSTRAINT_NAME = 'SYS_C003297'
ORDER BY TABLE_NAME, POSITION
Select CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME
FROM SYS.ALL_CONS_COLUMNS A
WHERE OWNER = user
ORDER BY TABLE_NAME, CONSTRAINT_NAME, POSITION, COLUMN_NAME
-- 查询所有外键约束的引用关系
Select cfk.OWNER, cfk.TABLE_NAME name, 'FOREIGN KEY' TYPE,
'TABLE' referenced_type, ct.OWNER referenced_owner,
ct.TABLE_NAME referenced_name, null referenced_link_name, cfk.constraint_name
FROM SYS.ALL_CONSTRAINTS cfk, SYS.ALL_CONSTRAINTS ct
where cfk.OWNER = user
and ct.OWNER = cfk.R_OWNER
and cfk.CONSTRAINT_TYPE = 'R'
and cfk.r_CONSTRAINT_NAME = ct.CONSTRAINT_NAME
-- 查询所有的 JOB
Select *
from ALL_JOBS
where log_user = user
-- 查询 存储过程,视图的引用关系
SELECT /*+ ALL_ROWS */
NAME, TYPE, referenced_owner, referenced_name, referenced_type, referenced_link_name
FROM SYS.all_dependencies
WHERE owner = USER
AND owner || NAME || TYPE <> referenced_owner || referenced_name || TYPE
AND TYPE IN
('FUNCTION',
'INDEX',
'MATERIALIZED VIEW',
'SNAPSHOT',
'PACKAGE',
'PACKAGE BODY',
'PROCEDURE',
'TRIGGER',
'TABLE',
'TYPE',
'TYPE BODY',
'VIEW'
)
ORDER BY NAME;
发表评论
-
mysql创建用户并授权
2016-09-04 23:42 6021.新建用户。 //登录MYSQL mysql -u ... -
java实现文件转换成二进制存储与取出
2016-08-06 01:21 2725一、功能描述: 将文件转成二进制数据放入数据库中,需要的 ... -
Mongodb的全面总结
2016-07-14 16:35 1396MongoDB的官方文档基本是how to do的介绍,而关 ... -
Navicat连接Oracle数据库时报错ORA-28547
2016-07-12 15:46 702用Navicat连接Oracle数据库时出现如下错误提示: ... -
4.ubuntu14.04 安装mongodb笔记
2016-05-06 08:52 6651、使用系统自动获取安装。 1)获取更新 s ... -
3.mongdb mongdb的shell命令
2016-04-14 11:10 982在mongdb的安装目录,运行mongo.exe,运 ... -
2.mongdb mongdb客户端使用
2016-04-14 10:26 784robomongo,命令行方便 ... -
1. WIN7下安装运行mongodb
2016-04-14 10:11 5341)、下载MongoDBhttp://downloads. ... -
mysql 与mongodb的特点与优劣
2016-04-13 17:37 974介绍: MongoDB是 ... -
报错:1130-host ... is not allowed to connect to this MySql server 开放mysql远程连接 不使用l
2015-07-06 13:16 816报错:1130-host ... is not allow ... -
sql查询今天、昨天、本周、本月、日期的
2015-05-15 10:55 1787sql 求解两个时间差 SELECTDATEDIFF ... -
druid demo
2015-04-08 15:13 1600java程序很大一部分要操作数据库,为了提高性能操作数据库的 ... -
Druid数据库连接池使用
2015-04-08 15:03 723阿里巴巴推出的国产数据库连接池,据网上测试对比,比目前的D ... -
Hibernate与 MyBatis的比较
2015-03-20 00:34 637mybatis是半自动的,hibernate是全自动的,就是 ... -
经典SQL语句大全
2015-01-16 01:02 557一、基础 1、说明:创建数据库CREATE DATABAS ... -
MyBatis的几种批量操作
2015-01-11 22:59 1685MyBatis中批量插入 方法一: &l ... -
spring与mybatis三种整合方法
2015-01-11 22:58 485本文主要介绍Spring与Mybatis三种常用整合方法, ... -
MyBatis(六)、MyBatis主配置文件
2015-01-11 22:58 686在定义sqlSessionFactory时需要指定MyBa ... -
MyBatis(五)、动态SQL语句
2015-01-09 01:01 724有些时候,sql语句where条件中,需要一些安全判断,例 ... -
MyBatis(四)、SQL语句映射文件(2)增删改查、参数、缓存
2015-01-09 01:00 5212.2 select 一个select 元素非常简单。例如 ...
相关推荐
OracleDBA常用语句集粹
以下是一些ORACLE DBA常用的SQL语句,这些语句涵盖了数据库管理和优化的核心方面: 1. **数据查询**: - `SELECT`:用于从表中检索数据,可以结合`WHERE`子句过滤结果,`GROUP BY`进行分组,`ORDER BY`进行排序,`...
以下是一些Oracle DBA常用的SQL语句和相关知识点: 1. **监控数据库性能** - `监控数据库性能的SQL.sql`: 这可能包含`V$SESSION`, `V$INSTANCE`, `V$SESSION_WAIT`等视图的查询,用于检查当前会话的状态,等待事件...
在IT领域,尤其是在数据库管理与开发中,Oracle作为一款广泛使用的数据库管理系统,其经典常用的SQL语句对于数据库管理员(DBA)以及开发人员而言至关重要。本文将深入解析Oracle中的关键SQL语句,涵盖表约束、索引...
Oracle数据库DBA(Database Administrator)是负责Oracle数据库系统运行管理的专业技术人员。在准备面试Oracle数据库管理员岗位时,掌握相关的技术知识和处理问题的能力是非常重要的。以下是针对给定的Oracle数据库...
Oracle DBA在日常工作中会频繁使用SQL语句来管理和监控数据库。以下是一些常见的Oracle DBA SQL命令,它们涵盖了表空间、数据文件、回滚段、控制文件、日志文件、会话信息、字符集、SQL优化方式以及系统状态等多个...
Oracle 9i数据库管理员手册是一本专为管理Oracle 9i数据库系统设计的全面指南,旨在帮助数据库管理员(DBA)有效地维护、优化和管理Oracle数据库。Oracle 9i是Oracle公司于2001年发布的一个重要版本,它引入了许多...
本文将深入探讨Oracle中常用的SQL语句以及与数据库表空间相关的维护知识。 首先,让我们了解如何在Oracle中创建表空间。表空间是Oracle数据库中存储数据的逻辑单位,它由一个或多个数据文件组成。创建表空间的SQL...
Oracle企业DBA(Database Administrator)性能优化是数据库管理领域中的核心任务,对于保障系统的高效运行至关重要。Oracle数据库作为全球广泛使用的数据库系统,其性能优化涉及多个层面,包括SQL查询优化、存储优化...
根据提供的信息,我们可以总结出以下Oracle数据库中常用的SQL查询语句及它们的功能: ### 1. 查询表空间及其总大小 ```sql SELECT t.tablespace_name, ROUND(SUM(bytes / (1024 * 1024)), 0) AS ts_size FROM dba...
Oracle9i数据库管理员(DBA)手册是一份详尽的指南,专为管理Oracle9i数据库系统的技术人员设计。Oracle9i是Oracle公司推出的数据库版本,它在当时引入了许多创新特性和改进,旨在提升数据库性能、可扩展性以及数据...
Oracle数据库DBA(Database Administrator)专题技术精粹涵盖了Oracle数据库管理的多个重要方面,包括但不限于系统架构、性能优化、故障排查、备份恢复、安全性管理、高可用性设计以及数据库升级等。以下是对这些...
本文将详细介绍Oracle10g DBA常用的几个数据字典视图和动态性能视图,帮助读者更好地理解和利用这些资源。 #### 一、DBA最常用的数据字典 数据字典是存储在SYSTEM表空间中的一系列特殊表,它们提供了关于数据库...
### Oracle 12c DBA Handbook 关键知识点详解 #### 一、书籍概述与作者介绍 《Oracle Database 12c DBA Handbook》是一本专为Oracle 12c数据库管理员设计的手册,由Bob Bryla撰写,并由Scott Gossett担任技术编辑...
Oracle 常用查询语句 本文总结了十个常用的 Oracle 查询语句,涵盖了查看表空间、回滚段、控制文件、日志文件、表空间使用情况、数据库对象、数据库版本、数据库创建日期、归档方式、长时间运行的 SQL 语句和数据表...
Oracle9i DBA Fundamentals I中文版是一本针对Oracle9i数据库管理员基础知识的教程,旨在帮助初学者理解和掌握Oracle数据库的基本操作与管理。这本教程分为两册,包含丰富的理论知识和实践经验,对于那些在E问(可能...
根据给定的标题“Oracle数据库DBA专题技术精粹”以及描述和标签,我们可以深入探讨Oracle数据库管理员(DBA)所需掌握的关键技术和知识点。虽然给定的部分内容并未提供具体的技术细节,但基于标题和描述,我们可以...
根据给定的文件标题“Oracle数据库DBA专题技术精粹2”和描述“Oracle数据库DBA专题技术精粹”,我们可以推断出这份资料主要聚焦于Oracle数据库管理与优化的高级技术,面向的是数据库管理员(DBA)这一专业群体。...