Installation, configuration, and use of OracleStream

Source: Internet
Author: User
Because of the pre-research needs of the project, I want to find a solution that can meet the requirements of the internal and external Network Database Synchronization. First, I tested the Advanced Replication function of Oracle, but did not succeed.

Because of the pre-research needs of the project, I want to find a solution that can meet the requirements of the internal and external Network Database Synchronization. First, I tested the Advanced Replication function of Oracle, but did not succeed.

To meet the needs of the project pre-research, I want to find a solution that can meet the requirements of the internal and external Network Database Synchronization. I first tested the Advanced Replication function of Oracle, but did not succeed. I switched to Oracle Stream testing ,, probably, my level is too bad. After testing for 3.5 times, I finally ran Oracle Stream normally.

The cause of the error is actually not the reason. Without him, the reading of the document is not meticulous, and there is a lack of theoretical understanding of this aspect.

Principles of Oracle stream

The Oracle stream can share information. The sharing information of each unit in an Oracle stream comes from messages. We can share these messages in the stream. The stream can spread information between the same database or different databases ." "Stream routing" specifies that the Information arrives at a specific destination. Streaming provides more powerful functions and flexibility than traditional solutions for capturing, managing, and sharing messages between different databases. The features provided by stream can be used in distributed enterprise programs, data warehouses, and high availability solutions. We can use all the functions of oracle stream at the same time. We can use new streaming features without seriously affecting database performance.

With Oracle stream, we can control the information in the control flow, the flow of the stream, and how the message operates and stop the stream when the stream enters the target database. By configuring the stream, we can meet our special needs. Based on our special circumstances, the stream can automatically capture, disseminate, and manage DML and DDL messages in the database. We can put user-defined messages into the stream, and the stream can automatically spread the information to other databases or applications. When a message arrives at the target database, the stream can apply them according to our settings.

This article mainly references Step by step to configure Oracle Stream Yang baoqiu (hrb_qiuyb)

《Stream_concepts_administration_ .doc

The test environment adopts the virtual machine mode. The operating system is Windows2003 and the Oracle version is 10.2.0.

Data source machine configuration

Target machine configuration

Computer Name

Source

Dest

IP address

192.168.23.130

192.168.23.131

SID

Source

Dest

Step 1: Configure parameters before Stream. Both Source and Dest machines run the same command.

SQL> conn sys/inxite as sysdba;

Connected.

SQL> alter system set aq_tm_processes = 2 scope = both;

The system has been changed.

SQL> alter system set global_names = true scope = both;

The system has been changed.

SQL> alter system set job_queue_processes = 20 scope = both;

The system has been changed.

SQL> alter system set parallel_max_servers = 20 scope = both;

The system has been changed.

SQL> alter system set undo_retention = 3600 scope = both;

The system has been changed.

SQL> alter system set nls_date_format = 'yyyy-MM-DD HH24: MI: ss' scope = spfile;

The system has been changed.

SQL> alter system set streams_pool_size = 25 M scope = spfile;

The system has been changed.

SQL> alter system set utl_file_dir = '*' scope = spfile;

The system has been changed.

SQL> alter system set open_links = 4 scope = spfile;

The system has been changed.

SQL> alter system set log_archive_dest = 'e:/OracleDB/arch 'scope = spfile;

The system has been changed.

SQL> alter system set log_archive_start = TRUE scope = spfile;

The system has been changed.

SQL> alter system set log_archive_format = 'arch % t _ % s _ % r. arc' scope = spfile;

The system has been changed.

Step 2: view the archiving status of the system (the dual-host instance can be checked at the same time, and the check method is the same)

SQL> shutdown immediate

The database has been closed.

The database has been detached.

The ORACLE routine has been disabled.

SQL> startup mount

ORA-32004: obsolete and/or deprecated parameter (s) specified

The ORACLE routine has been started.

Total System Global Area

167772160 bytes

Fixed Size

1247900 bytes

Variable Size

92276068 bytes

Database Buffers

71303168 bytes

Redo Buffers

2945024 bytes

The database has been loaded.

SQL> alter database archivelog;

The database has been changed.

SQL> alter database open;

The database has been changed.

SQL> archive log list;

Database Log Mode

Archive Mode

Automatic archiving

Enable

Archive endpoint

USE_DB_RECOVERY_FILE_DEST

Earliest online log Sequence

1

Next archive log Sequence

2

Current Log Sequence

2

SQL>

Step 3: Create a Stream user and a tablespace (the dual-host can be set at the same time, and the setting method is the same)

# Create a dedicated Stream tablespace for the primary environment

SQL> create tablespace tbs_stream datafile 'e:/OracleDB/tbs_stream01.dbf'

2

Size 100 m autoextend on next 100 m maxsize 1000 m segment space management auto;

The tablespace has been created.

# Transfer the data dictionary of logminer from the system tablespace to the new tablespace to prevent the system tablespace from being fully occupied

SQL> execute dbms_logmnr_d.set_tablespace ('tbs _ stream ');

The PL/SQL process is successfully completed.

# Create a Stream management user

SQL> create user strmadmin identified by strmadmin default tablespace tbs_stream

Temporary tablespace temp;

The user has been created.

# Authorize Stream to Manage Users

SQL> grant connect, resource, dba, aq_administrator_role to strmadmin;

Authorization successful.

SQL> begin

2

Dbms_streams_auth.grant_admin_privilege (

3

Grantee => 'strmadmin ',

4

Grant_privileges => true );

5

End;

6

/

The PL/SQL process is successfully completed.

Step 4: configure the database connection between the two parties

Add a dest data source named dest to the source machine.

Add the source data source on the dest machine, named "source"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.