Migrating to new page sizes using Sybmigrate - Sybase
Migrating to new page sizes using Sybmigrate - Sybase
Migrating to new page sizes using Sybmigrate - Sybase
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Sybase</strong> ® Adaptive Server ® Enterprise 12.5:<br />
<strong>Migrating</strong> <strong>to</strong> New Page Sizes Using <strong>Sybmigrate</strong><br />
A Technical White Paper<br />
WHITE PAPER
Introduction<br />
Unlike earlier releases of ASE which support only 2K <strong>page</strong> size, 12.5 ASE release can have various <strong>page</strong> <strong>sizes</strong>:<br />
2K, 4K, 8K and 16K. Larger logical <strong>page</strong>s allow users <strong>to</strong> create larger rows, which can improve the performance<br />
because ASE accesses more data each time it reads a <strong>page</strong>. For example, a 16K <strong>page</strong> can hold 8 times the<br />
amount of data as a 2K <strong>page</strong>, an 8K <strong>page</strong> holds 4 times as much data as a 2K <strong>page</strong>, and so on, for all the <strong>sizes</strong><br />
for logical <strong>page</strong>s. However, the release will not support a direct upgrade from pre-12.5 2K <strong>page</strong> server <strong>to</strong> a<br />
server with a different logical <strong>page</strong> size. Users will therefore need <strong>to</strong> move their data <strong>to</strong> the <strong>new</strong> server when<br />
the <strong>page</strong> size is different. To assist users with different <strong>page</strong>-size migration, <strong>Sybase</strong> releases the sybmigrate<br />
utility <strong>to</strong> execute such task.<br />
Written in Java, sybmigrate can be used in an interactive GUI mode or in non-interactive, command line<br />
mode with a resource file, <strong>to</strong> help users with the migration process. It has the following user benefits:<br />
• Ease of use<br />
• Rich graphical user environment<br />
• Capability <strong>to</strong> operate in the batch model – an alternative <strong>to</strong> the graphical user environment<br />
• Greater level of control<br />
• Intuitive process for migration<br />
Please be aware that throughout this document, migration process refers <strong>to</strong> the actual process of copying the<br />
database schema, user data and user objects from one server <strong>to</strong> another server, not the upgrading of ASE<br />
installation <strong>to</strong> a <strong>new</strong> release, or upgrading an existing application.<br />
Standard Migration Process<br />
Preparing your database server (and underlying databases) for migration from a 2K <strong>page</strong> size <strong>to</strong> an nK <strong>page</strong><br />
size is very easy and does not require a significant amount of effort. Remember, you will be performing a<br />
database (or server) migration, and in order <strong>to</strong> ensure success, some preliminary steps need <strong>to</strong> be taken. You<br />
will notice, however, that they do not differ from the standard upgrade procedures recommended by <strong>Sybase</strong>.<br />
• Run full dbcc checks on your database(s) <strong>to</strong> be migrated, fix problems reported<br />
• Perform backups of the database(s) <strong>to</strong> be migrated<br />
• Build a <strong>new</strong> nK <strong>page</strong> ASE server<br />
After performing these steps, launch $SYBASE/$SYBASE_ASE/bin/sybmigrate. The migration utility will come up.<br />
For more information on ASE server configuration, pre-setup procedures preparation, and other general<br />
prerequisites, please refer <strong>to</strong> the migration utility manual. After the pre-setup is complete, there are three steps<br />
or sessions for the migration process - Setup, Migration, and Validation.<br />
2
Setup<br />
The primary goal here is <strong>to</strong> setup the migration paths, define the source and target ASE server as well as<br />
databases, etc. Additionally, performance related aspects like number of threads can be fine-tuned here.<br />
Here is a sample screenshot of the session.<br />
To facilitate the migration process, sybmigrate will create two system databases in the source ASE:<br />
• <strong>Sybmigrate</strong>db – For migration tasks, progress and other control information<br />
• Migration database – Contains proxy tables for each user table selected for migration. The proxy tables only<br />
exist for the life of the data transfer of the user table<br />
Migration<br />
This session is <strong>to</strong> migrate objects and data from the source database <strong>to</strong> the target database. In this session, users<br />
can select objects <strong>to</strong> be migrated. Although this step is where the major migration action takes place, there are<br />
very minimal manual operations involved. A sample screenshot showing objects being selected is displayed here.<br />
3
Validation<br />
This is <strong>to</strong> validate the objects and data that users have migrated. The steps are the same as the "Migrate" session<br />
except that users need <strong>to</strong> select "validate database objects and data" in the "Session Type" screen for GUI.<br />
Cus<strong>to</strong>mer Scenario<br />
A premium movie and entertainment company has deployed a combination of core <strong>Sybase</strong> technologies,<br />
including <strong>Sybase</strong> ASE, Replication Server,® and EAServer <strong>to</strong> host its e-Business website. Together, these<br />
products serve content <strong>to</strong> its website visi<strong>to</strong>rs, from programming schedules <strong>to</strong> special subscription offers<br />
during yearly promotions.<br />
The website currently runs on <strong>Sybase</strong> ASE 11.9.2 on RedHat Linux 6.2, however they would like <strong>to</strong> upgrade <strong>to</strong><br />
<strong>Sybase</strong> ASE 12.5 on RedHat 7.2 and utilize the larger <strong>page</strong> size of the database server.<br />
Since this database server serves a mission critical area of this company, downtime for a cu<strong>to</strong>ver must be<br />
minimal. Therefore, a "test-run" of the migration utility was performed on the following hardware:<br />
• RedHat Linux 7.2<br />
• Adaptive Server Enterprise Version 12.5.0.1<br />
• Compaq dual-cpu intel-based blade server<br />
• Ultra-SCSI disk, 2x18GB<br />
• Compaq smartRAID controller<br />
The database that was used in this test was approximately 700MB in size. Using the migration utility, it <strong>to</strong>ok<br />
approximately 2 minutes <strong>to</strong> migrate this database from a 2K 12.5.0.1 server <strong>to</strong> an 8K 12.5.0.1 server – all <strong>using</strong><br />
the default values of ASE.<br />
In this migration process, there are no adjustments made <strong>to</strong> the database server configuration; all values used<br />
for the migration (pre-allocated extents, etc.) are all set at the default values. Migration is performed<br />
successfully, and no problems are encountered with the migration utility. Minor adjustment may be required<br />
<strong>to</strong> make sure that certain key values are the same on both servers before performing the process.<br />
Tuning for Better Performance<br />
Designed for simplistic operation, the migration utility also offers different configurations for optimum<br />
performance. By fully leveraging multi-threading, it can migrate DDL objects and data in parallel. Each<br />
thread has a connection <strong>to</strong> the servers <strong>to</strong> perform the task. These threads can be configured with the<br />
following three options:<br />
• WORK_THREAD – The number of threads used <strong>to</strong> query the DDL objects from the source database<br />
and recreate them on the target database in parallel<br />
• DATA_COPY_THREAD – The number of threads used <strong>to</strong> copy the user tables data in parallel<br />
• CREATE_INDEX_THREAD – The number of threads used <strong>to</strong> recreate the indexes on the target<br />
database in parallel<br />
4
In addition <strong>to</strong> the parallelism in the migration utility, the ASE also does parallel data copy within the<br />
partition tables.<br />
These migration utility thread configurations require ASE resources. Therefore, users must also configure<br />
the ASE. Here are the ASE configurations users must configure <strong>to</strong> allow better performance:<br />
• cis packet size – On the source ASE, this must be set <strong>to</strong> the value same as the target ASE <strong>page</strong> size<br />
• max network packet size – On the target ASE, this must be at least the target ASE <strong>page</strong> size<br />
• cis bulk insert batch size – This number must be configured <strong>to</strong> a value that is low enough <strong>to</strong> avoid getting<br />
<strong>to</strong>o many locks, but high enough <strong>to</strong> avoid <strong>to</strong>o many commits<br />
• number of user connections – This number is tied <strong>to</strong> the number of threads migration utility uses and the<br />
number of partitions in tables. Each migration utility thread has its own server connection. Therefore, users<br />
must configure this <strong>to</strong> a value greater than the number of threads migration utility uses. A valid value would<br />
be DATA_COPY_THREAD * maximum number of partitions in tables being migrated + (10% <strong>to</strong> 30%).<br />
The 10% <strong>to</strong> 30% is due <strong>to</strong> the behavior of the garbage collection in different platform Java VM<br />
• max parallel degree – On the source ASE, this must be configured <strong>to</strong> a value that is the maximum number of<br />
partitions in tables being migrated<br />
• number of worker processes – On the source ASE, this must be configured <strong>to</strong> DATA_COPY_THREAD *<br />
maximum number of partitions in table being migrated<br />
• partition groups – On the source and target ASE, this must be configured <strong>to</strong> DATA_COPY_THREAD *<br />
maximum number of partitions in table being migrated<br />
• allow resource limits – This configuration must be off for source ASE<br />
• select on syscomments.text – This configuration must be on for both source and target ASE’s<br />
• number of open objects – If needed, adjust <strong>to</strong> accommodate proxy tables in migration database<br />
5
International Contacts<br />
Argentina<br />
+5411 4313 4488<br />
Australia<br />
+612 9936 8800<br />
Austria<br />
+43 1 504 8510<br />
Belgium<br />
+32 2 713 15 03<br />
Brazil<br />
+5511 3046 7388<br />
Bulgaria<br />
+359 2 986 1287<br />
Canada<br />
+905 273 8500<br />
Central America<br />
+506 204 7151<br />
Chile<br />
+56 2 330 6700<br />
China<br />
+8610 6856 8488<br />
Colombia<br />
+57 1 218 8266<br />
Croatia<br />
+385 42 33 1812<br />
Czech Republic<br />
+420 2 24 31 08 08<br />
Denmark<br />
+45 3927 7913<br />
Ecuador<br />
+59 322 508 593<br />
El Salvador<br />
+503 245 1128<br />
Finland<br />
+358 9 7250 200<br />
France<br />
+33 1 41 91 96 80<br />
Germany<br />
+49 69 9508 6182<br />
Greece<br />
+30 1 98 89 300<br />
Guatemala<br />
+502 366 4348<br />
Honduras<br />
+504 239 5483<br />
Hong Kong<br />
+852 2506 6000<br />
Hungary<br />
+36 22 517 631<br />
India<br />
+91 22 655 0258<br />
Indonesia<br />
+62 21 526 7690<br />
Israel<br />
+972 3 548 3555<br />
Italy<br />
+39 02 696 820 64<br />
Ivory Coast<br />
+225 22 43 73 73<br />
Japan<br />
+81 3 5210 6000<br />
Kazakstan<br />
+7 3272 64 1566<br />
Korea<br />
+82 2 3451 5200<br />
Malaysia<br />
+603 2142 4218<br />
Mexico<br />
+52 5282 8000<br />
Netherlands<br />
+31 20 346 9290<br />
New Zealand<br />
+64 4473 3661<br />
Nigeria<br />
+234 12 62 5120<br />
Norway<br />
+47 231 621 45<br />
Panama<br />
+507 263 4349<br />
Peru<br />
+511 221 4190<br />
Philippines<br />
+632 750 2550<br />
Poland<br />
+48 22 844 55 55<br />
Portugal<br />
+351 21 424 6710<br />
Puer<strong>to</strong> Rico<br />
+787 289 7895<br />
Romania<br />
+40 1 231 08 70<br />
Russian Federation<br />
+7 095 797 4774<br />
Singapore<br />
+65 370 5100<br />
Slovak Republic<br />
+421 26 478 2281<br />
Slovenia<br />
+385 42 33 1812<br />
South Africa<br />
+27 11 804 3740<br />
South Korea<br />
+82 2 3451 5200<br />
Spain<br />
+34 91 749 7605<br />
Sweden<br />
+46 8 568 512 00<br />
Switzerland<br />
+41 1 800 9220<br />
Taiwan<br />
+886 2 2715 6000<br />
Thailand<br />
+662 618 8638<br />
Turkey<br />
+90 212 284 8339<br />
Ukraine<br />
+380 44 227 3230<br />
United Arab Emirates<br />
+971 2 627 5911<br />
United Kingdom<br />
+44 870 240 2255<br />
Venezuela<br />
+58 212 267 5670<br />
Asian Solutions Center<br />
+852 2506 8700<br />
For other Europe, Middle East, or Africa inquiries:<br />
+33 1 41 90 41 64 (<strong>Sybase</strong> Europe)<br />
For other Asia Pacific inquiries:<br />
+852 2506 6000 (Hong Kong)<br />
For other Latin America inquiries:<br />
+305 671 1020 (Miami)<br />
<strong>Sybase</strong> Incorporated<br />
Worldwide Headquarters<br />
5000 Hacienda Boulevard<br />
Dublin, CA 94568-7902 USA<br />
Tel: 1-800-8-SYBASE<br />
www.sybase.com<br />
Copyright ©2002 by <strong>Sybase</strong>, Inc. All rights reserved. <strong>Sybase</strong>, the <strong>Sybase</strong> logo, Adaptive Server, and Replication Server are trademarks of<br />
<strong>Sybase</strong>, Inc. All other trademarks are property of their respective owners. ® indicates registration in the United States of America. Specifications<br />
subject <strong>to</strong> change without notice. Some of the functionality described herein may be sold separately. Printed in Canada.<br />
This Technical White Paper was prepared by <strong>Sybase</strong>, Inc. L02176 MIL5014