在异构平台配置Oracle11g R2 Streams同时再配置相同平台的Oracle11g R2 Dataguard
集团东方时尚项目集群RAC数据库的两台HP UNIX系统Oracle11gR2数据库分别为:10.1.1.1,10.1.1.2 端口为1568 数据库名为bjoms 需要
描述:配置北京机房东方时尚项目集群RAC的数据库与东方时尚项目成都数据库的Streams数据传输,,同时配置东方时尚项目成都两台数据库之间的Dataguard,还需要在东方时尚项目成都的每个数据库中进行一次自动备份。
集团东方时尚项目集群RAC数据库的两台HP UNIX系统Oracle11gR2数据库分别为:10.1.1.1,10.1.1.2 端口为1568 数据库名为bjoms 需要配置Streams传输的用户为omSUSEr
成都两台Linux enterprise 5系统Oracle11gR2东方时尚项目数据库ip:10.2.2.1,10.2.2.2。端口为1521 数据库名为cdoms 需要配置Streams传输的用户为omsuser
集团东方时尚项目集群数据库(10.1.1.1,10.1.1.2)与 10.2.2.1 数据库进行Streams双向传输
同时需要把东方时尚项目AIX系统的数据库Oracle10gR2(10.3.3.20:1521:dfoms 用户为omsuser)的数据导入到集团东方时尚项目集群数据库和10.2.2.1 数据库中
10.2.2.1 数据库与 10.2.2.2 数据库配置Dataguard
一、配置两端的数据库Streams数据传输
1、在10.2.2.1操作,验证磁盘空间
[root@HYXXDBS01 ~]# df -lh
2、验证集体RAC数据库是否正常
可以查看数据库日志,系统日志等方式。
在10.1.1.1
3、本地tnsnames.ora
BJOMS =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.1)(PORT = 1568))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.1.1.2)(PORT = 1568))
(LOAD_BALANCE = yes)
(FAILOVER = ON)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = bjoms)
(FAILOVER_MODE =
(TYPE = Select)
(METHOD = BASIC)
)
)
)
CDOMS_10.2.2.1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.2.2.1)(PORT = 1521))
)
(CONNECT_DATA =
(SID = cdoms)
(SERVER = DEDICATED)
)
)
4、在10.3.3.20 查看有哪些表空间
select distinct tablespace_name from user_tables
5、在北京集群数据库建表空间、用户
Select * from dba_tablespaces;
--1
create tablespace MHH_YOU_SPACE
datafile '+DATADG/bjoms/datafile/MHH_YOU_SPACE01.dbf'
size 5M autoextend on
--2
create tablespace GPE_YOU_SPACE
datafile '+DATADG/bjoms/datafile/GPE_YOU_SPACE01.dbf'
size 5M autoextend on
--3
create tablespace HH_YOU_SPACE
datafile '+DATADG/bjoms/datafile/HH_YOU_SPACE01.dbf'
size 5M autoextend on
--4
create tablespace DH_YOU_SPACE
datafile '+DATADG/bjoms/datafile/DH_YOU_SPACE01.dbf'
size 5M autoextend on
--5
create tablespace DRI_YOU_SPACE
datafile '+DATADG/bjoms/datafile/DRI_YOU_SPACE01.dbf'
size 5M autoextend on
--6
create tablespace PUB_YOU_SPACE
datafile '+DATADG/bjoms/datafile/PUB_YOU_SPACE01.dbf'
size 5M autoextend on
--7
create tablespace MHH_LOB_SPACE
datafile '+DATADG/bjoms/datafile/MHH_LOB_SPACE01.dbf'
size 5M autoextend on
--8
create tablespace GPE_LOB_SPACE
datafile '+DATADG/bjoms/datafile/GPE_LOB_SPACE01.dbf'
size 5M autoextend on
--9
create tablespace HH_LOB_SPACE
datafile '+DATADG/bjoms/datafile/HH_LOB_SPACE01.dbf'
size 5M autoextend on
--10
create tablespace DH_LOB_SPACE
datafile '+DATADG/bjoms/datafile/DH_LOB_SPACE01.dbf'
size 5M autoextend on
--11
create tablespace DRI_LOB_SPACE
datafile '+DATADG/bjoms/datafile/DRI_LOB_SPACE01.dbf'
size 5M autoextend on
--12
create tablespace PUB_LOB_SPACE
datafile '+DATADG/bjoms/datafile/PUB_LOB_SPACE01.dbf'
size 5M autoextend on
建用户:
--1
create user omsuser
identified by omspassword
default tablespace pub_norm_space
grant dba to omsuser
--2
create user cdomsmd
identified by cdomsmd
default tablespace pub_norm_space
grant connect to cdomsmd
--3
create user hydt
identified by hydt
default tablespace pub_norm_space
grant connect to hydt
--4
create user cdomsread
identified by cdomsread
default tablespace pub_norm_space
grant connect to cdomsread
grant select any table to cdomsread
在10.2.2.1
6、
Select * from dba_tablespaces;
--1
create tablespace MHH_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/MHH_YOU_SPACE01.dbf'
size 5M autoextend on
--2
create tablespace GPE_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/GPE_YOU_SPACE01.dbf'
size 5M autoextend on
--3
create tablespace HH_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/HH_YOU_SPACE01.dbf'
size 5M autoextend on
--4
create tablespace DH_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/DH_YOU_SPACE01.dbf'
size 5M autoextend on
--5
create tablespace DRI_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/DRI_YOU_SPACE01.dbf'
size 5M autoextend on
--6
create tablespace PUB_YOU_SPACE
datafile '/u01/app/oracle/oradata/cdoms/PUB_YOU_SPACE01.dbf'
size 5M autoextend on
--7
create tablespace MHH_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/MHH_LOB_SPACE01.dbf'
size 5M autoextend on
--8
create tablespace GPE_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/GPE_LOB_SPACE01.dbf'
size 5M autoextend on
--9
create tablespace HH_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/HH_LOB_SPACE01.dbf'
size 5M autoextend on
--10
create tablespace DH_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/DH_LOB_SPACE01.dbf'
size 5M autoextend on
--11
create tablespace DRI_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/DRI_LOB_SPACE01.dbf'
size 5M autoextend on
--12
create tablespace PUB_LOB_SPACE
datafile '/u01/app/oracle/oradata/cdoms/PUB_LOB_SPACE01.dbf'
size 5M autoextend on
--13
select * from dba_tablespaces;
--1
create user omsuser
identified by omspassword
default tablespace pub_norm_space
grant dba to omsuser
--2
create user cdomsmd
identified by cdomsmd
default tablespace pub_norm_space
grant connect to cdomsmd
--3
create user hydt
identified by hydt
default tablespace pub_norm_space
grant connect to hydt
--4
create user cdomsread
identified by cdomsread
default tablespace pub_norm_space
grant connect to cdomsread
grant select any table to cdomsread