Configuring Heterogeneous Replication server for MSSQL



Similar documents
Video Administration Backup and Restore Procedures

SQL Server Setup for Assistant/Pro applications Compliance Information Systems

Moving the TRITON Reporting Databases

DESLock+ Basic Setup Guide Version 1.20, rev: June 9th 2014

Installation Instruction STATISTICA Enterprise Small Business

WhatsUp Gold v16.1 Installation and Configuration Guide

SQL Tuning and Maintenance for the Altiris Deployment Server express database.

Cloud Services ADM. Agent Deployment Guide

SELF SERVICE RESET PASSWORD MANAGEMENT DATABASE REPLICATION GUIDE

Training module 2 Installing VMware View

Installation Instruction STATISTICA Enterprise Server

Chapter Replication in SQL Server

STATISTICA VERSION 9 STATISTICA ENTERPRISE INSTALLATION INSTRUCTIONS FOR USE WITH TERMINAL SERVER

Aradial Installation Guide

WhatsUp Gold v16.3 Installation and Configuration Guide

STATISTICA VERSION 12 STATISTICA ENTERPRISE SMALL BUSINESS INSTALLATION INSTRUCTIONS

VERITAS Backup Exec TM 10.0 for Windows Servers

Dell UPS Local Node Manager USER'S GUIDE EXTENSION FOR MICROSOFT VIRTUAL ARCHITECTURES Dellups.com

NSi Mobile Installation Guide. Version 6.2

Active Directory Management. Agent Deployment Guide

MS SQL Server Database Management

NTP Software File Auditor for Windows Edition

WhatsUp Gold v16.2 Database Migration and Management Guide

Installing Cobra 4.7

Setting up a database for multi-user access

Setting Up ALERE with Client/Server Data

Lepide Active Directory Self Service. Installation Guide. Lepide Active Directory Self Service Tool. Lepide Software Private Limited Page 1

Embarcadero Performance Center 2.7 Installation Guide

Operating System Installation Guide

Team Foundation Server 2012 Installation Guide

Installation Guide. Novell Storage Manager for Active Directory. Novell Storage Manager for Active Directory Installation Guide

WhatsUp Gold v16.2 Installation and Configuration Guide

Configure Single Sign on Between Domino and WPS

PrivateWire Gateway Load Balancing and High Availability using Microsoft SQL Server Replication

Secure Messaging Server Console... 2

WhatsUp Gold v16.1 Database Migration and Management Guide Learn how to migrate a WhatsUp Gold database from Microsoft SQL Server 2008 R2 Express

Intelligent Power Protector User manual extension for Microsoft Virtual architectures: Hyper-V 6.0 Manager Hyper-V Server (R1&R2)

Remote Management System

Plug-In for Informatica Guide

Voyager Reporting System (VRS) Installation Guide. Revised 5/09/06

for Networks Installation Guide for the application on the server July 2014 (GUIDE 2) Lucid Rapid Version 6.05-N and later

Chancery SMS Database Split

Secret Server Installation Windows 8 / 8.1 and Windows Server 2012 / R2

File Auditor for NAS, Net App Edition

Replication Server SP100

3 Setting up Databases on a Microsoft SQL 7.0 Server

Matisse Installation Guide for MS Windows. 10th Edition

Installation Troubleshooting Guide

Using LDAP Authentication in a PowerCenter Domain

System Administration Training Guide. S100 Installation and Site Management

WhatsUp Gold v16.0 Database Migration and Management Guide Learn how to migrate a WhatsUp Gold database from Microsoft SQL Server 2005 Express

White Paper. Fabasoft Folio Thin Client Support. Fabasoft Folio 2015 Update Rollup 2

Nexio Connectus with Nexio G-Scribe

Setup and configuration for Intelicode. SQL Server Express

MICROSTRATEGY 9.3 Supplement Files Setup Transaction Services for Dashboard and App Developers

Crystal Reports Installation Guide

V Series Rapid Deployment Version 7.5

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

Using Microsoft Windows Authentication for Microsoft SQL Server Connections in Data Archive

CIMHT_006 How to Configure the Database Logger Proficy HMI/SCADA CIMPLICITY

QUANTIFY INSTALLATION GUIDE

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

Enterprise Manager. Version 6.2. Installation Guide

Getting Started with Attunity CloudBeam for Azure SQL Data Warehouse BYOL

SQL Server Replication Guide

Metalogix SharePoint Backup. Advanced Installation Guide. Publication Date: August 24, 2015

Install SQL Server 2000 for optimal usability

Matisse Installation Guide for MS Windows

IIS, FTP Server and Windows

Active Directory Management. Agent Deployment Guide

