#目标用户
sqlplus / as sysdba
create user test identified by test default tablespace apps;
grant connect,resource,select any dictionary to test;
#模拟正在运行的SQL
select sid from v$mystat where rownum=1;
declare
n int;
begin
for i in 1..1000 loop
execute immediate 'select count(0) from dba_objects where object_type in(''TABLE'',''VIEW'') and object_name like ''%CON%''' into n;
end loop;
end;
select sid from v$mystat where rownum=1;
declare
n int;
begin
for i in 1..1000000 loop
execute immediate 'select owner,object_type,object_name from dba_objects where owner=''SYS'' and object_type in(''TABLE'',''VIEW'') and object_name like ''%CON%'' order by owner,object_type,object_name' ;
end loop;
end;
select a.tablespace_name,
round(sum(a.bytes)/1024/1024,2) as "TOTAL_SIZE(MB)",
round(sum(b.bytes)/1024/1024,2) as "FREE_SIZE(MB)",
round(1-sum(b.bytes)/sum(a.bytes),4)*100||'%' as "USAGE_RATE",
case when 1-round(sum(b.bytes)/sum(a.bytes),4)>dp_mon_build.get_mon_threshold('TABLESPACE_USAGE_RATE') then 1 else 0 end as "IF_WARN"
from dba_data_files a,dba_free_space b
where a.TABLESPACE_NAME=b.TABLESPACE_NAME
group by a.tablespace_name
truncate table mon_log;
truncate table mon_log_detail;
select * from MON_THRESHOLD for update
select * from mon_script for update
select * from mon_log;
select * from mon_log_detail;
truncate table secure;
insert into secure select * from dba_objects;
insert into secure select * from secure;
insert into secure select * from secure;
insert into secure select * from secure;
insert into secure select * from secure;
commit;
select count(0) from syn_log where if_syn='N' and tname='LX2' order by syn_id;
update syn_log set if_syn='N' where tname='LX2';
select sum(decode(otype,'I',1,0)) as ins_rec,
sum(decode(otype,'U',1,0)) as upd_rec,
sum(decode(otype,'D',1,0)) as del_rec,
sum(decode(otype,'DDL',1,0)) as ddl_rec
from SYN_LOG where if_syn='N' and tname='LX2'
select count(0) from syn_log
where if_syn='N'
and tname='LX2'
and ddl_stat like '%CREATE%' and ddl_stat like '%TABLE%'
select * from syn_log where if_syn='N' and tname='LX2' order by syn_id;
and syn_id between 154 and 1000
alter session set db_file_multiblock_read_count=256;
select dp_syn_build.gen_syn_sql(syn_id) as exec_sql,syn_id,if_syn,
decode(otype,'D','DML','I','DML','U','DML',otype) as otype
from SYN_LOG
where if_syn='N' and tname='LX2'
order by syn_id
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Oclient V1.0工具是通过Python3.6编写的一款Oracle数据库运维工具,设计目的是为了提升Oracle数据库管理员,或数据库运维人员工作效率,降低运维成本。 Oclient V2.0在Oclient V1.0基础上主要增加了多表传输,多表同步,新增支持DDL同步;同时修增加异常锁,大事务,会话详情等实用功能,方便运维人员定位问题。常用功能输入错误时增加了友好提示。最后修改了许多BUG更进一步增强了Oclient工具的可用性和健壮性。 Oclient V3.0在Oclient V2.0基础上增加了异构数据库之间的传输、同步功能;增加了对Oracle数据库的自动化运维功能。并对上一版本的部分功能进行优化改进。
资源推荐
资源详情
资源评论
收起资源包目录
oclient.rar (14个子文件)
oclient
sql
table
external_table.txt 1KB
cre_mon_tab.sql 2KB
package
dp_mon_build.pck 18KB
dp_syn_build.pck 132KB
dp_ops_build.pck 12KB
test
beauty.txt 6KB
test.sql 4KB
script
ins_mon_script.sql 997B
trigger
cre_tri.sql 193B
grant
grant.sql 144B
readme.txt 3KB
doc
Oracle运维工具oclient V3.0 使用手册.docx 252KB
config.ini 2KB
oclient.py 65KB
共 14 条
- 1
资源评论
天高任马飞
- 粉丝: 6
- 资源: 21
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功