REP709 - TechWave 2004 - PowerPoint PPT Presentation

Loading...

PPT – REP709 - TechWave 2004 PowerPoint presentation | free to download - id: 5292e-ZDc1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

REP709 - TechWave 2004

Description:

DR Site: Sacramento. OpenSwitch. Data Distribution For Standby and Disaster Recovery ... DB App Server. RepServer. 14. Benefits of Replication. Generic Benefits ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 85
Provided by: chrish80
Learn more at: http://download.sybase.com
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: REP709 - TechWave 2004


1
REP 709 Simplifying Replication - Adding
Replicate Sites with Low Overhead
Chris Huston Sybase Replication Server Eng.
Manager Chris.Huston_at_sybase.com August 15-19, 2004
2
The Enterprise. Unwired.
3
The Enterprise. Unwired.
Industry and Cross Platform Solutions
Unwire People
Unwire Information
Manage Information
  • Adaptive Server Enterprise
  • Sybase IQ
  • Dynamic Archive
  • Dynamic ODS
  • Real Time Data Services
  • Replication Server
  • OpenSwitch
  • Mirror Activator
  • PowerDesigner
  • Connectivity Options
  • EAServer
  • PowerBuilder Family
  • Unwired Accelerator
  • Unwired Orchestrator
  • Unwired Toolkit
  • SQL Anywhere Studio
  • Mobile Email Applications
  • Enterprise Portal
  • XcelleNet Frontline Solutions
  • PocketBuilder
  • AvantGo

Sybase Workspace
4
Agenda
  • Introduction
  • Replication Architecture
  • Adding Replication to an Existing Application -
    Demo
  • RS 12.6 Sybase Central Java Plug-in Details
  • RS 12.6 Ease of Use Features ERSSD, MSA
  • Future Improvements
  • Q A

5
Data Movement Business Challenges
  • Business Continuity
  • Eliminate Downtime
  • Provide Continuous Service
  • Protect against Disasters
  • System Migration
  • Migration to Web, Legacy App/Platform migration
  • Deployment of new applications
  • Data and Transaction Synchronization
  • Application Data Availability across geographies
  • Application Data distribution to multiple systems
  • Coordinate Application Data between multiple
    systems

6
Data Movement Solution Areas
High Availability For Database Applications
Customer Data Synchronization
Disaster Recovery For Database Applications
Data Consolidation
Data Distribution
Real-time Data Mart/Warehouse Population
Reporting Servers
Legacy Data Migration and Synchronization
New Application Deployment
7
Data Movement Technology Usage Scenarios
Data Consolidation
Data Distribution
Data Synchronization
8
Data Distribution For Standby and Disaster
Recovery
Site 1 SF (Order Entry)
  • Minimize/eliminate user impact
  • Protect against unplanned outages
  • S/W, H/W, Application failures
  • Unforeseen circumstances like data corruption
  • Protect against planned outages
  • S/W, H/W, Application upgrades
  • Enable ops to perform maintenance
  • Recover from natural disaster
  • Without geographic restrictions

WAN
OLTP Application
ASE
Rep Server
  • Disaster Recovery
  • High Availability
  • Business Continuity

9
Data Distribution
Site 2 New York (Sales)
Rep Server
Oracle
Sales Decision Support
Site 1 San Francisco (Order Entry)
Site 3 San Francisco (Finance)
WAN
OLTP Application
ASE
Rep Server
ASE
Finance Reporting
Site 3 Dallas (Manufacturing)
  • Real time Data Mart
  • Reporting Servers
  • Application Deployment
  • Legacy Data Migration

Decision Support
Rep Server
DB2
10
Data Consolidation
  • Reporting Servers
  • Real time Data Warehouse
  • Application Deployment

11
Data Syncronization
Site 1 New York (Customer Service System)
CSS Application
Oracle
Rep Server
Site 2 Dublin (Engineering Bug Tracking System)
Site 2 Dallas (Web Site)
Rep Server
DB2
Bug Tracking Application
  • Customer Data Synchronization
  • Distributed geographic apps
  • Distributed App over multiple systems

Web Application
Oracle
Rep Server
12
Replication and Live Decision Support
  • Separate Operational data from Decision Support
  • Run intensive queries without effecting the
    performance of transaction processing system
  • Real-time alternative to Data Warehousing

