Oracle streams CREATE TABLE space-level environment Overview: Creating and removing

Source: Internet
Author: User
Tags one table

Second, create a replication environment

The creation is very simple, you only need to perform the following procedure on the target side (if there is more than one table space to replicate, just add t_names (2), T_names (3) ... t_names (n)):

Jssstr> DECLARE

2 T_names Dbms_streams_tablespace_adm. Tablespace_set;

3 BEGIN

4--Tablespace names

5 T_names (1): =¨webdata¨;

6 Dbms_streams_adm. Maintain_tts (

7 Tablespace_names => T_names,

8 Source_directory_object =>¨mydt_source¨,

9 Destination_directory_object =>¨mydt_dest¨,

Ten Source_database =>¨jssweb.jss.cn¨,

One destination_database =>¨jssstr.jss.cn¨,

Dump_file_name =>¨webdt_rep.dmp¨,

Perform_actions => True,

1 4 include_ddl => true);

1 5 end;

1 6/

The PL/SQL process has completed successfully.

Because we use downstream capture, the capture/propagation/apply process is run on the target side, and the query data dictionary returns the following information:

Jssstr> Conn Strmadmin/strmadmin

is connected.

Jssstr> select Capture_name,status,capture_type from Dba_capture;

Capture_name STATUS Capture_ty

------------------------------ -------- ----------

Jssweb$cap ENABLED Downstream

Jssstr> select Propagation_name,status from Dba_propagation;

Propagation_name STATUS

------------------------------ --------

Propagation$_75 ENABLED

Jssstr> select Apply_name,status from dba_apply;

Apply_name STATUS

------------------------------ --------

Apply$_jssweb_82 ENABLED

See more highlights of this column: http://www.bianceng.cnhttp://www.bianceng.cn/database/Oracle/

Third, test

First insert a record at the source, and then add a column:

jssweb> INSERT into MEMBER.DT_TBL1 values (101,¨a¨);

1 row created.

Jssweb> ALTER TABLE MEMBER.DT_TBL1 Add (VL VARCHAR2 (20));

Table altered.

jssweb> alter system switch logfile;

System altered.

Go to the target side and take a look at it:

Jssstr> Select COUNT (0) from DT_TBL1;

COUNT (0)

----------

101

jssstr> desc DT_TBL1;

is the name empty? Type

---------------------------------- -------- -------------------------------

ID not NULL number

NAME not NULL VARCHAR2 (30)

VL VARCHAR2 (20)

OK, Success Music:)

Iv. Removing replication environments

It's exactly the same way as the previous Zhangquanku level copy, and it's not repeated here. Just a hint, here we have configured downstream capture, after removing the streams configuration environment, do not forget to modify the Log_archive_dest_n parameters on the source side, remove the archive log sent.

Author: 51cto Blog Oracle Little Bastard

Related Article

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.