Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Adaptive Server Enterprise

Adaptive Server Enterprise Migration to Linux

Jason L. Froebe, Perot Systems, Team Sybase http://www.froebe.net jason@froebe.net October 2004

Agenda
Why Migrate to Linux? Steps in Migrating
Prepare target Linux System & install ASE Migrate server structure Migrate the databases Validate migrated data, stored procedures and application queries

Customer Case Study


mLogica, Inc. and SubscriberMail ASE on Linux Migration

Why Migrate to Linux


Linux brings seductive Intel economics into the UNIX heart of the datacenter Lower licensing costs compared to the UNIX variants or Microsoft Windows 200x Linux allows shift from RISC-based servers running proprietary UNIX systems to lower cost Intel-based systemswithout sacrificing dependability

Agenda
Why Migrate to Linux Steps in Migrating
Prepare target Linux system & install ASE Migrate server structure Migrate the databases Validate migrated data, stored procedures and application queries

Customer Case Studies


mLogica, Inc. and SubscriberMail ASE on Linux Migration

Preparing the Server and Installing ASE


Check O/S version and patches Create a Sybase account Adjust Shared Memory Segment Create Raw Partitions Install ASE

Migrate Server
Moving the server is easy:
Allocate storage space for databases on the new ASE Create devices for the data areas Create the DB Set options using sp_dboption

Migrate the Database Structure and Data


Multiple methods including Sybase, 3rd Party & Open Source Tools

Sybase Tools
Bulk Copy SybMigrate PowerTransfer Replication Server SQL Remote Cross-platform Dump and Load

3rd Party Tools


BMC SQL Backtrack

Open Source Tools


Scott Grey's SQSH Michael Peppler's DBI DBD::Sybase, Simple:Sybase, BCP Tool

Migrate the Database BCP


Bulk Copy (bcp) and DEFNCOPY Benefits:
Most reliable Can be very fast compared to other solutions Drawbacks: Requires intermediate files for the transfer. No SERVER to SERVER transfers1 Data fields may contain the delimiter used causing the bcp in to fail Command line based Many people are uncomfortable with non-GUI based tools
1Server

to Server transfers can be obtained by using a named pipe on UNIX, Linux servers.

Migrate the Database SybMigrate


SybMigrate Overview:
Java based program designed to migrate 2K pages to other page sizes Integrates the features of bcp and defncopy to 'migrate' one database to another. Not necessarily on the same platform Benefits: One of the easiest methods of moving a database from one server to another Drawbacks: Requires Java to be installed Works on ASE 12.0.x and higher (included in ASE v12.5.3) and higher only May be necessary to run multiple times on the same database as not all nested objects may be transferred on the first try Slower than dump/load or defncopy/bcp

Migrate the Database Replication Server


Replication Server
Benefits Relatively fast for keeping the data synced on multiple platforms Replication Server 12.6 can replicate an entire database from one machine to the other in a single Replication Definition Drawbacks: Overkill for one time migrations Expensive for casual use High learning curve Table definitions still must be transferred manually or with defncopy Initial synchronization of the databases is slow

Migrate the Database Power Transfer


Overview
Transfers data from a wide variety of sources into Sybase ASE Useful for ASE to ASE migrations when architecture is different and dump files cannot be loaded

Benefits
GUI based interface appeals to point & click Cross DBMS vendor migrations

Drawbacks
Slowest of all migration tools Dependence on Microsoft Windows as the transfer Read from UNIX Write to Linux Massive network I/O Better suited for DBMS to DBMS migrations rather than Sybase to Sybase migrations

Cross-Platform Dump & Load


Benefits
Allows easy migration from 11.9.2x or 12.x to 12.5.3 or higher servers Source Sybase ASE server does not need to be running on the same operating system as the target Sybase ASE server Least amount of DBA work needed for migration

Drawbacks
Source & Target page size must be the same Target must be 12.5.3 or higher Takes only 2.53.5 times compared to a normal load database due to the conversion of the objects Drop and recreate non-unique indexes including those on system tables Index recreation of system tables is performed by using 'dbcc reindex' Constraints resulting in indexes would also have to be recreated

Cross-Platform Dump & Load


Source must be in a transactionally quiescent state
No open transactions No log records that need processing at load time Note that you cannot use the quiesce database command as it blocks dump database Replication must be disabled The recommended way to quiet the database: Put DB in single user mode run sp_flushstats and wait for pages to be flushed truncate the log checkpoint the database dump database

If upgrading from an earlier version (pre 12.5.3), binary only stored procedures will have to be reloaded

Migrate the Database Third Party Tools


BMC SQL-BackTrack (logical dump/load) Overview
An alternative quasi platform independent dump & load product from BMC Extracts the table/index definitions and the data Recreates the tables & indexes on the target database Loads the data

Benefits
Relatively simple interface Some companies already use BMC for their data recovery needs so this would be a simple operation

Drawbacks
An add-on license from BMC Very slow

Migrate the Database Open Source Tools


Scott Grey's SQSH
http://www.sqsh.org Supports SERVER to SERVER bulk copy Latest version supports the new data types in 12.5 Not actively updated

Michael Peppler's DBI DBD::Sybase


Uses Perl's DBI mechanism for quasi-generalized access to Sybase ASE DBD::Sybase 1.04.6 (test release) includes support for the bulk API Very easy to use