White Paper. Installation and Configuration of Fabasoft Folio IMAP Service. Fabasoft Folio 2015 Update Rollup 3

Instructions for update installation of ElsaWin 5.00

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

Team Foundation Server 2013 Installation Guide

DB Administration COMOS. Platform DB Administration. Trademarks 1. Prerequisites. MS SQL Server 2005/ Oracle. Operating Manual 09/2011

How to Setup SQL Server Replication

SEER Enterprise Shared Database Administrator s Guide

ODBC Driver Version 4 Manual

Database Migration and Management Guide v15.0

Outlook Profile Setup Guide Exchange 2010 Quick Start and Detailed Instructions

for Networks Installation Guide for the application on the server August 2014 (GUIDE 2) Lucid Exact Version 1.7-N and later

Converting InfoPlus.21 Data to a Microsoft SQL Server 2000 Database

Preparing a SQL Server for EmpowerID installation

GUARD1 PLUS SE Administrator's Manual

Creating IBM Cognos Controller Databases using Microsoft SQL Server

4cast Client Specification and Installation

Overview... 1 Requirements Installing Roles and Features Creating SQL Server Database... 9 Setting Security Logins...

NovaBACKUP xsp Version 15.0 Upgrade Guide

STATISTICA VERSION 10 STATISTICA ENTERPRISE SERVER INSTALLATION INSTRUCTIONS

Connecting to Manage Your MS SQL Database

Microsoft Business Intelligence 2012 Single Server Install Guide

PaperClip Audit System Installation Guide

PUBLIC Installation: SAP Mobile Platform Server for Linux

Configuring Outlook for Windows to use your Exchange

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Configure AlwaysOn Failover Cluster Instances (SQL Server) using InfoSphere Data Replication Change Data Capture (CDC) on Windows Server 2012

Install MS SQL Server 2012 Express Edition

DESlock+ Basic Setup Guide ENTERPRISE SERVER ESSENTIAL/STANDARD/PRO

How To Create An Easybelle History Database On A Microsoft Powerbook (Windows)

Transcription:

Configuring Heterogeneous Replication server for MSSQL Recommendations First Sybase recommends that ECDA for ODBC, and the target database reside on the same machine. MSSQL database should be set to capability mode 2005(90) - I am not sure that this is true. Early testing has shown that we can replicate to a MSSQL server DB set to 2008(100). System requirements Repserver, 512MB RAM, 380MB disk ECDA, 512MB RAM, 300BM disk Configuring ECDA Option for ODBC 1. Open ODBC Driver manager from Control panel 2. Add System DNS connection for SQL Server driver called ECDA_TRAIN1 3. Server name is VM_TRAIN\MSSQL_TRAIN1 4. Use SQL Server authentication, userid=sa, password=oranges1. *note: in some clients systems, we have found that we had to setup the ODBC connection using a Domain User account and use a User DNS. Configuring and starting the DirectConnect server 1. Start %SYBASE%\DC-15_0\DCWizard/ DCWizard.bat 2. Select the ECDA Option for ODBC 3. Set server name= MSSQL_TRAIN1_DC, port=8000 4. Enter service name = ECDA_TRAIN1 5. Finally, select the Create Server button 6. Start the service 7. Edit C:\sybase\DC-15_0\servers\MSSQL_TRAIN1_DC\cfg\ dcany.cfg to contain the following:- [Service Library] {Client Interaction} [ECDA_TRAIN1] {ACS Required} ConnectionSpec1=ECDA_TRAIN1 {Client Interaction} EnableAtStartup=yes TransactionMode=long SendWarningMessages=yes {Target Interaction} Allocate=connect SQLTransformation=passthrough ReturnNativeError=yes {Catalog Stored Procedures} CSPColumnODBCVersion=3 Note1: the section name and ConnectionSpec1 settings are set to the name of our service. This name must match the name given to the ODBC connection. 1

Testing 1. Start DirectConnect service, C:\sybase\DC-15_0\bin>DCStart.bat -SMSSQL_TRAIN1_DC 2. Connect using isql from a MS-DOS session C:\sybase\DC-15_0>DC_SYBASE.bat C:\sybase\DC-15_0>isql -Usa -Poranges1 -SECDA_TRAIN1 Verify the connection to the replicate Microsoft SQL Server database by obtaining the DBMS name and version number: select @@sqldbmsname SQLDbmsName --------------------- Microsoft SQL Server Well done. You have configured the DirectConnect server! Create a replication maintenance user in Microsoft SQL Server 1. In the Sybase serer (primary) sp_addlogin rep_maint, rep_maint_ps, pubs2 sp_role grant, replication_role, rep_maint use pubs2 sp_addalias rep_maint, dbo 2. In MSSQL server (replicate) CREATE LOGIN rep_maint WITH PASSWORD='rep_maint_ps', DEFAULT_DATABASE=pubs2 use pubs2 CREATE USER rep_maint FOR LOGIN rep_maint; EXEC sp_addrolemember 'db_owner', 'rep_maint'; Add databases to Replication System Primary DB Use rs_init to add primary database. This will configure the rep_agent and rs_* objects to the ASE database and add the connection to the repserver. 1. Start rs_init and select to Add a database from the replication configuration dialogue 2. Give a server name of SYB_TRAIN1_RS 3. In the Database Information dialogue box fill in all the details and make sure you answer yes to Will the database be replicated. Accept the suggested user name and password for the maintenance user. 4. Finally, once you are happy that all the information, select Continue from the Add database to replication system dialogue box. 2