13
Replication and
  • Portals
  • Setup external facing Operational Data Stores
  • Insulate internal business processes from
    external parameters (internet/intranet)

14
Benefits of Replication
  • Sybase Advantage
  • High Performance Data Distribution and
    Consolidation
  • Flexible Transformations
  • Centralized Administration of complex deployments
  • Distributed Architecture with guaranteed delivery
  • Bi-directional synchronization across
    heterogeneous data sources
  • Platform and Database independent
  • Generic Benefits
  • Isolated from Network Outages
  • Independent of Central Server downtime
  • Occasionally connected users
  • Centrally managed, but distributed data

15
Sybase Data Movement Replication Server
  • Sybase Replication server is a real time data
    movement product that provides
  • non-intrusive transaction capture
  • flexible transformation of data
  • Efficient routing across networks
  • Real-time synchronization across heterogeneous
    databases

16
Replication Server Packaging
  • Base
  • Replication to and from Sybase ASE databases
  • Advanced Security
  • Enables SSL encryption between sites and/or
    between Replication Server and ASE
  • Heterogeneous Replication Options
  • Each option enables replication to and from the
    corresponding database

17
Replication System Configuration
  • System Configuration
  • Repservers manage connections to databases
  • Repservers exchange data via routes

18
Sample Replication Architecture GLOBAL,
ENTERPRISE-WIDE DISTRIBUTION FOR A GLOBAL BANKS
TRADING SYSTEM
Tokyo Reporting
London Reporting
Tokyo Trading
London Trading
Remote
Remote
Chicago Trading
Remote
Remote
Accounting
Risk Management
Remote
Chicago Reporting
19
Replication Server System Architecture Warm
Standby with Open Switch

20
Replication System Architecture Function Strings
  • Function Strings allow users to configure the
    application of transactions at the target site.
    Function strings allow
  • Data transformations, Operational
    transformations, conflict resolution, replication
    to proprietary targets (custom language), and
    more
  • A Function String is a template for each
    operation (insert/update/delete) that can be
    customized by the user
  • The function string, if changed by the user, is
    used to apply operations (transactions) at the
    target site
  • Data transformations like aggregation of columns,
    data type conversions, conversion between
    different DB formats etc. can all be accomplished
  • Deletes can be turned into inserts, inserts can
    be turned into stored procs, updates can be
    suppressed, each operation can be turned into a
    proprietary language to be sent to the target,
    etc.

21
Demo - Simple Example
  • Starting Point
  • Existing Application
  • Sybase ASE Database
  • Start and Configure RS
  • Create Replicate ASE Database
  • Mark Primary Database for Replication
  • Add Primary and Replicated Databases to RS
  • Create Database Replication Definition
  • Materialize Data to Replicate Database
  • Create Database Subscription

22
Replication Server Systems Management
  • Existing Replication Server Manager (RSM)
  • 3-tier architecture
  • Middle tier is the RSM Server
  • Client is a Sybase Central plug-in, Microsoft
    Windows only
  • New Replication Manager
  • Simplified systems management solution
  • Sybase Central Java plug-in

23
Replication Manager Details
  • New management tool
  • Support database level replication
  • Provide features to create replication
    environments where entire databases are
    replicated
  • Support existing warm standby features
  • Support the new MSA features in Replication
    Server version 12.6
  • Simplify creating replication environments
  • Provide 2-tier management solution (i.e. RSM is a
    3-tier solution)
  • Supports only ASE replication
  • Supports a limited number of servers (lt 10
    servers)
  • Quickly produce default replication environments

24
Replication Manager Description
  • Provide a Java plug-in for Sybase Central v4.1.1
  • Support multiple platforms (Unix, Windows, Linux)
  • Support ASE version 12.0 to 12.5.1
  • Support Replication Server version 12.0 to 12.6
  • Installs and operates in the same Sybase Central
    instance as ASE version 12.5.1
  • Co-exist with environments managed by RSM
  • Produce a look and feel that is common to other
    Sybase Central plug-ins especially the ASE
    plug-in
  • Begin migrating the existing RSM plug-in to
    Sybase Central Java edition

25
Replication Manager Features
  • Environment
  • Configure Replication wizard
  • Database connections
  • Logical connections
  • Database definitions and subscriptions
  • Replication Server users
  • Sybase Central log
  • Miscellaneous features

