I tested Stream over the past two days and found some information on the Internet. I collected some information about mongolerac. After the test, I sorted out the results and shared them. You have time.
I tested Stream over the past two days and found some information on the Internet. I collected some information about Oracle RAC and tested it. I sorted out the results and shared them. You have time.
I tested Stream over the past two days and found some information on the Internet to collect some information about Oracle RAC. After the test, I sorted out the results and shared them, you can try it yourself if you have time.
1. Basic Environment
1.1 source database
Operating System: windows XP
IP Address: 10.80.88.35
Database: Oracle 10.2.0.1.0
ORACLE_SID: sttest
Global_name: STTEST. REGRESS. RDBMS. DEV. US. ORACLE. COM
1.2 target database
Operating System: windows 7
IP Address: 10.80.88.231
Database: Oracle 11.2.0.1.0
ORACLE_SID: orcl
Global_name: ORCL. REGRESS. RDBMS. DEV. US. ORACLE. COM
1.3 replication planning will determine how to configure
Copy all objects under the jiang user in the sttest Library to the orcl library, using local capture and unidirectional replication.
2. Configure the environment
2.1 set initialization parameters in pfile. Both the source and target databases must be set.
Aq_tm_processes = 2
Global_names = true
Job_queue_processes = 10
Parallel_max_servers = 20
Undo_retention = 3600
Nls_date_format = 'yyyy-MM-DD HH24: MI: ss'
Stream s_pool_size = 160 M
Utl_file_dir = '*'
Open_links = 4
# Setting the archive directory and format
Log_archive_dest_1 = 'location = ......'
Log_archive_format = 'arc % S _ % R. % t'
Restart the database with pfile and set the database to archive.
Shutdown immediate;
Start nomount pfile = '......';
Create spfile from pfile = ......'';
Alter database mount;
Alter database archivelog;
Alter database open;
2.2 configure TNS
ORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.80.88.231) (PORT = 1522 ))
)
(CONNECT_DATA =
(SERVICE_NAME = orcl)
)
)
STTEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = lenovo-jy) (PORT = 1521 ))
(ADDRESS = (PROTOCOL = TCP) (HOST = lenovo-jy) (PORT = 1522 ))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = sttest)
)
)
2.3 create a stream management user
2.3.1 create a master environment stream management user on the source database
Create tablespace streams_tbs datafile 'd: \ oracle \ oradata \ sttest \ streams_tbs.dbf' size 200 M autoextend on;
Execute dbms_logmnr_d.set_tablespace ('streams _ tbs ');
Create user strmadmin identified by STRMADMIN default tablespace streams_tbs temporary tablespace temp;
Grant connect, resource, dba, aq_administrator_role to strmadmin;
Begin
Dbms_streams_auth.grant_admin_privilege (
Grantee => 'strmadmin ',
Grant_privileges => true );
End;
/
2.3.2 create a stream management user from the environment on the target database. Because the target database is 11 GB, the password should be capitalized. Otherwise, the database link created to the target database will not be connected.
Create tablespace streams_tbs datafile 'e: \ app \ root \ oradata \ orcl \ streams_tbs.dbf' size 200 M autoextend on;
Execute dbms_logmnr_d.set_tablespace ('streams _ tbs ');
Create user strmadmin identified by STRMADMIN default tablespace streams_tbs temporary tablespace temp;
Grant connect, resource, dba, aq_administrator_role to strmadmin;
Begin
Dbms_streams_auth.grant_admin_privilege (
Grantee => 'strmadmin ',
Grant_privileges => true );
End;
/
2.4 enable append Log. You can enable Supplemental Log based on the Database or Table level. In an Oracle Stream environment that is replicated Based on Schema granularity, if you confirm that all tables in the Schema have a reasonable Primary Key, you do not need to enable the append log.
Alter database add supplemental log data;
Alter table add supplement log group log_group_name (table_column_name) always;
2.5 create a DBlink. The name of the database chain created for the master database must be the same as the global_name name of the slave database.
2.5.1 create a primary database chain
Alter database rename global_name to STTEST. REGRESS. RDBMS. DEV. US. ORACLE. COM;
Connectstrmadmin/STRMADMIN @ sttest
Create database link orcl. REGRESS. RDBMS. DEV. US. ORACLE. com connect to strmadmin identified by strmadmin using 'orcl ';
2.5.2 create a slave database chain
Alter database rename global_name to ORCL. REGRESS. RDBMS. DEV. US. ORACLE. COM;
Connectstrmadmin/STRMADMIN @ orcl
Create database link sttest. REGRESS. RDBMS. DEV. US. ORACLE. com connect to strmadmin identified by strmadmin using 'sttest ';
2.6 create a Source queue
2.6.1 create a Master Source queue on the Source database
Connectstrmadmin/STRMADMIN @ sttest
Begin
Dbms_streams_adm.set_up_queue (
Queue_table => 'sttest _ queue_table ',
Queue_name => 'strmadmin. sttest_queue ');
End;
/
2.6.2 create a Backup Source queue on the target database
Connectstrmadmin/STRMADMIN @ orcl
Begin
Dbms_streams_adm.set_up_queue (
Queue_table => 'orcl _ queue_table ',
Queue_name => 'strmadmin. orcl_queue ');
End;
/