Replicate DB With the DC still running, log into the RS server create connection to ECDA_TRAIN1.pubs2 using profile rs_ase_to_msss;standard set username rep_maint set password "rep_maint_ps" admin who You should see similar entries to this:- 28 DSI EXEC Awaiting Command 105(1) ECDA_TRAIN1.pubs2 27 DSI Awaiting Message 105 ECDA_TRAIN1.pubs2 26 SQM Awaiting Message 105:0 ECDA_TRAIN1.pubs2 Get replicating We will add a database, and then define a simple replication definition (repdef), which we will subscribe to in MSSQL Server. Creating the primary database ASE disk init name="pubs2_data01", physname="c:\sybase_15\pubs2_data01.dat", size="20m" sp_diskdefault pubs2_data01, defaulton sp_diskdefault master, defaultoff cd $SYBASE/ASE-15_0/scripts ISQL -iinstpbs2 MSSQL Create small database using wizard, called pubs2 Create the Replication Definition In ASE, use pubs2 -- get the repdef from the table 1> sp gen_repdef_ashley "create", publishers, LOGICAL_SRV, logical_db 2> create replication definition publishers_repdef with primary at LOGICAL_SRV.logical_db with all tables named 'publishers' ( pub_id char(4), pub_name varchar(40), city varchar(20), state char(2) ) primary key (pub_id) replicate minimal columns Run the above output into the RS! Synchronise the table data between ASE & MSSQL In ASE, -- First, reverse engineer the table 1> sp revtable publishers 2> -- Table_DDL ---------------------------------------------------------------------- CREATE TABLE publishers ( pub_id char(4) NOT NULL, pub_name varchar(40) NULL, city varchar(20) NULL, state char(2) NULL ) -- Index_DDL ---------------------------------------------------------------------- create unique clustered index pubind on dbo.publishers (pub_id) Run the above output into MSSQL, pubs2 database, to create the empty table. 3

Use BCP to copy data:- bcp pubs2..publishers out publishers.txt -SSYB_TRAIN1 -Usa -Poranges1 c msbcp pubs2..publishers in publishers.txt -Usa -Poranges1 -SVM-TRAIN\MSSQL_TRAIN1 c *note, I have changed the name of the Microsoft bcp.exe to msbcp.exe, to differentiate between the two versions of this utility. Create Subscription to our new repdef In RS, create subscription publishers_sub for publishers_repdef with replicate at ECDA_TRAIN1.pubs2 without materialization check subscription publishers_sub for publishers_repdef with replicate at ECDA_TRAIN1.pubs2 Mark the table for replication This step is vital, yet very simple. I have lost track of the number of times I have fortten to do this! In ASE, sp_setreptable publishers, true Insert sample row insert into publishers values('9999', 'Fancypants publishing', 'London', 'NA') Now in ASE & MSSQL compare the returned rows from Truncate tab If they are the same, congratulations you have installed replication between Sybase and MSSQL, using a simple repdef-subscription model. If the results are not the same, back and check each step, one at a time. Supplementary Note I - How to automatically start DirectConnect server at boot time? (From the manual DirectConnect for z/os Option Server Administration Guide for DirectConnect) Chapter 5 Setting up SSL and a Windows Service Installing a DirectConnect server as a Windows service DirectConnect no longer automatically creates the server as a Windows service. However, you can run a DirectConnect server as a Windows service. The following describes how to register, configure, start, stop, and remove DirectConnect as a Windows service. Register DirectConnect as a Windows service To register DirectConnect: Execute the AddWinService.bat located in the DC-12_6\bin directory using your name for the "Windows service name" and the name of the DirectConnect server: AddWinService <Windows_service_name> <server_name> For example: AddWinService dcservice dcserver Configure DirectConnect as a Windows service To configure DirectConnect to run as a Windows service: Install DirectConnect on your local hard drive. WARNING! Do not install DirectConnect under a clear case filesystem, or remotely, or in a shared file system, it may cause DirectConnect to fail during file I/O. Turn off all server tracing and logging to the screen (console) by accessing the "Logging' and "Tracing" configuration properties. 4