26
Replication Manager Features
  • Replication Manager and Sybase Central 4.1.1

Sybase Central 4.1.1
Wizards
ASE Plug-in
Replication Manager Plug-in
Managed Servers
Replication Environment
27
Replication Manager Features
  • Replication Environments
  • An Environment is a set of servers that
    participate in data replication
  • ASE servers, Replication Servers, and ASA
    (embedded RSSD)
  • Does not have to contain all servers in a
    replication domain
  • Does not have to contain the ID Server
  • A user defines an environment using the Add
    Replication Environment wizard
  • When defining an environment the user provides a
    user name and password that the plug-in will use
    to access each server
  • ASE sa_role and sso_role
  • Replication Server System Administrator
  • ASA read, write, and execute all objects in the
    RSSD

28
Replication Manager Features
  • Replication Environments continued
  • Environments are persistent, the user logs into
    an Environment after starting Sybase Central
  • Server information is stored in the Sybase
    Central user repository file (encrypted)
  • Access to an Environment is controlled through a
    user name and password
  • User can define more then one Environment

29
Replication Manager Features
  • Configure Replication Wizard
  • The goal is to produce a working replication
    environment in just a few steps
  • Prompts the user for server and database names,
    user names and passwords, materialization
    processing, etc.
  • Standard warm standby environment
  • New MSA environment where a primary database is
    replicated to multiple replicate databases
  • New MSA environment where data is shared between
    multiple databases (bi-directional)

30
Replication Manager Features
  • Configure Replication Wizard - continued
  • Warm Standby
  • Creates database connections for the active and
    the standby databases
  • Creates the logical connection
  • Creates the maintenance user and the replication
    agent user
  • Initializes the replication agent on the active
    database
  • Supports the materialization dump marker. Note,
    materialization is a separate, manual process
  • One pass through the wizard creates a working
    warm standby environment!

31
Replication Manager Features
  • Configure Replication Wizard - continued
  • Multiple Replicate Databases
  • Creates a connection for the primary database
  • Initializes the replication agent on the primary
    database
  • Creates a database replication definition for the
    primary database
  • Creates a connection for each of the replicate
    databases
  • Creates subscriptions for each replicate database
  • Creates the maintenance users and rep agent user
    for each connection
  • Supports the materialization dump marker. Note,
    materialization is a separate, manual process
  • By default all tables and stored procedures are
    replicated, and DDL is replicated
  • One pass through the wizard creates a working
    environment!

32
Replication Manager Features
  • Configure Replication Wizard - continued
  • Bi-Directional Replication
  • Creates a connection for all selected databases
  • Initializes the replication agent on each
    database
  • Creates a database replication definition for
    each database
  • Creates subscriptions for each database, for
    every other replication definition
  • Creates the maintenance users and rep agent users
    for each connection
  • Supports the materialization dump marker. Note,
    materialization is a separate, manual process
  • By default all tables and stored procedures are
    replicated. However, DDL is not replicated.
  • One pass through the wizard creates a working
    environment!

33
Replication Manager Features
  • Replication Server
  • Manage the configuration parameters of a
    Replication Server

34
Replication Manager Features
  • Database Connections
  • Create and manage database connections

35
Replication Manager Features
  • Database Connections continued
  • Create connections using either the Configure
    Replication wizard or the Add Connection wizard
  • Delete database connections
  • Suspend and resume connections
  • Manage the connection and replication agent
    configuration parameters
  • Display the state of the connections
  • State displayed in the Sybase Central viewer
  • Note, Replication Manager does not perform any
    monitoring. Must manually refresh Sybase Central
    to get the latest state

36
Replication Manager Features
  • Logical Connections
  • Create and manage logical connections

37
Replication Manager Features
  • Logical Connections continued
  • Create logical connections using the Configure
    Replication wizard
  • Delete logical connections
  • Manage the database connections that make up a
    logical connection
  • Switch the direction of replication within the
    logical connection
  • Create database level replication definitions and
    subscriptions for a logical connection

38
Replication Manager Features
  • Database Replication Definition
  • Create, alter, and delete database replication
    definitions for both physical and logical
    connections

39
Replication Manager Features
  • Database Replication Definition continued
  • Create replication definitions using either the
    Configure Replication wizard or the Add Database
    Replication Definition dialog
  • Alter existing database replication definitions
  • Delete database replication definitions
  • Database Replication Definition dialog provides
    the ability to filter
  • DDL
  • Tables
  • Stored procedures
  • Transactions
  • System procedures

