发布时间:2014-12-12 17:36:23
select sql_text,a.sql_id,sample_time,sql_opname,machine from v$sql a ,dba_hist_active_sess_history b where a.sql_id = b.sql_id
查询历史sql
select utl_inaddr.get_host_address('dbpay') from dual;
把主机名转换成ip
(主机名需要在hosts文件内)......【阅读全文】
发布时间:2014-10-10 09:34:20
#!/bin/bash
time=`date +%Y%m%d`
#echo "rman_backup_$time.log"
cat /home/oracle/logs/rman_backup_$time.log | mail -s "This is 141 rman logs" xuzhaowei@paypalm.cn......【阅读全文】
发布时间:2014-10-09 15:25:02
select a.owner Owner,
a.tablespace_name Tablespace,
a.segment_type Type,
a.segment_name Name,
ROUND(a.bytes / 1048676) "Size/M"
from dba_segments a
where a.owner not in
('SCOTT', 'ORACLE_OCM', 'XS$NULL', 'MDDATA', 'DIP',
'APEX_PUBLIC_USER', 'SPATIAL_CSW_ADMIN_USR', 'SPATIAL_WFS_ADMIN_USR',
'FLOWS_FILES', 'MDSYS', 'ORDSYS', 'EXFSYS', 'DBSNMP', 'WMSYS',
'APPQOSSYS', 'APEX_030200', 'OWBSYS_AUDIT', 'ORD......【阅读全文】
发布时间:2014-09-22 15:22:33
5.修改主库参数文件
*.audit_file_dest='/u01/app/admin/dbpay/adump'
*.audit_trail='db'
*.compatible='11.2.0.0.0'
*.control_files='/u01/app/oradata/dbpay/control01.ctl','/u01/app/flash_recovery_area/dbpay/control02.ctl'
*.db_block_size=8192
*.db_domain=''
*.db_file_name_convert='/u01/app/oradata/dbpay/','/u01/app/oradata/dbpay/'
*.db_name='dbpay'
*.db_recovery_file_dest='/u01/app/flash_recovery_area'
*.db_recovery_file_dest_size=4070572032
*.db_unique_name='dbpay1'
*.dia......【阅读全文】
发布时间:2014-08-20 14:05:47
装完GoldenGate后需要执行两步操作,在Source端。
Sql> alter database add supplemental log data;
Sql> alter system switch logfile;
Sql> desc v$database
Sql> select supplemental_log_data_min from v$database;
在Source和target把库都起来,并创建gg用户
Sql>create user ggusr identified by ggusr default tablespace users;
Sql>grant connect,resource to ggusr;......【阅读全文】