public.dhe.ibm.compublic.dhe.ibm.com/systems/power/docs/systemi/v5r4/... · Suspending Capture...

577
IBM DB2 Information Integrator SQL Replication Guide and Reference Version 8.2 SC27-1121-02

Transcript of public.dhe.ibm.compublic.dhe.ibm.com/systems/power/docs/systemi/v5r4/... · Suspending Capture...

  • IBM

    DB2

    Information

    Integrator

    SQL

    Replication

    Guide

    and

    Reference

    Version

    8.2

    SC27-1121-02

    ���

  • IBM

    DB2

    Information

    Integrator

    SQL

    Replication

    Guide

    and

    Reference

    Version

    8.2

    SC27-1121-02

    ���

  • Before

    using

    this

    information

    and

    the

    product

    it

    supports,

    be

    sure

    to

    read

    the

    general

    information

    under

    “Notices”

    on

    page

    541.

    This

    document

    contains

    proprietary

    information

    of

    IBM.

    It

    is

    provided

    under

    a

    license

    agreement

    and

    Copyright

    law

    protects

    it.

    The

    information

    contained

    in

    this

    publication

    does

    not

    include

    any

    product

    warranties,

    and

    any

    statements

    provided

    in

    this

    manual

    should

    not

    be

    interpreted

    as

    such.

    You

    can

    order

    IBM

    publications

    online

    or

    through

    your

    local

    IBM

    representative:

    v

    To

    order

    publications

    online,

    go

    to

    the

    IBM

    Publications

    Center

    at

    www.ibm.com/shop/publications/order

    v

    To

    find

    your

    local

    IBM

    representative,

    go

    to

    the

    IBM

    Directory

    of

    Worldwide

    Contacts

    at

    www.ibm.com/planetwide

    When

    you

    send

    information

    to

    IBM,

    you

    grant

    IBM

    a

    nonexclusive

    right

    to

    use

    or

    distribute

    the

    information

    in

    any

    way

    it

    believes

    appropriate

    without

    incurring

    any

    obligation

    to

    you.

    ©

    Copyright

    International

    Business

    Machines

    Corporation

    1994,

    2004.

    All

    rights

    reserved.

    US

    Government

    Users

    Restricted

    Rights

    Use,

    duplication

    or

    disclosure

    restricted

    by

    GSA

    ADP

    Schedule

    Contract

    with

    IBM

    Corp.

    http://www.ibm.com/shop/publications/orderhttp://www.ibm.com/planetwide

  • Contents

    About

    this

    book

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . ix

    Who

    should

    read

    this

    book

    .

    .

    .

    .

    .

    .

    .

    .

    . ix

    How

    to

    use

    this

    book

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . ix

    Conventions

    and

    terminology

    used

    in

    this

    book

    .

    . xi

    How

    to

    read

    syntax

    diagrams

    .

    .

    .

    .

    .

    .

    .

    . xii

    Road

    map

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xiii

    What’s

    new

    for

    DB2

    replication

    for

    Version

    8?

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xv

    What’s

    new

    in

    Version

    8.2?

    .

    .

    .

    .

    .

    .

    .

    .

    . xv

    New

    replication

    solutions

    .

    .

    .

    .

    .

    .

    .

    . xv

    New

    function

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xv

    What’s

    new

    in

    Version

    8.1.4?

    .

    .

    .

    .

    .

    .

    .

    . xvi

    New

    function

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xvi

    Performance

    improvements

    .

    .

    .

    .

    .

    .

    .

    . xvi

    What’s

    new

    in

    Version

    8

    fix

    pack

    2?

    .

    .

    .

    .

    .

    . xvi

    Usability

    improvements

    .

    .

    .

    .

    .

    .

    .

    .

    . xvi

    Performance

    improvements

    .

    .

    .

    .

    .

    .

    .

    . xvi

    New

    function

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xvi

    Changes

    to

    control

    tables

    .

    .

    .

    .

    .

    .

    .

    . xvii

    What’s

    new

    in

    Version

    8.1?

    .

    .

    .

    .

    .

    .

    .

    .

    . xvii

    Usability

    improvements

    .

    .

    .

    .

    .

    .

    .

    .

    . xvii

    Performance

    improvements

    .

    .

    .

    .

    .

    .

    . xviii

    New

    user

    interface

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xix

    New

    function

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . xix

    Serviceability

    improvements

    .

    .

    .

    .

    .

    .

    . xxii

    Changes

    to

    replication

    system

    commands

    .

    .

    . xxii

    Changes

    to

    control

    tables

    .

    .

    .

    .

    .

    .

    .

    . xxiii

    Functions

    no

    longer

    supported

    .

    .

    .

    .

    .

    .

    . xxv

    Part

    1.

    Replication

    guide

    .

    .

    .

    .

    .

    . 1

    Chapter

    1.

    Planning

    for

    SQL

    replication

    3

    Migration

    planning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 3

    Memory

    planning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 3

    Memory

    used

    by

    the

    Capture

    program

    .

    .

    .

    . 3

    Memory

    used

    by

    the

    Apply

    program

    .

    .

    .

    .

    . 5

    Memory

    used

    by

    the

    Replication

    Alert

    Monitor

    .

    . 5

    Storage

    planning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 5

    Planning

    log

    impact

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 6

    Planning

    the

    storage

    requirements

    of

    target

    tables

    and

    control

    tables

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 7

    Planning

    storage

    requirements

    for

    temporary

    files

    8

    Planning

    for

    conflict

    detection

    .

    .

    .

    .

    .

    .

    .

    . 10

    Planning

    for

    non-DB2

    relational

    sources

    .

    .

    .

    .

    . 10

    Planning

    transaction

    throughput

    rates

    for

    Capture

    triggers

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 10

    Planning

    the

    log

    impact

    for

    non-DB2

    relational

    source

    servers

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 11

    Planning

    locks

    for

    Oracle

    source

    servers

    .

    .

    .

    . 11

    Planning

    coexistence

    of

    pre-existing

    triggers

    with

    Capture

    triggers

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 11

    Planning

    for

    code

    page

    translation

    .

    .

    .

    .

    .

    .

    . 11

    Replicating

    data

    between

    databases

    with

    compatible

    code

    pages

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 12

    Configuring

    national

    language

    support

    (NLS)

    for

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 12

    Replication

    planning

    for

    DB2

    UDB

    for

    z/OS

    .

    .

    . 13

    Performance

    tuning

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 13

    Chapter

    2.

    Configuring

    servers

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 15

    Controlling

    access

    to

    replication

    servers

    .

    .

    .

    .

    . 15

    Connectivity

    requirements

    for

    replication

    .

    .

    . 15

    Authorizing

    user

    IDs

    for

    replication

    .

    .

    .

    .

    .

    . 17

    Authorization

    requirements

    for

    administration

    . 17

    Authorization

    requirements

    for

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 18

    Authorization

    requirements

    for

    Capture

    triggers

    on

    non-DB2

    relational

    databases

    .

    .

    .

    .

    .

    . 19

    Authorization

    requirements

    for

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 19

    Authorization

    requirements

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 21

    Storing

    user

    IDs

    and

    passwords

    for

    replication

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 22

    Setting

    up

    the

    replication

    control

    tables

    .

    .

    .

    .

    . 22

    Creating

    control

    tables

    (Linux,

    UNIX,

    Windows)

    22

    Creating

    control

    tables

    (z/OS)

    .

    .

    .

    .

    .

    .

    . 22

    Creating

    control

    tables

    (OS/400)

    .

    .

    .

    .

    .

    . 23

    Creating

    control

    tables

    for

    non-DB2

    relational

    sources

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 23

    Creating

    multiple

    sets

    of

    Capture

    control

    tables

    24

    Capture

    control

    tables

    on

    multiple

    database

    partitions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 24

    Setting

    up

    the

    replication

    programs

    .

    .

    .

    .

    .

    . 25

    Setting

    up

    the

    replication

    programs

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 25

    Setting

    up

    the

    Capture

    and

    Apply

    programs

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 28

    Setting

    up

    the

    replication

    programs

    (z/OS)

    .

    .

    . 30

    Capture

    for

    multiple

    database

    partitions

    .

    .

    .

    . 30

    Setting

    up

    journals

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    . 30

    Creating

    journals

    for

    source

    tables

    (OS/400)

    .

    . 30

    Managing

    journals

    and

    journal

    receivers

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 32

    Chapter

    3.

    Registering

    tables

    and

    views

    as

    SQL

    replication

    sources

    .

    .

    . 35

    Registering

    DB2

    tables

    as

    sources

    .

    .

    .

    .

    .

    .

    . 35

    Registering

    non-DB2

    relational

    tables

    as

    sources

    .

    . 37

    Registration

    options

    for

    source

    tables

    .

    .

    .

    .

    .

    . 38

    Registering

    a

    subset

    of

    columns

    (vertical

    subsetting)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 39

    Full-refresh

    copying

    and

    change-capture

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 39

    After-image

    columns

    and

    before-image

    columns

    41

    Before-image

    prefix

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 43

    ©

    Copyright

    IBM

    Corp.

    1994,

    2004

    iii

    ||||||

  • Stop

    the

    Capture

    program

    on

    error

    .

    .

    .

    .

    . 43

    How

    the

    Capture

    program

    stores

    updates

    .

    .

    . 44

    Preventing

    the

    recapture

    of

    changes

    (update-anywhere

    replication)

    .

    .

    .

    .

    .

    .

    . 45

    Setting

    conflict

    detection

    (update-anywhere

    replication)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 49

    Registering

    tables

    that

    use

    remote

    journaling

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 51

    Using

    relative

    record

    numbers

    (RRN)

    instead

    of

    primary

    keys

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    . 51

    How

    views

    behave

    as

    replication

    sources

    .

    .

    .

    . 52

    Views

    over

    a

    single

    table

    .

    .

    .

    .

    .

    .

    .

    .

    . 52

    Views

    over

    a

    join

    of

    two

    or

    more

    tables

    .

    .

    .

    . 52

    Registering

    views

    of

    tables

    as

    sources

    .

    .

    .

    .

    . 54

    Maintaining

    CCD

    tables

    as

    sources

    (IMS)

    .

    .

    .

    . 55

    Chapter

    4.

    Subscribing

    to

    sources

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 57

    Planning

    how

    to

    group

    sources

    and

    targets

    .

    .

    .

    . 57

    Planning

    the

    number

    of

    subscription-set

    members

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 58

    Planning

    the

    number

    of

    subscription

    sets

    per

    Apply

    qualifier

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 58

    Creating

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    . 59

    Processing

    options

    for

    subscription

    sets

    .

    .

    .

    .

    . 61

    Specifying

    whether

    the

    set

    is

    active

    .

    .

    .

    .

    . 61

    Specifying

    how

    many

    minutes

    worth

    of

    data

    the

    Apply

    program

    retrieves

    .

    .

    .

    .

    .

    .

    .

    .

    . 61

    Deciding

    how

    the

    Apply

    program

    loads

    target

    tables

    that

    have

    referential

    integrity

    .

    .

    .

    .

    . 63

    Specifying

    how

    the

    Apply

    program

    replicates

    changes

    for

    members

    in

    the

    set

    .

    .

    .

    .

    .

    .

    . 64

    Defining

    SQL

    statements

    or

    stored

    procedures

    for

    the

    subscription

    set

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 65

    Scheduling

    the

    replication

    of

    a

    subscription

    set

    65

    Mapping

    source

    tables

    and

    views

    to

    target

    tables

    and

    views

    within

    a

    subscription

    set

    .

    .

    .

    .

    .

    . 67

    Selecting

    a

    target

    type

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 69

    Defining

    read-only

    target

    tables

    .

    .

    .

    .

    .

    . 71

    Defining

    middle

    tiers

    in

    a

    multi-tier

    configuration

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 75

    Defining

    read-write

    targets

    (update-anywhere)

    . 77

    Using

    an

    existing

    table

    as

    the

    target

    table

    .

    .

    . 79

    Common

    properties

    for

    all

    target

    table

    types

    .

    .

    . 80

    Source

    columns

    that

    you

    want

    applied

    to

    the

    target

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 80

    Source

    rows

    that

    you

    want

    applied

    to

    the

    target

    80

    How

    source

    columns

    map

    to

    target

    columns

    .

    . 81

    Target

    key

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 82

    How

    the

    Apply

    program

    updates

    the

    target

    key

    columns

    with

    the

    target-key

    change

    option

    .

    .

    . 83

    Chapter

    5.

    Replicating

    special

    data

    types

    in

    SQL

    replication

    .

    .

    .

    .

    .

    .

    . 85

    General

    data

    restrictions

    for

    replication

    .

    .

    .

    .

    . 85

    Replicating

    large

    objects

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 85

    Replicating

    DATALINK

    values

    .

    .

    .

    .

    .

    .

    .

    . 86

    Setting

    up

    and

    using

    the

    ASNDLCOPY

    exit

    routine

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 88

    Setting

    up

    and

    using

    DLFM_ASNCOPYD

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 90

    Setting

    up

    and

    using

    ASNDLCOPYD

    (OS/400)

    91

    Chapter

    6.

    Subsetting

    data

    in

    an

    SQL

    replication

    environment

    .

    .

    .

    .

    .

    .

    . 93

    Subsetting

    data

    during

    registration

    .

    .

    .

    .

    .

    . 93

    Subsetting

    source

    data

    using

    views

    .

    .

    .

    .

    . 94

    Defining

    triggers

    on

    CD

    tables

    to

    prevent

    specific

    rows

    from

    being

    captured

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 94

    Subsetting

    data

    during

    subscription

    .

    .

    .

    .

    .

    . 95

    Chapter

    7.

    Manipulating

    data

    in

    an

    SQL

    replication

    environment

    .

    .

    .

    .

    .

    .

    . 97

    Enhancing

    data

    using

    stored

    procedures

    or

    SQL

    statements

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 98

    Mapping

    source

    and

    target

    columns

    that

    have

    different

    names

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 98

    Creating

    computed

    columns

    .

    .

    .

    .

    .

    .

    .

    .

    . 99

    Chapter

    8.

    Customizing

    and

    running

    replication

    SQL

    scripts

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 101

    Chapter

    9.

    Operating

    the

    Capture

    program

    for

    SQL

    replication

    .

    .

    .

    .

    . 103

    Default

    operational

    parameters

    for

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 103

    Changing

    operational

    parameters

    for

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 105

    Starting

    the

    Capture

    program

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 107

    add_partition

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    . 108

    autoprune

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    . 108

    autostop

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 109

    capture_path

    (Linux,

    UNIX,

    Windows,

    z/OS)

    109

    capture_schema

    (Linux,

    UNIX,

    Windows,

    z/OS)

    110

    capture_server

    (Linux,

    UNIX,

    Windows,

    z/OS)

    110

    commit_interval

    (Linux,

    UNIX,

    Windows,

    z/OS)

    110

    lag_limit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 111

    logreuse

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 111

    logstdout

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 111

    memory_limit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    112

    monitor_interval

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 112

    monitor_limit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    112

    prune_interval

    (Linux,

    UNIX,

    Windows,

    z/OS)

    112

    retention_limit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    113

    sleep_interval

    (Linux,

    UNIX,

    Windows,

    z/OS)

    114

    startmode

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 114

    term

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 115

    trace_limit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    . 115

    Starting

    the

    Capture

    program

    (OS/400)

    .

    .

    .

    .

    . 115

    Altering

    the

    behavior

    of

    a

    running

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 116

    Changing

    the

    operating

    parameters

    in

    the

    Capture

    parameters

    table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 117

    Stopping

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    . 118

    iv

    SQL

    Replication

    Guide

    and

    Reference

  • Suspending

    Capture

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 118

    Resuming

    Capture

    (Linux,

    UNIX,

    Windows,

    z/OS)

    119

    Reinitializing

    Capture

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 119

    Chapter

    10.

    Operating

    the

    Apply

    program

    for

    SQL

    replication

    .

    .

    .

    .

    . 121

    Default

    operational

    parameters

    for

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 121

    Changing

    operational

    parameters

    for

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 122

    Starting

    the

    Apply

    program

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 123

    apply_path

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    . 124

    apply_qual

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    . 125

    control_server

    (Linux,

    UNIX,

    Windows,

    z/OS)

    125

    copyonce

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 125

    db2_subsystem

    (z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    . 126

    delay

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 126

    errwait

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 126

    inamsg

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 127

    loadxit

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 127

    logreuse

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 127

    logstdout

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 127

    notify

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 128

    opt4one

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 128

    pwdfile

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    .

    .

    . 128

    sleep

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 128

    spillfile

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 129

    sqlerrcontinue

    (Linux,

    UNIX,

    Windows,

    z/OS)

    129

    term

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    . 130

    trlreuse

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    . 130

    Starting

    the

    Apply

    program

    (OS/400)

    .

    .

    .

    .

    . 131

    Changing

    the

    operating

    parameters

    in

    the

    Apply

    parameters

    table

    (Linux,

    UNIX,

    Windows,

    z/OS)

    . 132

    Stopping

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    . 133

    Modifying

    the

    ASNDONE

    exit

    routine

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 133

    Modifying

    the

    ASNDONE

    exit

    routine

    (OS/400)

    134

    Refreshing

    target

    tables

    using

    the

    ASNLOAD

    exit

    routine

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 135

    Refreshing

    target

    tables

    with

    the

    ASNLOAD

    exit

    routine

    (Linux,

    UNIX,

    Windows)

    .

    .

    .

    .

    .

    . 136

    Refreshing

    target

    tables

    with

    the

    ASNLOAD

    exit

    routine

    (z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 137

    Customizing

    ASNLOAD

    exit

    behavior

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    . 138

    Refreshing

    target

    tables

    with

    the

    ASNLOAD

    exit

    routine

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 140

    Chapter

    11.

    Monitoring

    replication

    with

    the

    Replication

    Alert

    Monitor

    .

    . 143

    Monitoring

    replication

    with

    the

    Replication

    Alert

    Monitor—Overview

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 143

    The

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    . 143

    Alert

    conditions

    and

    notifications

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    . 145

    Alert

    conditions

    and

    notifications

    for

    the

    Replication

    Alert

    Monitor—Overview

    .

    .

    .

    . 145

    Alert

    conditions

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 146

    E-mail

    notifications

    for

    replication

    alert

    conditions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 149

    The

    ASNMAIL

    exit

    routine

    for

    sending

    alerts

    in

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 150

    Setting

    up

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    . 151

    Setting

    up

    the

    Replication

    Alert

    Monitor

    .

    .

    . 151

    Creating

    control

    tables

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 151

    Defining

    contact

    information

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 152

    Operating

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    . 153

    Operating

    the

    Replication

    Alert

    Monitor

    .

    .

    . 153

    Creating

    monitors

    for

    replication

    or

    publishing

    154

    Selecting

    alert

    conditions

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 155

    Starting

    monitors

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 156

    Reinitializing

    monitors

    .

    .

    .

    .

    .

    .

    .

    .

    . 156

    Default

    values

    of

    the

    parameters

    that

    are

    used

    to

    operate

    the

    Replication

    Alert

    Monitor

    .

    .

    . 157

    Descriptions

    of

    the

    parameters

    that

    are

    used

    to

    operate

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    . 158

    Setting

    parameters

    for

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 160

    Stopping

    a

    monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 163

    Chapter

    12.

    On-demand

    reporting

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 165

    Checking

    for

    current

    status

    of

    replication

    programs

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    . 165

    Checking

    the

    status

    of

    the

    Capture

    and

    Apply

    journal

    jobs

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 166

    Reviewing

    historical

    data

    for

    trends

    .

    .

    .

    .

    .

    . 167

    Reviewing

    Capture

    program

    messages

    .

    .

    .

    . 168

    Examining

    Capture

    program

    throughput

    .

    .

    . 168

    Displaying

    latency

    of

    data

    processed

    by

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 169

    Reviewing

    Apply

    program

    messages

    .

    .

    .

    . 169

    Examining

    Apply

    program

    throughput

    .

    .

    .

    . 170

    Displaying

    the

    average

    length

    of

    time

    taken

    to

    replicate

    transactions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 170

    Reviewing

    Monitor

    program

    messages

    .

    .

    .

    . 171

    Monitoring

    the

    progress

    of

    the

    Capture

    program

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 171

    Chapter

    13.

    Making

    changes

    to

    an

    SQL

    replication

    environment

    .

    .

    .

    .

    . 173

    Registering

    new

    objects

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 173

    Changing

    registration

    attributes

    for

    registered

    objects

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 174

    Adding

    columns

    to

    source

    tables

    .

    .

    .

    .

    .

    .

    . 174

    Stop

    capturing

    changes

    for

    registered

    objects

    .

    .

    . 177

    Reactivating

    registrations

    .

    .

    .

    .

    .

    .

    .

    .

    . 178

    Removing

    registrations

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 179

    Changing

    Capture

    schemas

    .

    .

    .

    .

    .

    .

    .

    .

    . 179

    Creating

    new

    subscription

    sets

    .

    .

    .

    .

    .

    .

    . 182

    Adding

    new

    subscription-set

    members

    to

    existing

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 182

    Contents

    v

  • Disabling

    subscription-set

    members

    from

    existing

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 183

    Enabling

    subscription-set

    members

    to

    existing

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 183

    Changing

    attributes

    of

    subscription

    sets

    .

    .

    .

    . 183

    Changing

    subscription

    set

    names

    .

    .

    .

    .

    .

    .

    . 184

    Splitting

    a

    subscription

    set

    .

    .

    .

    .

    .

    .

    .

    .

    . 186

    Merging

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    . 189

    Changing

    Apply

    qualifiers

    of

    subscription

    sets

    .

    . 192

    Deactivating

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    . 194

    Removing

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    . 195

    Coordinating

    replication

    events

    with

    database

    application

    events

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 196

    Setting

    an

    event

    END_SYNCHPOINT

    using

    the

    USER

    type

    signal

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 196

    Creating

    journal

    signal

    tables

    for

    remote

    journaling

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 197

    Using

    the

    Capture

    CMD

    STOP

    signal

    .

    .

    .

    . 198

    Performing

    a

    CAPSTART

    handshake

    signal

    outside

    of

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    . 201

    Performing

    a

    CAPSTOP

    signal

    .

    .

    .

    .

    .

    . 202

    Promoting

    your

    replication

    configuration

    to

    another

    system

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 203

    Chapter

    14.

    Maintaining

    an

    SQL

    replication

    environment

    .

    .

    .

    .

    .

    .

    . 205

    Maintaining

    your

    source

    systems

    .

    .

    .

    .

    .

    .

    . 205

    Maintaining

    source

    objects

    .

    .

    .

    .

    .

    .

    .

    . 205

    Maintaining

    and

    retaining

    source

    logs

    and

    journal

    receivers

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 205

    Maintaining

    your

    control

    tables

    .

    .

    .

    .

    .

    .

    . 209

    Using

    the

    RUNSTATS

    utility

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 210

    Rebinding

    packages

    and

    plans

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 210

    Reorganizing

    your

    control

    tables

    .

    .

    .

    .

    .

    . 210

    Pruning

    your

    control

    tables

    .

    .

    .

    .

    .

    .

    .

    . 212

    Preventing

    replication

    failures

    and

    recovering

    from

    errors

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 215

    Maintaining

    your

    target

    tables

    .

    .

    .

    .

    .

    .

    .

    . 216

    Part

    2.

    Replication

    Center

    .

    .

    .

    .

    . 217

    Chapter

    15.

    Using

    the

    Replication

    Center

    for

    SQL

    replication

    .

    .

    .

    .

    .

    . 219

    Prerequisites

    for

    the

    Replication

    Center

    .

    .

    .

    .

    . 220

    Configuring

    the

    Replication

    Center

    for

    host

    RDBMSs

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 221

    Starting

    the

    Replication

    Center

    .

    .

    .

    .

    .

    .

    . 221

    Using

    the

    Replication

    Center

    launchpad

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 222

    Managing

    user

    IDs

    and

    passwords

    for

    the

    Replication

    Center

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 223

    Creating

    replication

    profiles

    .

    .

    .

    .

    .

    .

    .

    . 224

    Creating

    control-table

    profiles

    .

    .

    .

    .

    .

    .

    . 224

    Creating

    source-object

    profiles

    .

    .

    .

    .

    .

    .

    . 225

    Creating

    target-object

    profiles

    .

    .

    .

    .

    .

    .

    . 226

    Creating

    replication

    control

    tables

    .

    .

    .

    .

    .

    . 227

    Creating

    Capture

    control

    tables

    .

    .

    .

    .

    .

    . 227

    Creating

    Apply

    control

    tables

    .

    .

    .

    .

    .

    .

    . 228

    Creating

    Monitor

    control

    tables

    .

    .

    .

    .

    .

    . 228

    Adding

    servers

    to

    the

    Replication

    Center

    .

    .

    .

    . 229

    Enabling

    a

    database

    for

    change

    capture

    (UNIX

    and

    Windows)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 230

    Registering

    sources

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 231

    Creating

    subscription

    sets

    .

    .

    .

    .

    .

    .

    .

    .

    . 232

    Defining

    the

    information

    for

    the

    subscription

    set

    233

    Mapping

    sources

    to

    targets

    .

    .

    .

    .

    .

    .

    .

    . 233

    Scheduling

    the

    subscription

    set

    .

    .

    .

    .

    .

    . 235

    Adding

    SQL

    statements

    or

    stored

    procedures

    to

    the

    subscription

    set

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 235

    Activating

    or

    deactivating

    subscription

    sets

    .

    .

    . 235

    Promoting

    replication

    objects

    .

    .

    .

    .

    .

    .

    .

    . 236

    Promoting

    registered

    tables

    or

    views

    .

    .

    .

    . 236

    Promoting

    subscription

    sets

    .

    .

    .

    .

    .

    .

    . 237

    Forcing

    a

    full

    refresh

    of

    target

    tables

    .

    .

    .

    .

    . 237

    Removing

    or

    deleting

    replication

    definitions

    .

    .

    . 238

    Operating

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    . 238

    Operating

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    . 239

    Operating

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    . 239

    Chapter

    16.

    Basic

    SQL

    replication

    scenario:

    DB2

    for

    Windows

    .

    .

    .

    .

    . 243

    Before

    you

    begin

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 243

    Planning

    this

    scenario

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 244

    Replication

    source

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 244

    Replication

    target

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 244

    Replication

    options

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 245

    Setting

    up

    the

    replication

    environment

    for

    this

    scenario

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 246

    Step

    1:

    Create

    replication

    control

    tables

    for

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 246

    Step

    2:

    Enable

    the

    source

    database

    for

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 246

    Step

    3:

    Register

    a

    replication

    source

    .

    .

    .

    .

    . 247

    Step

    4:

    Create

    replication

    control

    tables

    for

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 249

    Step

    5:

    Create

    a

    subscription

    set

    and

    a

    subscription-set

    member

    .

    .

    .

    .

    .

    .

    .

    .

    . 250

    Step

    6:

    Create

    an

    Apply

    password

    file

    .

    .

    .

    . 254

    Step

    7:

    Replicate

    the

    scenario

    data

    .

    .

    .

    .

    . 255

    Operating

    in

    a

    replication

    environment

    .

    .

    .

    .

    . 256

    Step

    1:

    Update

    the

    source

    table

    .

    .

    .

    .

    .

    . 257

    Step

    2:

    View

    status

    for

    the

    Capture

    program

    .

    . 257

    Step

    3:

    View

    status

    for

    the

    Apply

    program

    .

    . 258

    Step

    4:

    Stop

    the

    Capture

    and

    Apply

    programs

    259

    Monitoring

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 260

    Step

    1:

    Create

    replication

    control

    tables

    for

    the

    Monitor

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 260

    Step

    2:

    Create

    a

    contact

    for

    replication

    alerts

    .

    . 262

    Step

    3:

    Select

    alert

    conditions

    for

    the

    Capture

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 262

    Step

    4:

    Select

    alert

    conditions

    for

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 263

    Step

    5:

    Start

    the

    Replication

    Alert

    Monitor

    for

    a

    monitor

    qualifier

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 264

    Part

    3.

    Replication

    reference

    .

    .

    . 267

    vi

    SQL

    Replication

    Guide

    and

    Reference

  • Chapter

    17.

    Naming

    rules

    for

    SQL

    replication

    objects

    .

    .

    .

    .

    .

    .

    .

    .

    . 269

    Chapter

    18.

    System

    commands

    for

    SQL

    replication

    (Linux,

    UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 271

    asnacmd:

    Operating

    Apply

    .

    .

    .

    .

    .

    .

    .

    .

    . 271

    asnanalyze:

    Operating

    the

    Analyzer

    .

    .

    .

    .

    .

    . 273

    asnapply:

    Starting

    Apply

    .

    .

    .

    .

    .

    .

    .

    .

    . 276

    asncap:

    Starting

    Capture

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 282

    asnccmd:

    Operating

    Capture

    .

    .

    .

    .

    .

    .

    .

    . 288

    asnmcmd:

    Working

    with

    a

    running

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 292

    asnmon:

    Starting

    a

    Replication

    Alert

    Monitor

    .

    .

    . 295

    asnpwd:

    Creating

    and

    maintaining

    password

    files

    299

    asnscrt:

    Creating

    a

    DB2

    replication

    service

    to

    start

    the

    replication

    programs

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 302

    asnsdrop:

    Dropping

    DB2

    replication

    services

    .

    .

    . 305

    asnslist:

    Listing

    DB2

    replication

    services

    .

    .

    .

    . 306

    asntdiff:

    Comparing

    data

    in

    source

    and

    target

    tables

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 307

    asntrc:

    Operating

    the

    replication

    trace

    facility

    .

    .

    . 309

    asntrep:

    Repairing

    differences

    between

    source

    and

    target

    tables

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 316

    Chapter

    19.

    System

    commands

    for

    SQL

    replication

    (OS/400)

    .

    .

    .

    .

    .

    . 319

    ADDDPRREG:

    Adding

    a

    DPR

    registration

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 319

    ADDDPRSUB:

    Adding

    a

    DPR

    subscription

    set

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 327

    ADDDPRSUBM:

    Adding

    a

    DPR

    subscription-set

    member

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 343

    ANZDPR:

    Operating

    the

    Analyzer

    (OS/400)

    .

    .

    . 352

    CHGDPRCAPA:

    Changing

    DPR

    Capture

    attributes

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 355

    CRTDPRTBL:

    Creating

    the

    replication

    control

    tables

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 360

    ENDDPRAPY:

    Stopping

    Apply

    (OS/400)

    .

    .

    .

    . 361

    ENDDPRCAP:

    Stopping

    Capture

    (OS/400)

    .

    .

    . 364

    GRTDPRAUT:

    Authorizing

    users

    (OS/400)

    .

    .

    . 366

    INZDPRCAP:

    Reinitializing

    DPR

    Capture

    (OS/400)

    374

    OVRDPRCAPA:

    Overriding

    DPR

    capture

    attributes

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 375

    RMVDPRREG:

    Removing

    a

    DPR

    registration

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 380

    RMVDPRSUB:

    Removing

    a

    DPR

    subscription

    set

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 381

    RMVDPRSUBM:

    Removing

    a

    DPR

    subscription-set

    member

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 383

    RVKDPRAUT:

    Revoking

    authority

    (OS/400)

    .

    .

    . 384

    STRDPRAPY:

    Starting

    Apply

    (OS/400)

    .

    .

    .

    .

    . 386

    STRDPRCAP:

    Starting

    Capture

    (OS/400)

    .

    .

    .

    . 393

    WRKDPRTRC:

    Using

    the

    DPR

    trace

    facility

    (OS/400)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 400

    Chapter

    20.

    Operating

    the

    SQL

    replication

    programs

    (z/OS)

    .

    .

    .

    .

    . 405

    Using

    JCL

    or

    system-started

    tasks

    to

    operate

    the

    replication

    programs

    (z/OS)

    .

    .

    .

    .

    .

    .

    .

    . 405

    Using

    JCL

    to

    operate

    replication

    programs

    .

    . 405

    Using

    system-started

    tasks

    to

    operate

    replication

    programs

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 407

    Using

    MVS

    Automatic

    Restart

    Manager

    (ARM)

    to

    automatically

    restart

    replication

    programs

    (z/OS)

    . 407

    Migrating

    your

    replication

    environment

    to

    data-sharing

    mode

    (z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    . 408

    Chapter

    21.

    Using

    the

    Windows

    Service

    Control

    Manager

    to

    issue

    system

    commands

    for

    SQL

    replication

    (Windows)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 409

    Creating

    a

    replication

    service

    .

    .

    .

    .

    .

    .

    .

    . 409

    Operating

    a

    replication

    service

    .

    .

    .

    .

    .

    .

    . 410

    Dropping

    a

    replication

    service

    .

    .

    .

    .

    .

    .

    .

    . 410

    Chapter

    22.

    Scheduling

    SQL

    replication

    programs

    on

    various

    operating

    systems

    .

    .

    .

    .

    .

    .

    .

    .

    . 413

    Scheduling

    programs

    on

    UNIX

    and

    Linux

    operating

    systems

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 413

    Scheduling

    programs

    on

    Windows

    operating

    systems

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 413

    Scheduling

    programs

    on

    z/OS

    operating

    systems

    413

    Scheduling

    programs

    on

    the

    OS/400

    operating

    system

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 414

    Chapter

    23.

    How

    the

    SQL

    replication

    components

    communicate

    .

    .

    .

    .

    .

    . 415

    The

    Replication

    Center,

    the

    Capture

    program

    or

    triggers,

    and

    the

    Apply

    program

    .

    .

    .

    .

    .

    .

    . 415

    The

    Capture

    program

    and

    the

    Apply

    program

    .

    . 416

    The

    Capture

    triggers

    and

    the

    Apply

    program

    .

    .

    . 417

    The

    Replication

    Center

    and

    the

    Replication

    Alert

    Monitor

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 418

    The

    Replication

    Alert

    Monitor,

    the

    Capture

    program,

    and

    the

    Apply

    program

    .

    .

    .

    .

    .

    . 419

    Chapter

    24.

    Table

    structures

    for

    SQL

    replication

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 421

    Tables

    at

    a

    glance

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 421

    List

    of

    tables

    used

    at

    the

    Capture

    control

    server

    428

    List

    of

    tables

    used

    at

    the

    Apply

    control

    server

    .

    . 431

    List

    of

    control

    tables

    at

    the

    Monitor

    control

    server

    432

    List

    of

    tables

    used

    at

    the

    target

    server

    .

    .

    .

    .

    . 433

    Tables

    at

    the

    Capture

    control

    server

    and

    their

    column

    descriptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 433

    ASN.IBMSNAP_CAPSCHEMAS

    .

    .

    .

    .

    .

    . 434

    schema.IBMSNAP_AUTHTKN

    (OS/400)

    .

    .

    . 434

    schema.IBMSNAP_CAPENQ

    (UNIX,

    Windows,

    z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 435

    schema.IBMSNAP_CAPMON

    .

    .

    .

    .

    .

    .

    . 436

    schema.IBMSNAP_CAPPARMS

    .

    .

    .

    .

    .

    . 437

    schema.IBMSNAP_CAPTRACE

    (DB2

    only)

    .

    .

    . 440

    schema.CCD_table

    (non-DB2)

    .

    .

    .

    .

    .

    .

    . 441

    schema.CD_table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 442

    schema.IBMSNAP_PARTITIONINFO

    .

    .

    .

    .

    . 443

    Contents

    vii

  • schema.IBMSNAP_PRUNCNTL

    .

    .

    .

    .

    .

    . 444

    schema.IBMSNAP_PRUNE_LOCK

    .

    .

    .

    .

    . 446

    schema.IBMSNAP_PRUNE_SET

    .

    .

    .

    .

    .

    . 447

    schema.IBMSNAP_REG_EXT

    (OS/400)

    .

    .

    .

    . 447

    schema.IBMSNAP_REGISTER

    .

    .

    .

    .

    .

    .

    . 449

    schema.IBMSNAP_REG_SYNCH

    (non-DB2

    relational)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 455

    schema.IBMSNAP_RESTART

    .

    .

    .

    .

    .

    .

    . 456

    schema.IBMSNAP_SEQTABLE

    (Informix)

    .

    .

    . 458

    schema.IBMSNAP_SIGNAL

    .

    .

    .

    .

    .

    .

    .

    . 458

    schema.IBMSNAP_UOW

    .

    .

    .

    .

    .

    .

    .

    .

    . 461

    Tables

    at

    the

    Apply

    control

    server

    and

    their

    column

    descriptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 463

    ASN.IBMSNAP_APPENQ

    .

    .

    .

    .

    .

    .

    .

    . 463

    ASN.IBMSNAP_APPLY_JOB

    (OS/400)

    .

    .

    .

    . 464

    ASN.IBMSNAP_APPPARMS

    .

    .

    .

    .

    .

    .

    . 465

    ASN.IBMSNAP_APPLYTRACE

    .

    .

    .

    .

    .

    . 467

    ASN.IBMSNAP_APPLYTRAIL

    .

    .

    .

    .

    .

    .

    . 468

    ASN.IBMSNAP_SUBS_COLS

    .

    .

    .

    .

    .

    .

    . 473

    ASN.IBMSNAP_SUBS_EVENT

    .

    .

    .

    .

    .

    . 475

    ASN.IBMSNAP_SUBS_MEMBR

    .

    .

    .

    .

    .

    . 475

    ASN.IBMSNAP_SUBS_SET

    .

    .

    .

    .

    .

    .

    .

    . 480

    ASN.IBMSNAP_SUBS_STMTS

    .

    .

    .

    .

    .

    .

    . 485

    Tables

    at

    the

    Monitor

    control

    server

    and

    their

    column

    descriptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 487

    IBMSNAP_ALERTS

    table

    .

    .

    .

    .

    .

    .

    .

    . 487

    IBMSNAP_CONDITIONS

    table

    .

    .

    .

    .

    .

    . 488

    IBMSNAP_CONTACTGRP

    table

    .

    .

    .

    .

    .

    . 493

    IBMSNAP_CONTACTS

    table

    .

    .

    .

    .

    .

    .

    . 494

    IBMSNAP_MONENQ

    table

    .

    .

    .

    .

    .

    .

    .

    . 495

    IBMSNAP_GROUPS

    table

    .

    .

    .

    .

    .

    .

    .

    . 495

    IBMSNAP_MONPARMS

    table

    .

    .

    .

    .

    .

    .

    . 495

    IBMSNAP_MONSERVERS

    table

    .

    .

    .

    .

    .

    . 497

    IBMSNAP_MONTRACE

    table

    .

    .

    .

    .

    .

    .

    . 498

    IBMSNAP_MONTRAIL

    table

    .

    .

    .

    .

    .

    .

    . 499

    Tables

    at

    the

    target

    server

    and

    their

    column

    descriptions

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 501

    Base

    aggregate

    table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 501

    Change

    aggregate

    table

    .

    .

    .

    .

    .

    .

    .

    .

    . 501

    Consistent-change

    data

    (CCD)

    table

    .

    .

    .

    .

    . 502

    Point-in-time

    table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 504

    Replica

    table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 505

    User

    copy

    table

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 505

    Appendix

    A.

    UNICODE

    and

    ASCII

    encoding

    schemes

    for

    SQL

    replication

    (z/OS)

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 507

    Choosing

    an

    encoding

    scheme

    .

    .

    .

    .

    .

    .

    .

    . 507

    Setting

    Encoding

    Schemes

    .

    .

    .

    .

    .

    .

    .

    .

    . 507

    Appendix

    B.

    How

    the

    Capture

    program

    processes

    journal

    entry

    types

    for

    SQL

    replication

    (iSeries)

    .

    . 509

    Appendix

    C.

    Starting

    the

    SQL

    replication

    programs

    from

    within

    an

    application

    (Linux,

    UNIX,

    Windows)

    .

    . 511

    Glossary

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 513

    Glossary

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 513

    Index

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 525

    Accessibility

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Keyboard

    input

    and

    navigation

    .

    .

    .

    .

    .

    .

    . 539

    Keyboard

    input

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Keyboard

    navigation

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Keyboard

    focus

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Accessible

    display

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Font

    settings

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 539

    Non-dependence

    on

    color

    .

    .

    .

    .

    .

    .

    .

    . 540

    Compatibility

    with

    assistive

    technologies

    .

    .

    .

    . 540

    Accessible

    documentation

    .

    .

    .

    .

    .

    .

    .

    .

    . 540

    Notices

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 541

    Trademarks

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 543

    Contacting

    IBM

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 545

    Product

    information

    .

    .

    .

    .

    .

    .

    .

    .

    .

    .

    . 545

    Comments

    on

    the

    documentation

    .

    .

    .

    .

    .

    .

    . 545

    viii

    SQL

    Replication

    Guide

    and

    Reference

    |

    |

  • About

    this

    book

    This

    book

    describes

    how

    to

    plan,

    set

    up,

    maintain,

    and

    monitor

    a

    data

    replication

    environment

    using

    DB2

    replication,

    which

    is

    the

    focus

    of

    the

    book.

    This

    book

    contains

    the

    guidance

    and

    reference

    information

    for

    the

    SQL

    replication

    component

    that

    is

    introduced

    in

    IBM

    DB2

    Information

    Integrator

    Introduction

    to

    Replication

    and

    Event

    Publishing.

    SQL

    replication,

    also

    referred

    to

    as

    DB2

    replication,

    is

    a

    type

    of

    replication

    that

    uses

    SQL

    to

    replicate

    data

    between

    systems.

    The

    term

    is

    used

    to

    differentiate

    this

    type

    of

    replication

    from

    Q

    replication,

    which

    replicates

    data

    through

    message

    queues.

    Who

    should

    read

    this

    book

    This

    book

    is

    written

    for

    database

    administrators,

    LAN

    administrators,

    and

    others

    who

    must

    set

    up

    and

    maintain

    a

    data

    replication

    environment

    in

    an

    SQL

    environment.

    You

    should

    be

    familiar

    with

    standard

    SQL

    database

    terminology,

    have

    a

    working

    knowledge

    of

    the

    operating

    systems

    that

    will

    be

    involved

    in

    replication,

    and

    have

    experience

    with

    database

    design,

    database

    administration,

    database

    security,

    server

    connectivity,

    and

    networking.

    You

    should

    understand

    the

    applications

    in

    your

    environment

    and

    how

    they

    manipulate

    the

    data

    that

    you

    want

    to

    replicate

    using

    SQL

    queries

    and

    commands.

    You

    should

    be

    familiar

    with

    basic

    replication

    concepts

    and

    components.

    How

    to

    use

    this

    book

    Most

    sections

    in

    this

    book

    pertain

    to

    SQL

    replication

    function

    for

    all

    operating-system

    environments.

    There

    are

    some

    sections

    that

    contain

    operating-system-specific

    information.

    The

    organization

    and

    content

    of

    this

    book

    have

    changed

    since

    the

    last

    release.

    This

    book

    contains

    three

    parts:

    v

    Part

    1,

    “Replication

    guide,”

    on

    page

    1

    describes

    how

    to

    plan,

    set

    up,

    run,

    and

    maintain

    your

    replication

    environment.

    It

    includes

    the

    following

    chapters:

    Chapter

    1,

    “Planning

    for

    SQL

    replication,”

    on

    page

    3

    describes

    how

    to

    plan

    and

    design

    your

    replication

    environment.

    Chapter

    2,

    “Configuring

    servers

    for

    SQL

    replication,”

    on

    page

    15

    describes

    how

    to

    prepare

    your

    environment

    for

    replication.

    Chapter

    3,

    “Registering

    tables

    and

    views

    as

    SQL

    replication

    sources,”

    on

    page

    35

    describes

    what

    you

    need

    to

    know

    to

    register

    replication

    sources.

    Chapter

    4,

    “Subscribing

    to

    sources

    for

    SQL

    replication,”

    on

    page

    57

    describes

    what

    you

    need

    to

    know

    to

    create

    subscription

    sets

    and

    add

    members

    to

    subscription

    sets.

    Chapter

    5,

    “Replicating

    special

    data

    types

    in

    SQL

    replication,”

    on

    page

    85

    describes

    the

    replication

    options

    for

    LOB

    and

    DATALINK

    values

    in

    source

    tables.

    Chapter

    6,

    “Subsetting

    data

    in

    an

    SQL

    replication

    environment,”

    on

    page

    93

    describes

    how

    to

    customize

    what

    data

    is

    captured

    and

    applied

    to

    the

    target

    as

    well

    as

    how

    the

    data

    is

    applied

    to

    the

    target.

    ©

    Copyright

    IBM

    Corp.

    1994,

    2004

    ix

    |||||

    ||||

    |||||||||

  • Chapter

    7,

    “Manipulating

    data

    in

    an

    SQL

    replication

    environment,”

    on

    page

    97

    describes

    how

    to

    use

    the

    Capture

    program

    or

    the

    Apply

    program

    to

    manipulate

    source

    data.

    Chapter

    8,

    “Customizing

    and

    running

    replication

    SQL

    scripts

    for

    SQL

    replication,”

    on

    page

    101

    describes

    how

    to

    run

    SQL

    in

    your

    replication

    environment.

    Chapter

    9,

    “Operating

    the

    Capture

    program

    for

    SQL

    replication,”

    on

    page

    103

    describes

    how

    to

    operate

    the

    Capture

    program

    for

    all

    operating-system

    environments.

    Chapter

    10,

    “Operating

    the

    Apply

    program

    for

    SQL

    replication,”

    on

    page

    121

    describes

    how

    to

    operate

    the

    Apply

    program

    for

    all

    operating-system

    environments.

    Chapter

    11,

    “Monitoring

    replication

    with

    the

    Replication

    Alert

    Monitor,”

    on

    page

    143

    describes

    how

    to

    use

    the

    Replication

    Alert

    Monitor

    to

    monitor

    your

    replication

    environment.

    Chapter

    12,

    “On-demand

    reporting

    for

    SQL

    replication,”

    on

    page

    165

    describes

    how

    to

    generate

    and

    view

    reports

    about

    your

    replication

    environment

    on

    demand.

    Chapter

    13,

    “Making

    changes

    to

    an

    SQL

    replication

    environment,”

    on

    page

    173

    describes

    how

    to

    make

    day-to-day

    changes

    in

    your

    replication

    environment.

    Chapter

    14,

    “Maintaining

    an

    SQL

    replication

    environment,”

    on

    page

    205

    explains

    how

    to

    maintain

    your

    source

    systems,

    control

    tables,

    and

    target

    tables.v

    Part

    2,

    “Replication

    Center,”

    on

    page

    217

    describes

    the

    graphical

    user

    interface

    for

    replication.

    It

    includes

    the

    following

    chapters:

    Chapter

    15,

    “Using

    the

    Replication

    Center

    for

    SQL

    replication,”

    on

    page

    219

    describes

    the

    Replication

    Center.

    Chapter

    16,

    “Basic

    SQL

    replication

    scenario:

    DB2

    for

    Windows,”

    on

    page

    243

    describes

    how

    to

    use

    the

    Replication

    Center

    to

    perform

    a

    simple

    replication

    scenario

    using

    sample

    data.v

    Part

    3,

    “Replication

    reference,”

    on

    page

    267

    describes

    replication

    commands

    and

    replication

    table

    structures.

    It

    includes

    the

    following

    chapters:

    Chapter

    17,

    “Naming

    rules

    for

    SQL

    replication

    objects,”

    on

    page

    269

    describes

    how

    to

    specify

    valid

    names

    for

    replication

    objects.

    Chapter

    18,

    “System

    commands

    for

    SQL

    replication

    (Linux,

    UNIX,

    Windows,

    z/OS),”

    on

    page

    271

    describes

    commands

    that

    experienced

    DB2

    replication

    users

    can

    use

    instead

    of

    the

    Replication

    Center

    for

    operating

    replication

    on

    the

    Linux,

    UNIX,

    Windows,

    and

    z/OS

    operating

    systems.

    Chapter

    19,

    “System

    commands

    for

    SQL

    replication

    (OS/400),”

    on

    page

    319

    describes

    the

    commands

    that

    you

    can

    use

    if

    you

    want

    to

    set

    up,

    administer,

    and

    maintain

    replication

    locally

    on

    the

    OS/400

    operating

    system.

    Chapter

    20,

    “Operating

    the

    SQL

    replication

    programs

    (z/OS),”

    on

    page

    405

    describes

    how

    to

    start

    and

    operate

    the

    replication

    programs

    using

    JCL

    or

    system-started

    tasks

    on

    the

    z/OS

    operating

    system.

    Chapter

    21,

    “Using

    the

    Windows

    Service

    Control

    Manager

    to

    issue

    system

    commands

    for

    SQL

    replication

    (Windows),”

    on

    page

    409

    describes

    how

    to

    create

    services

    to

    operate

    the

    Replication

    programs

    on

    the

    Windows

    operating

    system.

    Chapter

    22,

    “Scheduling

    SQL

    replication

    programs

    on

    various

    operating

    systems,”

    on

    page

    413

    describes

    how

    to

    schedule

    the

    Capture,

    Apply,

    and

    Replication

    Alert

    Monitor

    programs

    on

    various

    operating

    systems.

    x

    SQL

    Replication

    Guide

    and

    Reference

    |||

    |||

    ||||

    ||||

  • Chapter

    23,

    “How

    the

    SQL

    replication

    components

    communicate,”

    on

    page

    415

    describes

    how

    the

    replication

    components

    use

    the

    control

    tables

    to

    communicate

    with

    each

    other.

    Chapter

    24,

    “Table

    structures

    for

    SQL

    replication,”

    on

    page

    421

    describes

    the

    table

    structures

    for

    the

    SQL

    replication

    tables

    that

    reside

    on

    the

    various

    SQL

    replication

    servers.v

    Appendixes

    contain

    supplemental

    information

    that

    you

    might

    find

    useful.

    Conventions

    and

    terminology

    used

    in

    this

    book

    This

    book

    uses

    these

    highlighting

    conventions:

    v

    Boldface

    type

    indicates

    commands

    or

    user

    interface

    controls

    such

    as

    names

    of

    fields,

    folders,

    icons,

    or

    menu

    choices.

    v

    Monospace

    type

    indicates

    examples

    of

    text

    that

    you

    enter

    exactly

    as

    shown.

    v

    Italic

    type

    indicates

    variables

    that

    you

    should

    replace

    with

    a

    value.

    It

    is

    also

    used

    to

    indicate

    book

    titles

    and

    for

    emphasis

    of

    words.

    This

    book

    uses

    standard

    terminology

    for

    database,

    connectivity,

    copying,

    SQL,

    and

    LAN

    concepts.

    All

    the

    replication

    concepts

    used

    in

    this

    book

    are

    defined

    in

    the

    glossary.

    Unless

    otherwise

    specified,

    the

    following

    meanings

    are

    assumed:

    UNIX

    UNIX

    refers

    to

    DB2

    Universal

    Database

    for

    all

    UNIX

    operating

    systems

    (such

    as

    UNIX,

    HP

    UX,

    and

    AIX).

    Linux

    Linux

    refers

    to

    DB2

    Universal

    Database

    for

    Linux.

    Windows

    Windows

    refers

    to

    DB2

    Universal

    Database

    for

    Windows.

    OS/400

    OS/400

    refers

    to

    DB2

    DataPropagator

    for

    iSeries.

    z/OS

    z/OS

    refers

    to

    DB2

    Universal

    Database

    for

    z/OS

    and

    OS/390.

    z/OS

    is

    the

    next

    generation

    of

    the

    OS/390

    operating

    system,

    and

    it

    also

    includes

    UNIX

    System

    Services

    (USS)

    on

    z/OS.

    iSeries

    iSeries

    refers

    to

    both

    AS/400

    and

    iSeries

    servers.

    iSeries

    is

    the

    next

    generation

    of

    AS/400

    servers.

    The

    OS/400

    operating

    system

    runs

    on

    both

    AS/400

    and

    iSeries

    servers.

    SQL

    replication

    SQL

    replication,

    also

    referred

    to

    as

    DB2

    replication,

    is

    one

    of

    two

    types

    of

    data

    replication

    developed

    for

    DB2.

    It

    is

    used

    to

    differentiate

    replication

    through

    SQL

    from

    Q

    replication,

    which

    is

    replication

    through

    message

    queues.

    The

    Capture

    program

    reads

    the

    DB2

    recovery

    log

    for

    changes

    to

    a

    source

    table

    that

    you

    specify.

    The

    program

    saves

    transactions

    in

    staging

    tables

    that

    are

    read

    and

    applied

    to

    targets

    by

    the

    Apply

    program

    in

    parallel.

    Q

    replication

    Q

    replication

    is

    a

    high-volume,

    low-latency

    replication

    solution

    that

    uses

    WebSphere

    MQ

    message

    queues

    to

    transmit

    transactions

    between

    source

    and

    target

    databases

    or

    subsystems.

    The

    Q

    Capture

    program

    reads

    the

    DB2

    recovery

    log

    for

    changes

    to

    a

    source

    table

    that

    you

    specify.

    The

    program

    then

    sends

    transactions

    as

    messages

    over

    queues,

    where

    they

    are

    read

    and

    applied

    to

    targets

    by

    the

    Q

    Apply

    program

    in

    parallel.

    About

    this

    book

    xi

    |||

    ||

    ||||||||

    |||||||

  • event

    publishing

    In

    event

    publishing,

    changes

    to

    source

    tables

    are

    translated

    into

    XML

    messages

    and

    sent

    over

    WebSphere

    MQ

    queues

    to

    a

    user

    application

    of

    your

    choice.

    Event

    publishing

    uses

    only

    the

    Q

    Capture

    program,

    not

    the

    Q

    Apply

    program.

    For

    example,

    the

    section

    entitled

    Starting

    the

    Apply

    program

    (Linux,

    UNIX,

    Windows,

    z/OS)

    explains

    how

    to

    start

    the

    Apply

    program

    from

    DB2

    Universal

    Database

    for

    Linux

    and

    for

    all

    UNIX

    operating

    systems,

    DB2

    Universal

    Database

    for

    Windows,

    or

    DB2

    Universal

    Database

    for

    z/OS

    and

    OS/390.

    Also,

    the

    section

    entitled

    Starting

    the

    Apply

    program

    (OS/400)

    explains

    how

    to

    start

    the

    Apply

    program

    if

    you

    are

    using

    DB2

    DataPropagator

    for

    iSeries.

    How

    to

    read

    syntax

    diagrams

    The

    following

    rules

    apply

    to

    the

    syntax

    diagrams

    used

    in

    this

    book:

    v

    Read

    the

    syntax

    diagrams

    from

    left

    to

    right,

    from

    top

    to

    bottom,

    following

    the

    path

    of

    the

    line.

    The

    ��───

    symbol

    indicates

    the

    beginning

    of

    a

    statement.

    The

    ───�

    symbol

    indicates

    that

    the

    statement

    syntax

    is

    continued

    on

    the

    next

    line.

    The

    �───

    symbol

    indicates

    that

    a

    statement

    is

    continued

    from

    the

    previous

    line.

    The

    ───��

    symbol

    indicates

    the

    end

    of

    a

    statement.

    Diagrams

    of

    syntactical

    units

    other

    than

    complete

    statements

    start

    with

    the

    �───

    symbol

    and

    end

    with

    the

    ───�

    symbol.

    v

    Keywords,

    their

    allowable

    synonyms,

    and

    reserved

    parameters,

    are

    either

    shown

    in

    uppercase

    or

    lowercase,

    depending

    on

    the

    operating

    system.

    These

    items

    must

    be

    entered

    exactly

    as

    shown.

    Variables

    appear

    in

    lowercase

    italics

    (for

    example,

    column-name).

    They

    represent

    user-defined

    parameters

    or

    suboptions.

    When

    entering

    commands,

    separate

    the

    parameters

    and

    keywords

    by

    at

    least

    one

    space

    if

    there

    is

    no

    intervening

    punctuation.

    v

    Enter

    punctuation

    marks

    (slashes,

    commas,

    periods,

    parentheses,

    quotation

    marks,

    equal

    signs,

    and

    so

    on)

    and

    numbers

    exactly

    as

    given.

    v

    Footnotes

    are

    shown

    by

    a

    number

    in

    parentheses,

    for

    example,

    (1).

    v

    Required

    items

    appear

    on

    the

    horizontal

    line

    (the

    main

    path).

    ��

    required_item

    ��

    v

    A

    parameter’s

    default

    value

    is

    displayed

    above

    the

    path:

    ��

    default_value

    required_item

    ��

    v

    Optional

    items

    appear

    below

    the

    main

    path.

    ��

    required_item

    optional_item

    ��

    v

    If

    you

    can

    choose

    from

    two

    or

    more

    items,

    they

    appear

    vertically,

    in

    a

    stack.

    If

    you

    must

    choose

    one

    of

    the

    items,

    one

    item

    of

    the

    stack

    appears

    on

    the

    main

    path.

    xii

    SQL

    Replication

    Guide

    and

    Reference

    |||||

  • ��

    required_item

    required_choice1

    required_choice2

    ��

    If

    choosing

    one

    of

    the

    items

    is

    optional,

    the

    entire

    stack

    appears

    below

    the

    main

    path.

    ��

    required_item

    optional_choice1

    optional_choice2