40
Replication Manager Features
  • Database Replication Definition continued
  • Filter Settings
  • Replicate all objects
  • Replicate no objects
  • Exclude objects selected in the list
  • Replicate only the objects selected in the list
  • Free form filtering allows you to wild card the
    user name or the object name (e.g. .tbl or
    owner.)

41
Replication Manager Features
  • Database Subscription
  • Create, alter, and delete database subscriptions
    for both physical and logical connections

42
Replication Manager Features
  • Database Subscription continued
  • Create subscriptions using either the Configure
    Replication wizard or the Add Database
    Subscription dialog
  • Delete database subscriptions
  • Supports the materialization dump marker
  • Activate and validate database subscriptions
  • Displays the state of the subscription on the
    Sybase Central viewer and on the subscription
    dialog

43
Replication Manager Features
  • Sybase Central Log
  • The Replication Manager writes log entries to the
    Sybase Central log

44
Replication Manager Features
  • Sybase Central Log continued
  • The Replication Manager writes error messages and
    trace messages to the log
  • Optionally, all SQL commands sent to the servers
    are written to the log
  • Note, passwords are also written to the log
  • SQL command logging is set on the Replication
    Manager properties dialog
  • The Sybase Central View menu contains the Log
    Viewer menu item
  • The log is not persistent

45
Replication Manager Features
  • Miscellaneous Features
  • Log SQL commands in the Sybase Central log
  • Provides application level on-line help
  • Installs and runs in the same Sybase Central
    instance as the ASE plug-in
  • Can run in an environment that is also being
    managed by RSM

46
Replication Manager Future Release
  • This is only the beginning!
  • By the next major release of Replication Server,
    the Replication Manager will completely replace
    the current RSM plug-in.
  • Provide all current RSM features
  • Support non-ASE data replication using LAN Rep
    Agents
  • Support the RSM Server in a 3-tier solution
  • Continue to support a simplified 2-tier solution
  • Continue close integration with the ASE plug-in
    and other Sybase products
  • Interim release of Replication Manager expected
    early Q3, 2004

47
Embedded RSSD - Introduction
  • ERSSD stands for Embedded Replication Server
    System Database.
  • ERSSD is provided as an option in Replication
    Server 12.6. Traditional RSSD on ASE will
    continue to be supported.
  • ERSSD is supported on Solaris, HP, Windows, IBM,
    Linux.

48
ERSSD - ASE RSSD vs ERSSD
  • Repserver with traditional RSSD on ASE
  • An ASE must be running before installing and
    starting repserver.
  • ASE server and RSSD must be managed separately.
  • Suitable where ASE expertise is available onsite.
  • Repserver with Embedded RSSD on ASA
  • No server needs to be running before installing
    Repserver. ERSSD will be initialized, started,
    and configured automatically.
  • No maintenance requirement. Backup is
    pre-configured and unattended.
  • Startup and shutdown are automatic.
  • No ASA expertise required.

49
ERSSD - Feature Overview
  • Embedded RSSD
  • Uses Adaptive Server Anywhere 8.02 network server
  • Acts as an Open Server to Repserver
  • Initialized/configured/started by rs_init at
    Repserver installation time
  • Uses mirrored transaction log
  • Pre-configured to have nightly automated backup
  • Restarted/shutdown by Repserver as needed
  • Requires no routine maintenance
  • Restrictions
  • New installs only, no upgrade
  • Cannot be source of a route (Cant replicate
    ERSSD) (RS 15.0 feature)
  • No migrations between ASE RSSD and ERSSD.

50
ERSSD Installation - New directories/Files
  • Subdirectories under SYBASE/SYBASE_REP
  • ASA8 contains ASA executables, libraries,
    scripts, and locale files necessary for ERSSD.
  • dbfile default database directory. Created only
    if needed.
  • translog default transaction log directory.
    Created only if needed.
  • backup default backup directory. Created only if
    needed.
  • errorlog default error log directory. Created
    only if needed.
  • New scripts
  • rs_init_asa.sql
  • rs_install_systables_ase.sql
  • rs_install_systables_asa.sql
  • rsprocs_ase.sql
  • rsprocs_asa.sql
  • Obsolete scripts
  • rs_install_systables.sql
  • rsprocs.sql

