ITPub博客

首页 > Linux操作系统 > Linux操作系统 > STREAMS-单向复制(4)

STREAMS-单向复制(4)

原创 Linux操作系统 作者:www_xylove 时间:2013-07-29 14:01:53 0 删除 编辑

Oracle11gr2 streams replication in a two database

(流复制-单向复制-单表复制)

8. 测试数据是否同步

 DML语句测试

sqlplus hr/hr@dbmaster

select employee_id,salary from hr.employees where employee_id=100;

 

      EMPLOYEE_ID FIRST_NAME  LAST_NAME   SALARY

      100                Steven            King 24000.00

update hr.employees  set salary=1 where employee_id=100;

      EMPLOYEE_ID FIRST_NAME  LAST_NAME   SALARY

      100                Steven            King 1.00

sqlplus hr/hr@dbsnap

select employee_id,salary from hr.employees where employee_id=100;

 

      EMPLOYEE_ID FIRST_NAME  LAST_NAME   SALARY

      100                Steven            King 1.00

 

  DDL语句测试

sqlplus hr/hr@dbmaster

alter table hr.employees add text varchar2(100);

SQL> desc hr.employees;

Name           Type          Nullable Default Comments

-------------- ------------- -------- ------- --------

EMPLOYEE_ID    NUMBER(6)                              

FIRST_NAME     VARCHAR2(20)  Y                        

LAST_NAME      VARCHAR2(25)                           

EMAIL          VARCHAR2(25)                           

PHONE_NUMBER   VARCHAR2(20)  Y                        

HIRE_DATE      DATE                                   

JOB_ID         VARCHAR2(10)                            

SALARY         NUMBER(8,2)   Y                        

COMMISSION_PCT NUMBER(2,2)   Y                        

MANAGER_ID     NUMBER(6)     Y                        

DEPARTMENT_ID  NUMBER(4)     Y                        

TEXT           VARCHAR2(100) Y        

 

sqlplus hr/hr@dbsnap

SQL> desc hr.employees;

Name           Type          Nullable Default Comments

-------------- ------------- -------- ------- --------

EMPLOYEE_ID    NUMBER(6)                              

FIRST_NAME     VARCHAR2(20)  Y                        

LAST_NAME      VARCHAR2(25)                           

EMAIL          VARCHAR2(25)                           

PHONE_NUMBER   VARCHAR2(20)  Y                        

HIRE_DATE      DATE                                    

JOB_ID         VARCHAR2(10)                           

SALARY         NUMBER(8,2)   Y                        

COMMISSION_PCT NUMBER(2,2)   Y                        

MANAGER_ID     NUMBER(6)     Y                        

DEPARTMENT_ID  NUMBER(4)     Y                        

TEXT           VARCHAR2(100) Y                   

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/21266384/viewspace-767362/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2010-11-12

  • 博文量
    99
  • 访问量
    223265