Perform DirectConnect licensing as described in Chapter 2, "Sybase Software Asset Management (SySAM)," of the installation guide for your platform. To ensure the environment created by DC_SYBASE.bat is also your system environment. Set SYBASE, SYBASE_ECON, SYBASE_SYSAM, and PATH accordingly. Verify configuration by starting the DirectConnect sever using DCStart.bat at the command line. Verify that only the copyright notice is written to the screen (console). No licensing dialog should be displayed. Start DirectConnect as a Windows service To start DirectConnect as a Windows service: Open the Windows Services control panel. Right click on the DirectConnect Windows service. Select start. Stop DirectConnect as a Windows service To stop DirectConnect as a Windows service: Open the Windows Services control panel. Right click on the DirectConnect Windows service. Select stop. Remove DirectConnect as a Windows service To remove DirectConnect as a Windows service: Using the Windows Services control panel, stop the DirectConnect service. Execute the RemoveWinService.bat located in the DC-12_6\bin directory using the name of the DirectConnect Windows service. Enter the following: RemoveWinService <Windows_service_name> These bat files are in the directory is %SYBASE\DC-12_6\bin Supplementary Note II adding additional Services You can have multiple database connections against a single Direct Connect server. These are called (rather confusingly, Services). The following is and example of how to add a new Service to an existing DC server. 1. Create new ODBC connection to target server (MSSQL) and specify the name of the target database. 2. Next, to help the DC know how to connect to the new service, add the following to the SQL.INI file. Note that the Port number is the same for the DC and all services that run under it [EDCA_TRAIN2] query=nlwnsck, vm-train, 8000 win3_query=nlwnsck, vm-train, 8000 3. Finally, configure the new Service by adding the following to the dcany.cfg file. [ECDA_TRAIN2] {ACS Required} ConnectionSpec1=ECDA_TRAIN2 {Client Interaction} EnableAtStartup=yes TransactionMode=long SendWarningMessages=yes {Target Interaction} Allocate=connect SQLTransformation=passthrough ReturnNativeError=yes {Catalog Stored Procedures} CSPColumnODBCVersion=3 Supplementary Note III recommended config values from Sybase engineering Below are the appropriate DC/ECDA config settings for a replication environment. Please compare with your current settings and update accordingly. Allocate Controls when an access service allocates conversations with the target database system. Syntax Allocate=[connect request] Default connect 5

connect specifies an access service to allocate the conversation when the client connects, and holds it open for the duration of the client connection. request specifies an access service to allocate a new conversation each time the client application sends a request, and deallocates the conversation after each request. Note: There is a large performance penalty when using the request setting. TransactionMode Specifies whether the access service or the client application manages commit and rollback statements. Syntax TransactionMode=[short long] Default short :- long specifies the access service to give commitment control to the client application. short specifies the access service to issue a commit or a rollback after each request. Comment: The access service holds open the connection to the data source until the client application issues a commit or rollback, or until the ClientIdleTimeout value is exceeded. SQLTransformation Specifies the mode the access service uses for SQL transformation. Syntax SQLTransformation=[passthrough sybase tsql0 tsql1 tsql2] Default passthrough passthrough specifies an access service to send all SQL statements to the database system as received, without transformation. A client application uses passthrough mode to gain direct access to DBMS capabilities. sybase specifies an access service to perform SQL transformation of selected statements. It also allows the use of multi-part table names with the view command in SQL statements. CSPColumnODBCVersion Specifies ODBC version that catalog stored procedures results conform to. This affects interoperability with ASE/CIS. Syntax CSPColumnODBC Version = [ 2 3 ] Default 3 2 specifies ASE/CIS version 12.0. 3 specifies ASE/CIS version 12.5 and later. This property affects interoperability with ASE/CIS. ReturnNativeError Allows a non-localized native error message and a native error severity to be returned to the client. Syntax ReturnNativeError = [yes no] Default no yes specifies non-localized native error messages are returned to the client. no specifies non-localized native error messages are not returned to the client. SendWarningMessages Specifies whether an access service returns warning messages to the client application. Syntax SendWarningMessages=[no yes] 6

Default no no specifies the access service not to return warning messages to the client application. yes specifies the access service to return warning messages to the client application. Supplementary Note IV Tracing TraceOpenServer =59 in server.cfg file & restart DC Then see resulting files: %SYBASE%\%SYBASE_ECON%\SERVERNAME\log\srv.log %SYBASE%\%SYBASE_ECON%\ SERVERNAME\log\SERVERNAME.trc 7