Download presentation
Presentation is loading. Please wait.
1
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 UKSUG Masterclass ‘Why’ and ‘How’ Migration Guide to ASE /12 March 2000 Ian Annis Principal Consultant Sybase Professional Services (UK) ©2000 Sybase, Inc. All Rights Reserved.
2
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Presentation Mission Migration is something that no organisation should undertake lightly. It is a process that requires justification and planning in order to achieve a smooth transition to a new environment. This session will cover the pre-upgrade, migration and post-upgrade issues that need to be addressed in performing a migration to ASE and ASE 12.0 ©2000 Sybase, Inc. All Rights Reserved.
3
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
4
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
5
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Why Migrate ? Vendor Push End of Life (EOL) Policy Version Support (Industry practice -> last 2 releases) Platform Support (Critical mass - support costs) New Features Performance Enhancements (query optimiser, parallel support, ...) Functional Enhancements (row level locking, 64-bit support, ...) Availability Enhancements (HA, recovery speed, rebuild index, ...) Emergency Bug Fixes (EBF) Client Pull ‘Latest Version’ Syndrome Change in Environment Platform change Performance Issues Old application not keeping up with growth in business ©2000 Sybase, Inc. All Rights Reserved.
6
Sybase End of Life (EOL) Example
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sybase End of Life (EOL) Example End of Support Notification for Adaptive Server Enterprise 11.5.x on Compaq Alpha NT Adaptive Server Enterprise , and Adaptive Server Enterprise on all platforms Jan 19, 2000 Dear Valued Sybase Customer: This letter provides notification of the end of support for certain older versions of Sybase product offerings. We are announcing the end of support for certain older versions of Adaptive Server Enterprise. Specifically, Sybase will no longer offer support for the following products: Product End of Support Date Adaptive Server Enterprise 11.5.x Jan 31,2001 (for Compaq Alpha NT) Adaptive Server Enterprise Jan 31, 2001 Adaptive Server Enterprise Jan 31, 2001 June 30, 2001(for Silicon Graphics platform only) In addition to the products listed previously, Sybase will also be discontinuing support for the following hardware / operating system platforms. Platform End of Support Date Compaq Alpha NT Jan 31, 2001 Until the End of Support Date, Sybase will fix only Priority 1 bugs for the above versions. For all of our active support customers, Sybase will provide a free license upgrade to Adaptive Server Enterprise Sybase Professional Services is available to assist you, on a fee basis, with migration to these current versions of Sybase's database offerings. We strongly recommend that you upgrade to a newer version. ©2000 Sybase, Inc. All Rights Reserved.
7
Sybase EOL Current Position
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sybase EOL Current Position End of Support Notification for Older Versions of Sybase Products March 9, 1999 Sybase will no longer offer support for the following products: Product End of Support Date Sybase SQL Server Jun 30, 2000 (OpenVMS to 31/12/2003) Adaptive Server Enterprise 11.5.x Dec 31, 2000 Adaptive Server Enterprise Jan 31, 2001 Adaptive Server Enterprise Jan 31, 2001 (June 30, 2001 for SGI platform only) Open Client/Open Server Dec 31, 2000 (OpenVMS to 31/12/2003) Replication Server Jun 30, 2000 In addition to the products listed previously, Sybase will also be discontinuing support for the following hardware / operating system platforms…. As part of the rationalization of supported hardware/software platforms, a number of platforms are no longer supported from For lists of platforms which have been dropped, go to and look for the following Document IDs: 20363 20406 ©2000 Sybase, Inc. All Rights Reserved.
8
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Architecture Issues What else is changing / needs to change Certification Issues What does certification give you (Sybase monthly update) Doc ID Operating System Upgrades 32/64-bit support Feature enhancement / Bug Fix / Patches Problem Upgrades HPUX 9->10 -> 11 Sun Solaris with LVM version 2.4 (keep versions in line) NT Service Packs Product Compatibility Sybase SQL Server base product for Y2K Will it work with third party product ‘xyz’ Scope of overall change required ©2000 Sybase, Inc. All Rights Reserved.
9
Sybase Adaptive Server Releases
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sybase Adaptive Server Releases Former releases of Adaptive Server Enterprise (ASE) include: SQL Server 11.0 (released in Dec 1995) SQL Server is baseline release for Y2K compatibility Adaptive Server Enterprise 11.5 (released in Sept 1997) Adaptive Server Enterprise (released in Oct 1998) Adaptive Server Enterprise 12.0 (released Dec 1999) Supported upgrades to Adaptive Server are from versions: - 11.5 If you are running a version of Adaptive Server or SQL Server that is earlier than those listed here, it is recommended that you upgrade to one of these versions before upgrading to ©2000 Sybase, Inc. All Rights Reserved.
10
Adaptive Server Enterprise (ASE)
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Adaptive Server Enterprise (ASE) Designed for Performance OLTP/TPC-C benchmark records SMP linear scalability (LMM, LPM, Parallel Support) Designed for 24*7 Operation Zero requirement for database downtime On-line backup & recovery, and On-line maintenance tasks Resilience Architecture for: Disks, Processors, Machine, Location High Availability (HA) support in ASE 12.0 OpenSwitch and Replication Server support for Warm Standby Designed for Low Cost of Ownership Multi-threaded Kernel < 100 KB memory per user more users supported per processor DBA Overhead Less maintenance required (less scope for human error ?) ©2000 Sybase, Inc. All Rights Reserved.
11
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Changes in SQL Server 11.0.x New Server Engine LMM, LPM ANSI SQL Level 2 Syntax Display format Data Conversions Money Integer to Char New Optimizer Subquery Processing Aggregates with EXISTS BETWEEN Comments Required some changes to application SQL ©2000 Sybase, Inc. All Rights Reserved.
12
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Key Features of ASE Key New Features: Data Row Locking Performance Improvements for Dynamic SQL Better Query Optimization Key Benefits Flexibility in locking granularity Dramatically higher performance with applications that have lock contention No performance degradation for existing applications ©2000 Sybase, Inc. All Rights Reserved.
13
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Optimizer Statistics Statistics now stored in two system tables Column level stats (distribution, density values and date and time of last modification) are stored in sysstatistics. Table and Index level statistics are stored in systabstats. Space for statistics is limited only by the size of the DB. No guarantee of good performance Update statistics does guarantee up to date statistics. There are no rules about when to run update statistics. Statistics provide accurate information about the data to the optimizer. The more statistics available the more information the optimizer has to work with. Remember to run ‘sp_recompile <table_name>’ for pre-compiled objects to access the updated statistics. New ‘optdiag’ tool to view and simulate statistics for DB tables ©2000 Sybase, Inc. All Rights Reserved.
14
Key Features of ASE 12.0 (Avatar) Key Focus Areas
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Key Features of ASE 12.0 (Avatar) Key Focus Areas High Availability (HA) Reduction In Planned Downtime Active-Active Fail-Over and Single Node Recovery Enhancements Performance and Scalability Re-design Optimizer’s Top Half Query Processing Extensibility OLTP and DW / DSS Performance Sort Merge Joins Abstract Query Plans Native Object Support Import Java Classes into Database Objects = Abstract Data Types Extend Native Type System Methods = User Defined Functions Use in any SQL SELECT list or WHERE clause Distributed Transaction Mgmt Full XA, MS/DTC and DTC-XA ASE as Transaction Coordinator ©2000 Sybase, Inc. All Rights Reserved.
15
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Migration Survey Who’s carried out an ASE Migration ? What route did you use ? Did you read the Installation Guide ? How much pain did you suffer ? ©2000 Sybase, Inc. All Rights Reserved.
16
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
17
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Migration Process Planning & Pre-Upgrade Tasks Analyze existing system and business requirements Decide and prepare on migration route Plan migration tasks Migration Tasks Implement migration route Post-Upgrade Tasks Enhance system for new features Test performance and usability ©2000 Sybase, Inc. All Rights Reserved.
18
Major SAFE/EM Migration Activities
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Major SAFE/EM Migration Activities Planning the migration project Establishing the current configurations Documenting business requirements Developing compatibility analysis Planning for application and platform migrations Administering the migration project Designing and developing migration scripts for data servers Recording source and target configurations Migrating data and application code Performing quality-assurance testing and corrective actions ©2000 Sybase, Inc. All Rights Reserved.
19
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
20
Analyze Existing System
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Analyze Existing System Document Existing Architecture Servers, clients, network config and application description H/W & S/W configuration and sizing Operational Business Requirements Availability Requirements - allowable downtime periods Maintenance Procedures - backup plans & schedule Service Level Requirements Current Performance Metrics Transaction profiles by application Server performance (sp_sysmon) Additional Business Requirements Priority list for application migration and dependencies Resource issues (IT and human) ©2000 Sybase, Inc. All Rights Reserved.
21
Analyze Sybase Configuration
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Analyze Sybase Configuration What is currently running record configuration file or ‘sp_configure’ record SQL interface file What disk devices and their usage record current disk device configuration map databases and segments to devices record dump devices Scripts for Database Objects Should already have them, else reverse engineer with: Sybase Central (generate DDL) PowerDesigner DataArchitect Third party tools, e.g. Cyrano ©2000 Sybase, Inc. All Rights Reserved.
22
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Plan the Upgrade Be Prepared at every stage Once you know what you have - you can identify what needs to change Advanced Reading Prepare yourself for the task in hand - read the manuals Determine Migration Route Based on the requirements gathered to date, choose the appropriate method Cutover without replication phased cutover parallel with replication Develop Migration Plan Plan activities and resources required ©2000 Sybase, Inc. All Rights Reserved.
23
Produce Migration Plan
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Produce Migration Plan Plan the whole process Migration Strategy Fallback what if it didn’t work, how do I stay operational Application Test Suite plan and develop tests for functional and performance testing Bridging Strategy how minimize impact to end-users (linked to migration strategy) Environment consider the whole process - not just the ASE upgrade part Scheduling plan when it happens set milestones and reviews to be able to know when each stage is finished ©2000 Sybase, Inc. All Rights Reserved.
24
Resources To Perform Migration Process
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Resources To Perform Migration Process Documentation Installation Guide (platform specific) Release Notes (platform specific) What New in ASE Release 11.9.x/12.x Performance & Tuning Guide System Administration Guide Tech Support my.sybase.com Technotes: Manual: Migrating to Sybase ASE 11.5 Sybase Professional Services Installation & Migration Support (SAFE/EM) Performance & Tuning ©2000 Sybase, Inc. All Rights Reserved.
25
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Migration Strategy Determine Migration Strategy Cutover without replication easiest option with minimal resource demands highest risk as it requires downtime during critical migration phases and subject to lengthy recovery on fallback Phased cutover enables managed/planned migration of an application at a time can use any route to achieve it’s aim dependant on risk/resource/.. Parallel with Replication minimal system downtime, hence good for 24x7 environments extra set-up and H/W resource required for replication server easy fallback to existing server easy comparison with existing system for performance, functionality Note: Whenever possible, upgrade test and development databases first. Upgrade the production system after testing. ©2000 Sybase, Inc. All Rights Reserved.
26
Migration Routes to ASE 11.9.2
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Migration Routes to ASE Determine Migration Route ASE Upgrade Process sqlupgrade to upgrade server - full cutover DIY (manual patch) - full or phased cutover Fresh Installation of New Server BCP old databases - full or phased cutover Dump & Load old databases - parallel, full or phased cutover Replication Server - parallel or phased cutover Sybase Adaptive Server ©2000 Sybase, Inc. All Rights Reserved.
27
Migration Route Architecture
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Migration Route Architecture Old Server New Server New Server executables Sqlupgrade or DIY Sqlupgrade or svrbuild BCP Database Object DDL + BCP Data Dump & Load Database Dump + Load Transaction Dump + Load Replication Sybase Replication Server ©2000 Sybase, Inc. All Rights Reserved.
28
Moving a Database to Another Server
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Moving a Database to Another Server If a database is to be reproduced exactly on the same hardware platform: Copy any needed definitions from the old database using Sybase Central (generate DDL) or use existing scripts Make a copy of the old database using dump database Create a new database using create database (from scripts !) Load in the new database contents using load database If the target database is not identical to the original database: Copy all definitions using Sybase Central Create the new database as needed using Sybase Central’s DDL scripts Copy the data out of the old database using bcp Copy the data into the new database using bcp ©2000 Sybase, Inc. All Rights Reserved.
29
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Database Utilities ASE Build Utilities An ASE database utility is a program executed from an operating system prompt or GUI interface that assists in system administration srvbuild - a UNIX-based server installation utility srvbuildres - a UNIX-based server installation utility where a GUI is not available Server Config - a Windows-NT based server installation utility dsedit - an editor for creating and modifying interfaces files bcp - a program that copies data from a database to an operating system file, and vice versa optdiag - a program for detecting inefficient space usage in tables using data-only locking sqlupgrade - a UNIX-based server installation utility to upgrade an existing server ©2000 Sybase, Inc. All Rights Reserved.
30
Directory Structure: Pre-ASE 12.0
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Directory Structure: Pre-ASE 12.0 Single sybase directory Files for all components are stored in this directory Important sybase subdirectories bin All executables (isql, bcp, and so on) charsets Character set and sort order localization files init Installation log files install Install programs, RUNSERVER files, the error log scripts Database install scripts ©2000 Sybase, Inc. All Rights Reserved.
31
Directory Structure: Pre-ASE 12.0
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Directory Structure: Pre-ASE 12.0 ©2000 Sybase, Inc. All Rights Reserved.
32
Character Sets and Sort Order
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Character Sets and Sort Order ASE default character set and sort order The default character set depends on the platform Windows platforms default to cp850 Digital Unix, IBM AIX, and Sun Solaris default to iso_1 HP defaults to roman8 These character sets support US English and include accented characters for most European Languages The default sort order is binary sort order Alternative options can be chosen at installation time Post installation character sets and sort orders Whilst they can be changed, it is not advisable as it requires significant manipulation of existing data. These changes are not recommended unless absolutely necessary. View the current character set and sort order sp_helpsort ©2000 Sybase, Inc. All Rights Reserved.
33
Pre-upgrade Checklist
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Pre-upgrade Checklist General preparation Read the documentation - installation guide to hand Verify software release with OS release + patches required Run the pre-upgrade option within sqlupgrade check reserve words, system database sizes, DB options, etc. Check and backup databases Run dbcc checkdb, dbcc checkalloc, and dbcc checkcatalog on all your databases including the master database. If the dbcc's do not return any errors, make backups of all your databases including the master database. Drain replication queues & stop replication (see Installation Guide) Turn off Sybase mirroring if it is enabled Upgrade your operating system first If possible, run existing SQL Server on the new operating system for several days/weeks to troubleshoot any problems caused by the operating system change before upgrading to ASE /12 ©2000 Sybase, Inc. All Rights Reserved.
34
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Backup Your Databases Keep current backups of all databases prior to upgrading, regardless of the route chosen System Databases (master, model, sybsystemprocs) User Databases (as required) Bulk Copy output of master-only system tables to help in disaster recovery scenarios from: sysdatabases sysdevices syslogins sysusages You may need to rebuild master if: Adaptive Server fails during the upgrade process (disk problems, etc.) to duplicate it on another machine it’s easier to keep up-to-date backups than to rebuild master from scratch ©2000 Sybase, Inc. All Rights Reserved.
35
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
36
Build the Server Environment
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Build the Server Environment Prepare the IT environment for the upgrade Identify ASE release (and EBF) to be applied Prepare the H/W (sufficient resource) + OS patches as identified in the Installation Guide New ASE releases usually increase memory requirements Prepare scripts as appropriate for chosen Migration Path Server level scripts - disk init, server configuration, … Database Object scripts - reverse engineering or prepared scripts Make required application changes remove new reserved words identified in prepared (sp_checkreswords) changes in syntax, e.g. SQL92 support Verify and Configure Existing Server if it is being upgraded increase memory allocated to ASE increase size of sybsystemprocs (to 60Mb) copy your own ‘sp_’ for loading after the upgrade ©2000 Sybase, Inc. All Rights Reserved.
37
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 sqlupgrade Overview Automatic Phased Process using sqlupgrade The sqlupgrade Phases Phase 1: Runs the preliminary test to make sure the upgrade will work properly. Phase 2: Runs the upgrade program, which actually performs the specific upgrade tasks. Phase 3: Completes the upgrade by recreating the sybsystemprocs database by running the installmaster and installmodel scripts. The sqlupgrade log is located in $SYBASE/init/logs/sqlupgradeMMDD.NNN.. ©2000 Sybase, Inc. All Rights Reserved.
38
Sqlupgrade Phase 1 - pre-upgrade
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sqlupgrade Phase 1 - pre-upgrade Boot the previous version of SQL Server to: a. Copies the interface file entry from the earlier interfaces file to the new interfaces file b. Runs preupgrade tests, checking for free space and database options. The program is located in $SYBASE/upgrade/preupgrade c. Checks for reserved word conflicts. File is created in $SYBASE/init/logs/checkres.dmp d. Checkpoints all databases e. Saves the database segment information in a file located in $SYBASE/init/logs/usage.sql. This file is removed after a successful upgrade. f. Shuts down the original SQL Server 2. Creates a runserver file, RUN_servername, in the install dir 3. Starts the new server with a new configuration file, $SYBASE/servername.cfg. This step recovers all databases. ©2000 Sybase, Inc. All Rights Reserved.
39
Sqlupgrade Phase 2 - upgrade
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sqlupgrade Phase 2 - upgrade Run the $SYBASE/upgrade/upgrade to: a. create temp files to manage the progress of the upgrade (sqlcmds.n) sqlcmds.0 - contains most of the upgrade's SQL commands; could be used to check current status of upgrade sqlcmds.1 - contains updates to system tables sqlcmds.2 - contains generic functions and remapping commands; could be used to check the status of remapping the query trees. sqlcmds.3 - contains a list of changes to the system table sysindexes b. Ensures the old SQL Server version is supported for the upgrade. c. Runs the appropriate tasks, depending on the version of SQL Server that is being upgraded. To view what is actually being done at this point, view the sqlcmds.* files above for more details. d. Allows updates to system tables. e. Sets the version of the SQL Server to the new version number. Once it has done this step you CANNOT rerun the upgrade program. ©2000 Sybase, Inc. All Rights Reserved.
40
Sqlupgrade Phase 3 - new system build
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Sqlupgrade Phase 3 - new system build Runs the $SYBASE/upgrade/upgrade to: a. Turns off allow updates to system tables b. checkpoints all databases c. Updates the runserver file. d. Shuts down and restarts the new release Server. e. Runs the installmaster and installmodel scripts. Note: it is safer to drop and re-create all compiled objects (stored procedures, triggers, etc.) in the new environment to ensure new query plans are generated ©2000 Sybase, Inc. All Rights Reserved.
41
Benefits With sqlupgrade Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Benefits With sqlupgrade Route Automated Upgrade Generally, no intervention is required Speed As the data is not being upgraded or reloaded, then it is generally a fast process to run through When to use this approach Recommend for development/test systems only use approach on production servers with care and confidence of success, and where a window exists to upgrade, I.e. not 24x7 applications Acceptable approach for small to medium systems, or very large systems where an alternative server/disk space is not available ©2000 Sybase, Inc. All Rights Reserved.
42
Issues With sqlupgrade Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Issues With sqlupgrade Route Lack Of Control How handle errors during the upgrade process One-way operation can recover (same with EBF) to restart upgrade after correcting fault, e.g. read only file not updated, disk or log space, etc. Recoverability Poor - see above Must have backups to recover to Service may be unavailable whilst the executables and dumps are re-loaded ©2000 Sybase, Inc. All Rights Reserved.
43
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 DIY Route Overview Manual Process using srvbuild phase by phase As an alternative to using sqlupgrade: Manually install new ASE release create the databases then load the old server dumps from backup When the online database function is run, it will upgrade the old database to the current release. You cannot load the old master database dump, you can only load user databases. Transactions logs can also be loaded in the same way to enable a phased hand-over between the two servers ©2000 Sybase, Inc. All Rights Reserved.
44
Benefits With DIY Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Benefits With DIY Route Clean Installation No legacy issues to address on new server Starting point is clean installation containing only the required system databases Recoverability This is a safe method as it leaves the original Server intact ©2000 Sybase, Inc. All Rights Reserved.
45
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Issues With DIY Route Requires more DBA effort (time issue) See Dump & Load issues ©2000 Sybase, Inc. All Rights Reserved.
46
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 BCP Route Overview Manual Process using srvbuild and BCP Build a new server and copy data across: Manually install new ASE release using srvbuild create the databases as per original size or larger create the database objects with the prepared DDL scripts load the old data from BCP files into the new server tables rebuild indexes and triggers ©2000 Sybase, Inc. All Rights Reserved.
47
Benefits With BCP Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Benefits With BCP Route Clean Installation No legacy issues to address on new server Platform Independence Use -c option to pass BCP data in ASCII mode Data Clustering Data loaded and allocated in extents contiguously Forced re-creating of all indexes (if using fast BCP) Statistics recreated by index creation Device Allocation Easier to change device location/size as recreated from scratch ©2000 Sybase, Inc. All Rights Reserved.
48
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Issues With BCP Route Volume of data to migrate (time issue) Consider using fast BCP approach (no indexes, triggers,..) Drop all the indexes and triggers on the table Copy the data into the table Recreate the indexes and triggers Dump the database (as operation is minimally logged) Configure and run parallel BCP load into partitioned table Running concurrent sessions of large bulk copy jobs into specific partitions substantially increases performance ©2000 Sybase, Inc. All Rights Reserved.
49
Issues With BCP Route (cont)
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Issues With BCP Route (cont) Downtime or incremental transaction update As soon as the data is BCP’ed out, no more transactions can enter the old server unless a method is devised to capture any new transactions against the old server. ©2000 Sybase, Inc. All Rights Reserved.
50
Dump & Load Database Route Overview
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Dump & Load Database Route Overview Old Server New Server Transfer data to new server on same platform Transactions must be loaded in the correct order, and they all have to be there load transaction without prior load database will fail Issuing a load database takes a database off line Eliminates administrator’s need to mark databases dbo use only when loading a database and transaction logs set ‘online database <dbname>’ after loading is complete ©2000 Sybase, Inc. All Rights Reserved.
51
Rules for Loading Databases
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Rules for Loading Databases Database Loading Restrictions Database must not currently be in use Can load only dumps made on same machine type The database into which you load must exist, and it must be at least as large as the dumped database Use sp_helpdb to see amount of space allocated to a database Loading data into an existing database overwrites its data; partial loads are not possible To create a new database for loading, use the for load option to create database Dump Compatibility When an Adaptive Server installation is upgraded to a new release, all databases associated with that server are automatically upgraded Upgrade is on a per-database basis, for upgrading a database or transaction log dump from any previous release to the current one ©2000 Sybase, Inc. All Rights Reserved.
52
Benefits With Dump & Load Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Benefits With Dump & Load Route Speed Major factor is that the new server can be prepared independently ready for the first dump. Dump & load is relatively fast - even for large volumes of data, and database is upgraded when it is made online Up-to-Date Keep applying transaction log dumps to keep new server up-to-date Downtime for switch over is minimised Fallback Easy to fallback as old server still exists in line until first transaction in new server - same issue on capturing new transaction data ©2000 Sybase, Inc. All Rights Reserved.
53
Issues With Dump & Load Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Issues With Dump & Load Route Compatibility Only works on same hardware platform (sometimes OS release restrictions as well) For load option New server with physical layout from previous server maybe inefficient use of storage - need indexes re-created may have data loaded into log segments (see SA manual on recovering for incorrect segment mapping after load) Recoverability Once new data has been entered the database dump can not be loaded into the previous version recovery to previous version would be via the BCP route. ©2000 Sybase, Inc. All Rights Reserved.
54
Replication Route Overview
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Replication Route Overview Manual Process using srvbuild and Rep Server Build a new server and create replication configuration: Manually install new ASE release using srvbuild create warm standby configuration in replication server from old database to new database materialise the data for the database test and check performance of new server prior to switch-over switch-over active database to new server and capture transactions back to the old server ©2000 Sybase, Inc. All Rights Reserved.
55
Benefits With Replication Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Benefits With Replication Route Clean Installation No legacy issues to address on new server Platform Independence Data conversions handled between servers Availability and Recoverability Best method for true 24x7 operation where continuation of service must be maintained Can be configured in warm standby mode to switch and get new transactions being replicated into old server - allows for rapid fallback if problems are found on the new server Valid functional and performance testing with up-to-date data prior to switch-over ©2000 Sybase, Inc. All Rights Reserved.
56
Issues With Replication Route
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Issues With Replication Route Effort required (time & resource issue) Requires resources and skills to set up and use replication server May already have expertise in-house Materialisation process can take a long time on large production systems Ensure optimal configuration of replication server for the task in hand Not a major issue as the operational system carries on running during this process Ensure adequate spare capacity to handle materialisation overhead on the old server ©2000 Sybase, Inc. All Rights Reserved.
57
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
58
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Testing the New Server Stability & Performance Prior to Roll-out The primary goal of testing is to ensure that after migration: Application behavior is predictable. Application and operational service levels are preserved or exceeded. The test and production systems are stable and the data is safe. The upgrade is successful and does not adversely impact the production system Note: testing strategies are not covered in this presentation ©2000 Sybase, Inc. All Rights Reserved.
59
Verification and Use of New Server
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Verification and Use of New Server Verify the version level of Adaptive Server. To verify that you are at the new version level, connect to isql and run the following commands: 1> select Look for “11.9.2” in the version string. 1> sp_configure "upgrade version" sp_configure should return the Run Value “11920”. Re-enable Replication If replication server is in use reset the secondary truncation point restart replication server enable the rep_agent on appropriate databases Configure Client connections ©2000 Sybase, Inc. All Rights Reserved.
60
Post-Upgrade Steps - Update Statistics
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Post-Upgrade Steps - Update Statistics Update Statistics 11.9.x statistics have been improved now on all columns better support for large tables (more distribution steps) defaults to previous server statistics after pre 11.9.x load preferred method to update stats: run optdiag on each user table (backup of pre-upgrade stats) run update statistics on each user table run sp_recompile on each user table check new stats with optdiag see: “Optimizer Statistics After Upgrading to ASE ”, Doc ID 20461 ©2000 Sybase, Inc. All Rights Reserved.
61
Post Upgrade Steps - Data Only Locking
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Post Upgrade Steps - Data Only Locking Identify and Reduce Lock Contention Use ‘sp_sysmon’ and ‘sp_object_stats’ to identify possible lock contention issues consider using (only where required) ‘alter table <tablename> lock datapages’ ‘alter table <tablename> lock datarows’ ©2000 Sybase, Inc. All Rights Reserved.
62
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 What if ….. Serious errors / server won’t start Resort to backup or previous server Switch client interface files back to old server Manual patching/upgrade of the problem (Tech Support) Poor Performance Testing should have identified obvious performance problems Run standard commands to identify problem area, e.g. sp_sysmon, sp_object_stats (11.9.2), etc. Ensure statistics are up-to-date What about new transactions Capture transaction text (difficult !) BCP out data daily to be able to recreate new data Replication of new transactions back to old server ©2000 Sybase, Inc. All Rights Reserved.
63
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
64
Key Features of ASE 12.0 Key Focus Areas
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Key Features of ASE Key Focus Areas High Availability (HA) Reduction In Planned Downtime Active-Active Fail-Over and Single Node Recovery Enhancements Performance and Scalability Re-design Optimizer’s Top Half Query Processing Extensibility OLTP and DW / DSS Performance Sort Merge Joins Abstract Query Plans Native Object Support Import Java Classes into Database Objects = Abstract Data Types Extend Native Type System Methods = User Defined Functions Use in any SQL SELECT list or WHERE clause Distributed Transaction Mgmt Full XA, MS/DTC and DTC-XA ASE as Transaction Coordinator ©2000 Sybase, Inc. All Rights Reserved.
65
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 HA - High Availability ASE HA Objectives in this Release Reduction In Unplanned Downtime Near-seamless Fail-Over of One ASE Node Onto Another, Cluster Configured, Companion Node High Performance Fail-Over (No Start-Up Overhead) High Performance Recovery After Fail-Over Integration With HW/OS Vendor HA Systems Reduction of Planned Downtime Back Up Server Performance Enhancements On Line Index Reorganization ©2000 Sybase, Inc. All Rights Reserved.
66
HA - Establish Companion
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 HA - Establish Companion Master User S1 Interfaces File Interfaces File HA System SystemDB systemprocs security Master S2 Establish Companion Establish Companion SystemDB systemprocs security Replicate Users/Logins Establish Proxy DBs User ©2000 Sybase, Inc. All Rights Reserved.
67
HA - Reduction in Planned Downtime
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 HA - Reduction in Planned Downtime Reduction in backup & recovery overhead Order of Magnitude Back-up and Restore Performance Improvements Reduction in time for index maintenance Random inserts and deletes in an index cause: Drop in space utilization Declustering (Scan of page chain in key order may cause random I/O) Online index rebuild preferred to recreating indexes using reorg rebuild <tablename> <indexname> Copy all index rows to new pages and deallocate old pages under an intent lock (an extent at a time) - DOL indexes only high concurrency operation with minimal logging and no deadlocks achieve clustering and desired space utilization goals ©2000 Sybase, Inc. All Rights Reserved.
68
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Java In The Database Java Is Becoming a Generally Accepted Computing Platform Java Offers The Promise of Unified Programming Model Across All Tiers Develop, Debug, and Deploy Objects/Logic Components and Data Objects Across Client, Data Stores and Middle Tiers Java Offers a Rich Environment for Database Programming Complete, Object-oriented Programming Language Provides Tremendous Extensions to SQL Capabilities Non-proprietary and Portable Language “Pointer-safe” Language for Integrity of Database Kernel ©2000 Sybase, Inc. All Rights Reserved.
69
Java in Adaptive Server Enterprise
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Java in Adaptive Server Enterprise Goals in This Release: Extend ASE's T-SQL Language Capabilities With Java Use Java Classes As: User Defined Functions User Defined Datatypes Embed Java Virtual Machine Inside the Server Provide Utilities to Install Java Classes Into a Database Enable Remote Java Debugging ©2000 Sybase, Inc. All Rights Reserved.
70
Trends in Distributed Computing
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Trends in Distributed Computing ASE Oracle New York Tokyo London Client Applications Transaction Servers and TP Monitors Distributed Data Architectures Increasing in frequency Business units make decisions Multiple database vendors Yet, data is a corporate asset ! Some data requires a “tightly consistent” model N-tier Application Architectures Can provide high-end scalability and fault tolerance Multiple Application Servers providing same services Both Require Support for Advanced Distributed Xact APIs, e.g.XA & DTC DB 2 ©2000 Sybase, Inc. All Rights Reserved.
71
What is Distributed Transaction Management (DTM) ?
'Why' and 'How' Migration Guide to ASE /12 What is Distributed Transaction Management (DTM) ? 07/04/2017 A Transaction Management Framework A framework consisting of 3 components Transaction Monitor/Manager or Transaction Coordinator Application Client Resource Manager(s)/Dispenser(s) A conceptual framework where several Resource Managers participate in doing a unit of work (transaction) Transactional scope limits the failures occurring across execution domains Transaction boundaries are demarcated with API Transaction outcome and commitment policies are implemented within this framework XA and DTC are two models that are currently available in industrial strength Tuxedo/Encina/TopEnd/MTS-MSDTC/CICS ©2000 Sybase, Inc. All Rights Reserved.
72
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 DTM Support Within ASE 12.0 ASE Transaction Manager / Co-ordinator ASE Transaction Manager understands different transaction types (Local, Internal, Subordinate and External) The transaction states are validated through a state machine Various Protocols supported by the external transactions (XA, ASTC, MSDTC) are driven through a protocol table During recovery, prepared push-model external transactions are re-instantiated and Server is made available as soon as possible ©2000 Sybase, Inc. All Rights Reserved.
73
Increased Query Execution Options
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Increased Query Execution Options Begins re-architecting “top half” of the Optimizer & Execution Engine for extensibility of new join and access strategies First Extension Will Support Parallel and Serial Sort/Merge Joins Sort/Merge Joins Between OMNI Proxy Tables or Between Local and OMNI Proxy Tables Smart Transformation of WHERE Clause Predicates Improved Selectivity Estimation for LIKE Predicates Join transitive closure Abstract Query Plans Support for up to 50 tables in a join clause Execute Immediate ©2000 Sybase, Inc. All Rights Reserved.
74
Optimizer Enhancements in ASE 12.0
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Optimizer Enhancements in ASE 12.0 Sort Merge Joins Ordered joins provide clustered access to joining rows; result in less logical and physical I/Os. Can exploit indexes that pre-order rows on joining columns or create work tables as required Sort Merge Join Algorithm (4 distinct types supported) - Often Better Performance for DW/DSS Queries Than Nested Loop Join of ASE 11.x LIKE Clause New costing to improve selectivity and qualifying row estimates Join Transitive Closure Provides the optimizer with additional join paths and, hopefully, faster plans. SARG transitive closure was added in ASE 11.5 Predicate Transformation Significant performance improvement in queries with limited access paths (i.e. very few possible SARGS/Joins/OR’s that can be used to qualify rows in a table) Increase maximum number of non-RI tables per query from 16 user tables and 12 work tables to 50 user tables and 14 work tables ©2000 Sybase, Inc. All Rights Reserved.
75
Sort Merge Join Example
'Why' and 'How' Migration Guide to ASE /12 Sort Merge Join Example 07/04/2017 select … from part, partsupp, lineitem where p_partkey = ps_partkey and ps_partkey = l_partkey and ps_orderkey = l_orderkey and p_type = ‘CD’ Unsorted Access to innermost table Part Clustered on p_partkey Partsupp Clustered on ps_partkey Lineitem Clustered on l_orderkey Part Clustered on p_partkey Partsupp Clustered on ps_partkey Lineitem Sorted on l_partkey Sorted Access to innermost table ©2000 Sybase, Inc. All Rights Reserved.
76
Managing Optimizer Changes After Upgrade
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Managing Optimizer Changes After Upgrade What happens to the installed base when the optimizer is enhanced? Most find it better but some find it worse… What could go wrong with the Optimizer? Statistics may not apply to the data that is now in the table The query plan used for a stored procedure may not be applicable to the query at hand The buffer cache model and the actual buffer cache usage at run time could differ One solution to all these problems would be to implement rules based optimization. However: Rule based decisions could be sub-optimal as they require the developer to have a knowledge of the eventual data layout Developers very often have very little knowledge of how to write efficient query plans and there is a considerable overhead in writing/testing them ©2000 Sybase, Inc. All Rights Reserved.
77
Curing Unexpected Optimizer Behavior
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Curing Unexpected Optimizer Behavior What are the options for improving the optimizer and getting rid of unexpected behavior? Implementing a better and more dynamic cost model Implementing some form of extremely flexible rules based optimization Allowing good query plans to be captured and re-used ©2000 Sybase, Inc. All Rights Reserved.
78
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Abstract Query Plans An abstract query plan is a persistent, human readable description of a query plan, that’s associated to a SQL statement It is not syntactically part of the statement The description language is a relational algebra Possible to specify only a partial plan, where the optimizer completes the plan generation Stored in a system catalog sysqueryplans Persistent across: connections Server versions (i.e. upgrades) ©2000 Sybase, Inc. All Rights Reserved.
79
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Where will AP’s be used? Application providers don’t want to include vendor specific syntax in their queries In general, users don’t want to modify a production application to solve an upgrade optimizer problem Still, it’s possible to include them if so desired Example: select c1 from t1 where c2 = 0 plan ‘(I_scan () t1)’ Abstract query plans are captured and reused: set plan dump ‘new_plans_group’ on set plan load ‘new_plans_group’ ©2000 Sybase, Inc. All Rights Reserved.
80
Directory Structure: ASE 12.0
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Directory Structure: ASE 12.0 Top-level directory Subdirectories for each component that include the following Executable program for the component Installation and configuration tools for the component Display-related files needed by the component Naming convention for subdirectories includes a component identifier and the software release version Examples: ASE-12_0/ (location of ASE files) OCS-12_0/ (location of Open Client files) jConnect-4_2/ (location of jConnect 4.2 files) ©2000 Sybase, Inc. All Rights Reserved.
81
Overview of ASE 12.0 Directory Structure
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Overview of ASE 12.0 Directory Structure ©2000 Sybase, Inc. All Rights Reserved.
82
Important ASE-12_0 Subdirectories
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Important ASE-12_0 Subdirectories bin Executable files for most server utilities init ASE installation log files install Install programs, RUNSERVER files, the error log scripts Optional database installation scripts Note that some executables (such as isql and bcp) are located in the OSC-12_O/bin subdirectory ©2000 Sybase, Inc. All Rights Reserved.
83
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 ASE 12.0 Requirements Operating system levels for ASE 12.0: Solaris 2.6 (2.7 for 64-bit) HP/UX 11.0 (32 & 64 Bit) AIX (32 & 64 Bit) Intel NT 4.0 with Service Pack 4 Digital Unix 4.0D Minimum disk space Standard installation: 678 MB (Full installation: 700 MB) Custom installation: Depends on components chosen New License Manager SySAM - Sybase Software Asset Management to install Upgrade from Versions 11.0.x, 11.5, , ©2000 Sybase, Inc. All Rights Reserved.
84
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Agenda Why Migrate ? How Migrate ? Planning & Pre-Upgrade Migration Steps Post-Upgrade ASE 12 Summary ©2000 Sybase, Inc. All Rights Reserved.
85
Key Lessons For A Successful Migration
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 Key Lessons For A Successful Migration Plan for Success Plan the whole process Read the available documentation to prepare yourself/team Highlight and overcome potential problem areas by trailing migration approach and scripts on development/test systems prior to production roll-out Execute the Plan Follow the procedures and your migration plan Be prepared with the recovery fallback option for your chosen strategy ©2000 Sybase, Inc. All Rights Reserved.
86
SPS Migration Involvement
'Why' and 'How' Migration Guide to ASE /12 07/04/2017 SPS Migration Involvement Plan & Execute Migration Services Rapid Delivery of Migration Services Risk minimisation through SPS experience of similar migrations Product Knowledge to exploit new product features Professional approach using documented Quality Standards & SAFE/EM™ methods Assured delivery Single source of technology, experience and methodology ISO 9001 TickIT of both technology and staff © Copyright United Feature Syndicate 1997 ©2000 Sybase, Inc. All Rights Reserved.
87
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Conclusion Successful and painless migrations don’t just happen by accident, it requires you to: Use a proven and structured migration approach Plan and execute the whole migration task Follow the documentation - it exists to help you Please ask questions... ©2000 Sybase, Inc. All Rights Reserved.
88
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 Sybase Contacts Sybase Technical Support, North America: SYBASE (to order product upgrade ) Sybase Technical Support, UK: (01628) (to order product upgrade) Sybase Web Site Comments to: Ian Annis Principal Consultant Sybase Professional Services (01628) ©2000 Sybase, Inc. All Rights Reserved.
89
'Why' and 'How' Migration Guide to ASE 11.9.2/12
07/04/2017 UKSUG Masterclass ‘Why’ and ‘How’ Migration Guide to ASE /12 March 2000 Ian Annis Principal Consultant Sybase Professional Services (UK) ©2000 Sybase, Inc. All Rights Reserved.
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.