然后启动Linux和Windows平台上的Oracle Listener以及数据库,并通过Sqlplus验证一下相关的节点是否可以成功访问到对应的Oracle数据库。
在Linux上配置hosts文件,将Windows对应到一个别名’canoe’,方便后面的Replication设置
[root@west-mountain etc]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost west-mountain
192.168.154.128 west-mountain
192.168.154.1 canoe
在Linux平台上的Oracle中test用户下创建Student以及Student_Course表
[oracle@west-mountain admin]$ sqlplus test/test@orcllin
SQL*Plus: Release 10.2.0.1.0 - Production on Sat May 24 09:57:38 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> create table student (…)
SQL>insert into student values(…)
SQL> create table student_course (…)
SQL> insert into student_course values(…)
SQL> commit;
SQL> select * from student;
STUDENT_ STUDENT_NAME ENROLL_DA
——– ———— ———
20030331 John 10-SEP-03
20030307 Chris 10-SEP-03
20040318 Tom 10-SEP-04
20060326 Scott 10-SEP-06
20070337 Andrew 10-SEP-07
20080315 Michael 10-SEP-08
6 rows selected.
SQL> select * from student_course;
COURSE_I STUDENT_ MARK
——– ——– ———-
1001 20030331 90
1002 20030331 89
1003 20030331 70
1004 20030331 88
1001 20070337 60
1002 20070337 59
1003 20070337 42
1004 20070337 28
1001 20080315 86
1002 20080315 89
1003 20080315 72
1004 20080315 98
12 rows selected.
同样的操作在Windows平台上的Oracle上做一遍,即创建同样的表,并插入同样的初始化数据。
到目前为止,两个Oracle上都已经建好相应的表,并且数据也一样。三个TimesTen的DataStore也已经配置好。