一.创建远程物化视图日志 源端: CREATE MATERIALIZED VIEW LOG ON tozwdb.test tablespace tozwdb_data WITH ROWID; 二.付权限 目标库 Create user tozwdb identified by tozwdb_dev;Grant create session to tozwdb;Grant resource to tozwdb;Grant connect to tozwdb;Grant unlimited tabl
目的:实现远程数据库访问及其相应表的定时同步 一.远程数据库dblink的创建 select * from dba_db_links; select * from user_sys_privs;--查询用户权限 1.查看scott用户是否具备创建database link 权限 select * from user_sys_privs where privilege like upper('%DATABASE LINK%') AND USERNAME='SCOTT'; 2.授权dblink gr
1.创建DBLINK -- Drop existing database link drop public database link LQPVPUB; -- Create database link CONNECT using "LQPVPUB" 2.创建物化视图日志(远程主机操作) CREATE MATERIALIZED VIEW LOG ON dm_basicmodel WITH PRIMARY KEY INCLUDING NEW VALUES; 3.创建物化视图 CREATE
1.获取正在执行的sql语句.sql语句的执行时间.sql语句的等待事件: select a.sql_text,b.status,b.last_call_et,b.machine,b.event,b.program from v$sql a,v$session b where a.sql_id=b.sql_id 2.获取sql语句执行时间: select sql_text,cpu_time/1000/1000 t_cpu,trunc(elapsed_time/1000/1000) t_elaps