51
ERSSD Installation - New rs_init screens
52
Installation New rs_init screens
53
ERSSD Installation - New rs_init screens
54
ERSSD Installation - Behind the scenes
  • rs_init performs the following tasks
  • Call dbinit to initialize the database file in
    the specified database directory.
  • Call dblog to
  • Put the transaction log file in the transaction
    log directory
  • Put the transaction log mirror file in the backup
    directory
  • Call dbspawn to start the ERSSD. ERSSD always run
    on the same machine as rs_init/repserver.
  • Load rs_init_asa.sql to configure ERSSD. First
    backup is performed at the end of this script.
  • Continue with other rs_init tasks similar to RSSD
    on ASE.

55
ERSSD Installation - ERSSD files
  • ERSSD files installed by rs_init
  • Database File
  • erssd_name.db
  • Can be found in the database directory
  • Transaction log file
  • erssd_name.log
  • Can be found in the transaction log directory
  • Truncated after a backup
  • Transaction log mirror
  • erssd_name.mlg
  • Can be found in the backup directory
  • Truncated after a backup
  • For performance and recoverability, these three
    files should be put on different physical devices

56
ERSSD Administration
  • No routine maintenance necessary
  • Database file is pre-configured to be backed up
    at 100am each day.
  • Transaction log is mirrored, providing maximum
    recoverability.
  • Automatically started by Repserver/rs_init
  • Shutdown by Repserver when Repserver is shutdown.

57
ERSSD Administration - Obtain ERSSD info.
  • New Repserver Command
  • 1gt sysadmin erssd
  • 2gt go
  • ERSSD Name ERSSD Database File
  • ERSSD Transaction Log ERSSD
    Transaction Log Mirror
  • ERSSD Backup Start Time ERSSD Backup
    Start Date ERSSD Backup Interval
  • ERSSD Backup Location
  • ------------ -----------------------------------
  • ---------------------------------
    ------------------------------------
  • -----------------------
    ----------------------- ---------------------
  • ---------------------
  • REP_ERSSD /dbfile/REP_ERSSD.db
  • /translog/REP_ERSSD.log
    /backup/REP_ERSSD.mlg
  • 100AM 2003-09-23
    24 hours
  • /backup

58
ERSSD Administration - Obtain ERSSD info.
  • New Lines in Repserver config file
  • RSSD_embeddedyes
  • erssd_errorlog/errorlog/REP_ERSSD.out
  • erssd_port5003

  • Do not edit the following ERSSD lines.

  • erssd_dbfile/dbfile/REP_ERSSD.db
  • erssd_translog/translog/REP_ERSSD.log
  • erssd_logmirror/backup/REP_ERSSD.mlg
  • erssd_backup_dir/backup

59
ERSSD Administration - Users
  • Primary user
  • Internally generated as
  • User Name repserverName_RSSD_prim
  • Password repserverName_RSSD_prim_ps
  • Acts as the SA user
  • To change ERSSD primary user password, use
    Repserver command
  • Alter user ltusernamegt set password ltnewPwgt
  • It will
  • change the password at Repserver and ERSSD
  • update ERSSD tables
  • update the config file
  • refresh Repserver memory.
  • Do not update config file directly. Do not use
    rs_init to change the config file even if using
    password encryption.

60
ERSSD Administration - Users
  • Maintenance user
  • Internally generated as
  • User Name repserverName_RSSD_maint
  • Password repserverName_RSSD_maint_ps
  • To change ERSSD maintenance user password, use
    Repserver command
  • alter connection to lterssdNamegt.lterssdNamegt
  • set password to ltnewPwgt
  • It will
  • change the password at ERSSD
  • update ERSSD tables
  • Update config file
  • Restart ERSSD DSI queue to use the new password.
  • Do not update config file directly. Do not use
    rs_init to change the config file even if using
    password encryption.

