暂无图片
暂无图片
暂无图片
暂无图片
暂无图片
在线重定义
664
5页
3次
2020-03-07
5墨值下载
SQL> create table xwtest.test as select * from dba_tables;
Table created.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 -
64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@xwtest ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Nov 20 02:20:04 2019
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> delete from xwtest.test;
2808 rows deleted.
SQL> commit;
Commit complete.
SQL> insert into xwtest.test select * from dba_tables where owner='SYS';
1015 rows created.
SQL> commit;
Commit complete.
SQL> delete from xwtest.test;
1015 rows deleted.
SQL> insert into xwtest.test select * from dba_tables where owner='SYS';
1015 rows created.
SQL> delete from xwtest.test;
1015 rows deleted.
SQL> insert into xwtest.test select * from dba_tables where owner='SYS';
1015 rows created.
SQL> delete from xwtest.test;
1015 rows deleted.
SQL> insert into xwtest.test select * from dba_tables where owner='SYS';
1015 rows created.
SQL> commit;
Commit complete.
SQL> alter table xwtest.test add constraint pk_student primary key(TABLE_NAME);
Table altered.
set lines 200
set pages 1000
-- check indexes
col column_name for a16
col index_name for a18
col index_type for a8
col table_name format a16
col constraint_name format a16
col constraint_type format a16
col grantee format a24
col segment_name format a18
spool /tmp/before.log
select i.index_name,
i.index_type,
i.uniqueness,
c.column_position,
c.column_name
from dba_indexes i,dba_ind_columns c
where i.index_name=c.index_name
and i.owner=c.index_owner
and i.table_owner='XWTEST'
and i.table_name='TEST'
order by 1,2,3,4;
-- check constraints
select table_name,
constraint_name,
constraint_type
from dba_constraints
where owner='XWTEST'
and table_name='TEST'
order by 1,2,3;
-- check table privs
select owner,table_name,grantee
from dba_tab_privs
where owner='XWTEST'
and table_name='TEST'
order by 1,2,3;
-- check columns privs
select owner,
table_name,
column_name,
grantee
from dba_col_privs
where owner='XWTEST'
and table_name='TEST'
order by 1,2,3;
-- check segment size
select segment_name,
bytes/1024/1024 as size_MB,
blocks,extents
of 5
5墨值下载
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文档的来源(墨天轮),文档链接,文档作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论

关注
最新上传
暂无内容,敬请期待...
下载排行榜
Top250 周榜 月榜