自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Oracle9i和Oracle10g之間構(gòu)建高級(jí)復(fù)制環(huán)境的測試用例

數(shù)據(jù)庫 Oracle
Oracle9i和Oracle10g之間有許多的共性,后者向前者兼容。因此這里我們主要介紹Oracle9i和Oracle10g之間能夠構(gòu)建高級(jí)復(fù)制環(huán)境,手動(dòng)測試的例子。

Oracle9i和Oracle10g之間有許多的共性,后者向前者兼容。因此這里我們主要介紹Oracle9i和Oracle10g之間能夠構(gòu)建高級(jí)復(fù)制環(huán)境,手動(dòng)測試的例子。

首先測試兩個(gè)數(shù)據(jù)庫的連通性:

$ sqlplus "/ as sysdba"

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Oct 31 10:36:31 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> show parameter glob

NAME TYPE VALUE
------------------------------------ ----------- ---------------------
global_context_pool_size string
global_names boolean TRUE
SQL> select * from global_name;

GLOBAL_NAME
----------------------------------------------------------------------
HSBILL.HURRAY.COM.CN

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

bash-2.03$ tnsping mars

TNS Ping Utility for Solaris: Version 9.2.0.4.0 - Production on 31-OCT-2006 10:39:41

Copyright (c) 1997 Oracle Corporation. All rights reserved.

Used parameter files:
/opt/oracle/product/9.2.0/network/admin/sqlnet.ora

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.31.110)(PORT = 1521))) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = mars)))
OK (10 msec)

兩個(gè)數(shù)據(jù)庫分別創(chuàng)建db link:
9i的數(shù)據(jù)庫:

bash-2.03$ sqlplus repadmin/repadmin

SQL*Plus: Release 9.2.0.4.0 - Production on Tue Oct 31 10:57:49 2006

Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.4.0 - Production

SQL> create public database link "MARS.HURRAY.COM.CN" connect to repadmin identified by repadmin using 'MARS';

Database link created.

SQL> select * from dual@mars;

D
-
X

10g的數(shù)據(jù)庫:

bash-2.03$ sqlplus "/ as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Tue Oct 31 10:15:20 2006

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options

SQL> select username from dba_users where username='REPADMIN';

USERNAME#p#

REPADMIN

SQL> connect repadmin/repadmin
Connected.
SQL> select * from tab;

no rows selected

SQL> select * from global_name;

GLOBAL_NAME
--------------------------------------------------------------------------------
MARS.HURRAY.COM.CN

SQL> create public database link "HSBILL.HURRAY.COM.CN" connect to repadmin identified by repadmin using 'HSBILL';

Database link created.

SQL> select * from dual@hsbill;

D
-
X

兩個(gè)數(shù)據(jù)庫分別創(chuàng)建測試表:

SQL> connect eygle/eygle
Connected.

SQL> create table eygle as select * from v$session;

Table created.

SQL> alter table eygle add (constraint pk_eygle primary key (SADDR));

Table altered.

進(jìn)行復(fù)制創(chuàng)建:

SQL> connect repadmin/repadmin
Connected.

SQL> execute dbms_repcat.create_master_repgroup('rep_910');

PL/SQL procedure successfully completed.

SQL> execute dbms_repcat.create_master_repobject(sname=>'eygle',oname=>'eygle', type=>'table',use_existing_object=>true,gname=>'rep_910',copy_rows=>false);

PL/SQL procedure successfully completed.

SQL> execute dbms_repcat.generate_replication_support('eygle','eygle','table');

PL/SQL procedure successfully completed.

SQL> execute dbms_repcat.add_master_database(gname=>'rep_910',master=>'MARS.HURRAY.COM.CN',use_existing_objects=>true, copy_rows=>false, propagation_mode => 'synchronous');

PL/SQL procedure successfully completed.

SQL> execute dbms_repcat.resume_master_activity('rep_910',true);

PL/SQL procedure successfully completed.

基本測試:

SQL> select count(*) from eygle.eygle;
COUNT(*)
----------
20

SQL> select count(*) from eygle.eygle@mars;

COUNT(*)
----------
20

SQL> delete from eygle.eygle where rownum <11;

10 rows deleted.

SQL> commit;

Commit complete.

SQL> select count(*) from eygle.eygle;

COUNT(*)
----------
10

SQL> select count(*) from eygle.eygle@mars;

COUNT(*)
----------
10

SQL> select * from v$version@mars;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bi
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for Solaris: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production

SQL> select * from v$version;

BANNER
----------------------------------------------------------------
Oracle9i Enterprise Edition Release 9.2.0.4.0 - 64bit Production
PL/SQL Release 9.2.0.4.0 - Production
CORE 9.2.0.3.0 Production
TNS for Solaris: Version 9.2.0.4.0 - Production
NLSRTL Version 9.2.0.4.0 - Production

SQL>

本例未作全面測試,僅用于說明Oracle9i和Oracle10g之間的高級(jí)復(fù)制功能上可行。感興趣的可以關(guān)注網(wǎng)站上其他相關(guān)的報(bào)道

【編輯推薦】

  1. Oracle性能診斷不能不知的秘籍
  2. 使用dtu遠(yuǎn)程連接Oracel 9i數(shù)據(jù)庫的方法
  3. Windows2000服務(wù)器下安裝Oracle9i與10g
  4. Oracle多表查詢優(yōu)化的代碼示例
  5. Oracle更改的默認(rèn)端口號(hào)剖析
責(zé)任編輯:佚名
相關(guān)推薦

2010-04-19 15:04:28

升級(jí)Oracle10g

2011-05-13 11:14:18

2011-08-01 12:50:18

LinuxOracle10GOracle11G

2010-04-01 09:22:31

Oracle9i分析函

2010-04-13 11:01:30

Oracle安裝

2011-05-20 13:50:30

oracle10g亂碼

2011-05-13 14:47:05

oracle10g亂碼問題

2010-03-31 10:22:25

Oracle10g優(yōu)化

2010-04-29 13:12:18

Oracle合并函數(shù)

2011-05-20 09:39:13

Oracle10g新特性

2010-04-28 11:00:55

2010-05-06 10:41:24

Oracle10g

2010-03-31 09:56:46

Oracle10g

2010-03-31 09:38:26

Oracle10g x

2009-07-29 15:26:43

ASP.NET連接Or

2010-02-07 13:45:29

Ubuntu orac

2010-03-31 08:51:35

Oracle 10g

2010-03-31 18:01:06

Oracle10g安裝

2011-06-28 13:26:23

Oracle數(shù)據(jù)庫ODBC

2011-05-17 14:02:44

Oracle 8高級(jí)復(fù)制
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)