61
ERSSD Administration - Backup
  • ERSSD runs on database file and transaction log
    file
  • /dbfile/erssd_name.db
  • /translog/erssd_name.log
  • Transaction log is mirrored, providing a
    continuous backup of the log
  • /backup/erssd_name.mlg
  • An automatic full backup of the database and
    transaction log is done at default 1am every 24
    hours
  • /backup/erssd_name.db
  • /backup/erssd_name.log
  • First automatic backup is done immediately after
    ASA is started
  • The previous copy of the backup is automatically
    saved so that if the machine crashes during a
    backup, we have something to fall back on
  • /backup/erssd_name.db.pre
  • /backup/erssd_name.log.pre
  • The new transaction log is truncated after a
    backup
  • There should only be no more than 5 files in the
    backup directory transaction log mirror, two
    current backup files, two previous backup files.

62
ERSSD Administration - Backup
  • Four New Configuration Parameters
  • erssd_backup_dir
  • Default is the backup directory specified in
    rs_init
  • Changing this value will only change the backup
    location, not the transaction log mirror location
  • Changing this value will trigger an immediate
    backup
  • erssd_backup_start_time
  • Default 1am.
  • erssd_backup_start_date
  • Default date of the installation
  • erssd_backup_interval
  • Default every 24 hours
  • These parameters can only be altered using
    configure replication server command. Do not
    update the rs_config table or use rs_configure
    stored procedure.

63
ERSSD Administration - Backup
  • To perform a one-time, unscheduled backup of the
    ERSSD
  • 1gt sysadmin erssd, backup
  • 2gt go

64
ERSSD Administration - Recovery
  • Recovery from log corruption
  • Identify which of the two files is corrupt
  • dbtran erssd_name.log
  • dbtran erssd_name.mlg
  • dbtran will translate the log and output a sql
    file if the log is good
  • dbtran will report error if log is corrupt
  • Copy the good file over the corrupt file (using
    operating system command cp for Unix and copy for
    Windows)
  • Restart Repserver, which will automatically
    restart ERSSD

65
ERSSD Troubleshooting
  • erssdname.out
  • This is the ERSSD error log
  • The full path can be found in the config file
  • dbping.out
  • Used only if using diag Repserver binary.
  • Can be found in the same directory as the ERSSD
    error log.
  • Config file line erssd_start_cmd
  • Provides an alternative to the default dbspawn
    command.
  • Used for debugging purpose only.
  • Unpublished in user documents.
  • Config file line erssd_ping_cmd
  • Provides an alternative to the default dbping
    command.
  • Used for debugging purpose only.
  • Unpublished in user documents.
  • Config file line erssd_release_dir
  • Provides an alternative to the default ERSSD
    release directory SYBASE/SYBASE_REP/ASA8
  • Used for debugging purpose only
  • Unpublished in user documents.

66
ERSSD Product Documentation
  • For general information, see repserver
    Administration Guide.
  • More details available in ERSSD whitepaper on SDN.

67
ERSSD - Future Releases
  • Automatic ERSSD recovery in case of media failure
    on ERSSD files
  • ERSSD replication create route from Repserver
    with ERSSD
  • Migration between ERSSD and ASE RSSD

68
Multiple Site Availability(MSA)
  • MSA makes database available at multiple,
    geographically/departmentally separated sites

69
MSA - Why Better and Easier?
  • MSA Provides
  • DDL Replication to non-Warm Standby databases
  • System stored procedure replication to non-Warm
    Standby databases
  • Replication to multiple standby databases
  • Significantly less setup and configuration
  • Provides filters to remove work tables, functions
    or unwanted and large transactions from being
    replicated

70
MSA - Simplying Replication
  • Based on Repserver existing publish/subscribe
    model, MSA introduces
  • Database Replication Definition
  • Database Subscription
  • MSA introduces filters for replication definition
  • DDL, System Procedure, Table, and Function filter
  • Transaction filter
  • Owner and User filter

71
MSA - Syntax DB Replication Definition
  • create database replication definition db_def
  • with primary at srv.pdb
  • not replicate DDL
  • not replicate system procedures in ()
  • not replicate tables in ()
  • not replicate functions in ()
  • not replicate transactions in ()
  • alter database replication definition db_def
  • with primary at srv.pdb
  • not replicate DDL system procedures
  • tables functions transactions in()
  • drop database replication definition db_def
  • with primary at srv.pdb

72
MSA - Syntax Database Subscription
  • create subscription db_sub
  • for database replication definition db_rep
  • with primary at srv.pdb
  • with replicate at
  • / cannot have where
    clause /
  • subscribe to truncate table
  • define subscription db_sub
  • for database replication definition db_rep
  • with primary at srv.pdb
  • with replicate at
  • use dump marker
  • activate validate check subscription db_sub
  • for database replication definition db_rep
  • with primary at srv.pdb
  • with replicate at