Michael Peppler's Simple::Sybase Michael Peppler's SybPerl


Most popular Perl module for accessing Sybase databases

Migrating Stored Procedures


There are no known issues if you have the source for the stored procedures available If the source of the stored procedures is not available:
You will need to contact the 3rd party that you obtained the stored procedures If the source is not available from any location, you will need to try to reverse engineer them. This can be a long and involved process

Users & Passwords


master..syslogins.password column uses a one way hash The hash is platform specific
Use Trace Flag 1650 for ASE on Linux 12.5.1+ to read ASE on Sun Solaris syslogins Covered under CR #324847:
Passwords from Solaris 32-bit/64-bit can be migrated to Linux using BCP or other data migration tools and used as such. Trace flag 1650 will turn on the compatibility mode. This compatibility mode is available only on Linux platform and only passwords from Solaris 32-bit/64-bit can be migrated.

Use LDAP user authentication instead of migrating master..syslogins. See the slide A Quick Low-Down on LDAP User Authentication The encryption of the passwords may change in a future release
Quite possibly a platform independent encryption scheme finally eliminating the cross platform passwords nightmare

How to Handle LDAP UA in Migration


Hybrid mode: If user does not exist in LDAP server, use info in master..syslogins
Optionally update master..syslogins with info from LDAP server

Exclusive mode: If user does not exist in LDAP server, deny login A word of warning: The connection between ASE and the LDAP server is unencrypted
LDAP records are transmitted in clear-text across the network. Depending on your environment, this may be a security issue1 Workarounds: Encrypt the connection manually by using SSH Tunneling (or similar) Place the LDAP server on the same machine as ASE ASE should connect to the LOCALHOST, port to the LDAP server
1 If

it is a security issue for your environment, please inform Sybase.

Validate Migration
Validate migrated data, stored procedures and application queries
Use standardized scripts to perform logical data integrity checks Test stored procedures & application SQL to ensure execution is identical Test all clients for acceptable performance

Test
User Interface Batch Processing Administration Procedures Disaster Recovery Application Performance

Run the old and new ASE servers in parallel in case of the need to migrate back

Migrating to Linux Things to Keep in Mind


Moving the data and the definitions is easy The real problems are not with the Linux port of Sybase ASE Things to watch out for:
Shell script differences Return codes may be different Shell script tricks on Solaris, AIX, HPUX, etc. may not work exactly as on their open source equivalents (BASH, tcsh, pdksh, etc.) The infamous GNU C Library (GLIBC) The GLIBC has had a history of not being 100% backward compatible Sybase, Oracle, IBM, Sun and others have been bitten by slight behavior changes by either the GLIBC maintainers or the various distributions
Remember RedHat breaking the ASE with a customized GLIBC patch in RedHat Linux version 9? Once discovered, RedHat quickly fixed the patch in a later customized release of the GLIBC

Migrating to Linux Things to Keep in Mind


Device drivers
Specifically with drivers for SAN and Baydel disk arrays
Many of the enterprise storage system providers are relatively new to Linux Their drivers may work in their labs under low or medium loads but you may discover flaws under heavy and/or sustained usage Do not use the BCM5700 LAN/NIC driver from Broadcom. It has several severe bugs that have yet to be resolved Use the community developed and supported TG3 driver for the Broadcom 5700 network cards Broadcom bcm5700 has more features but the TG3 driver is far more stable

Blades
Benefits
Reduces need of valuable space in the computer room Lower cost in theory

Drawbacks
Heat dissipation while all blades are in heavy use Shared network, disk I/O can be bottlenecks Lock into a single hardware vendor

Case Studies Successful Migrations to Linux

Mr. Amit Okhandiar President, mLogica, Inc.

Case Studies Successful Migrations to Linux, Background Systems Integrator: mLogica, Inc. Client: SubscriberMail Naperville, IL Old System Microsoft SQL Server on Windows NT New System Sybase ASE on Linux Business: e-Mail marketing tools and services Clients: Apple, AC Nielsen, American Marketing Association, Chicago Bulls, etc. Business Drivers Rapid growth in business High volume of transactions Database corruption System instability Lack of scalability

Case Studies Successful Migrations to Linux, Challenges Scalability Performance of the database transactions and queries CPU Utilization Memory Utilization I/O Performance DB sizing planned to predict system growth Highly configurable for the convenience of the application Technical Drivers
Performance Scalability Security Cost Flexibility Manageability

Case Studies Successful Migrations to Linux, Process Analysis of the current environment P&T and stabilization of the current environment Migration Planning Parallel Run Production Cutover Implementation
RAID 10 Taking advantage of
Throughput of multiple spindles Redundancy of mirrored drives Automatic load balancing

More Information
ASE on Linux FAQ
http://www.peppler.org/FAQ/linux.html

ISUG
Sybase FAQ http://www.isug.com/Sybase_FAQ ISUG Journal 3rd Quarter 2003 (PowerTransfer)

Sybase
Newsgroups http://forums.sybase.com ASE Migration to Linux White Paper http://www.sybase.com/content/1025612/ASE_Linux_Migration_ wp.pdf Linux Migration Training http://www.sybase.com/detail?id=1026016

Sybase SDN Register today for the Sybase Developer Network


http://www.sybase.com/sdn

You might also like