73
MSA - Example I Multiple Copies
  • One primary and multiple read-only replicates.
  • All you need are two steps
  • Step one for the primary database
  • create database replication definition db_def
  • with primary at srv.pdb
  • Mark each replication table using sp_setreptable
  • MSA does not require table replication
    definitions
  • Step two for each replicated database
  • create subscription db_subxx
  • for database replication definition db_def
  • with primary at srv.rdb
  • with replicate at srvxx.rdbxx
  • without materialization

74
MSA - Example I Multiple Copies
  • One primary and three read-only replicates

DB Sub
DB RepDef
DB Sub
DB Sub
75
MSA - Example II Multiple Standbys
  • One primary and multiple standby replicates
  • For each database
  • Step one
  • Create a database replication definition
  • Mark the database using sp_reptostandby
  • Configure Rep Agent for standby replication
  • Step two
  • Create database subscription for database
    replication definitions from other database
  • Switchover
  • Manually drain out queues and then switch users

76
MSA - Example II Multiple Standbys
  • One primary and two standby databases

DB RepDef
Sub
Sub
DB RepDef
Sub
Sub
DB RepDef
Sub
Sub
77
MSA - Example III Database Filter
  • Filter out work table activities
  • create database replication definition db_def
  • with primary at srv.pdb
  • not replicate tables in (test, temp, guest.)
  • Filter out functions
  • create database replication definition db_def
  • with primary at srv.pdb
  • not replicate system procedures in
  • (sp_config_rep_agent, sp_adduser)
  • Filter out specific(batch, named, etc)
    transactions
  • create database replication definition db_def
  • with primary at srv.pdb
  • not replicate transactions in (maint., nightly)

78
MSA - Feature Details
  • MSA works with existing table level replication
  • Table/function repdefs/subscriptions are highest
    precedence
  • Database repdefs/subscriptions work with
    table/function replication
  • MSA and Warm standby can co-exist
  • Current Warm Standby pairs can add MSA function
  • Allows for automated switch in traditional WS
    with multiple other replicated sites as the
    primary or replicate source or target

79
MSA - Database Materialization
  • When creating database subscription, can choose
  • Without materialization method
  • Dump/Load coordinated bulk materialization method
  • Manually coordinated bulk materialization method
  • When dropping database subscription, must use
  • Without purge method
  • No automatic (de)materialization method provided
  • Can use rs_marker to simulate atomic and
    non-atomic materialization method

80
MSA - Function Strings
  • Class scope function strings always customizable
  • MSA uses connection associated function string
    class
  • If there is a table replication definition with
    the send standby clause
  • Can alter function strings of the replication
    definition
  • If there is no table replication definitions with
    the send standby clause
  • MSA uses rs_default_function_class
  • Cannot customize default function string class

81
MSA vs. Table Replication Def.
  • MSA does not require table replication definition
  • Same as warm standby replication
  • Table replication definitions provide benefits
  • Provide primary key for improving performance
  • Change declared data type
  • Table replication definition require with the
    send standby clause
  • Customize function string scope function strings
  • Change published data types
  • Replicate minimal columns and changed text columns

82
MSA vs. Table Subscription
  • MSA and table/function subscription can co-exist
  • If both methodology co-exist
  • Table subscriptions override database
    subscriptions

DIST
Out Queues
SQM
SQM
SRE
In Queue
Yes
Tran Filter
TD
SQT
Table sub?
MD
SQT
No
DSRE
83
MSA vs. Warm Standby
  • MSA and warm standbys can co-exist

Logical Connection
Logical Connection
DB RepDef
DB Sub
active
Logical Connection
active
standby
active
DB Sub
standby
standby
84
SDN Presents CodeXchange
A Great Benefit for Sybase Developers
  • Forum for exchanging samples, tools, scripts,
    etc.
  • New features enable community collaboration
  • Download samples created by Sybase or external
    users
  • Leverage contributions of others to extend Sybase
    products
  • Contribute code or start your own collaborative /
    open source project with input from other product
    experts
  • Any SDN member can participate
  • Log in using your MySybase account via SDN
  • www.codexchange.sybase.com
  • Or via SDN at www.sybase.com/developer
About PowerShow.com