Migrating from 32-bit to 64-bit versions

Adaptive Server sqlupgrade only upgrades Adaptive Server from one version to another. This section describes how to upgrade a 32-bit version of Adaptive Server to a 64-bit version of Adaptive Server.

To migrate Adaptive Server from the 32-bit to the 64-bit version, you must first install and configure the 64-bit operating system.

Method #1: Dump and load

  1. Run dbcc checks on all databases in the 32-bit Adaptive Server and make sure they run cleanly.

  2. Create a 64-bit Adaptive Server in a new directory

  3. Create devices and databases to match those in the 32-bit server. Make sure that the sysusages mapping is correct. See document ID #1324 http://my.sybase.com/detail?id=1324.

    NoteAllow 10 percent more space for the sybsystemprocs database.

  4. Dump the databases on the 32-bit server.

  5. Load the databases to the 64-bit server.

  6. If you have partitioned tables, update partition statistics.

  7. Run dbcc checks on the 64-bit server and make sure they run cleanly.

Method #2: BCP data out and in

If you have DDL scripts to create devices, databases, tables, rules, stored procedures, triggers, and views you can use bcp to move data out of the old database and into the new.

If you do not have DDL scripts, use the ddlgen utility to re-create the schema for the Adaptive Server you are about to upgrade. See the Utility Guide.

  1. Run dbcc checks on databases to verify data integrity.

  2. Use bcp to extract all the data from all the tables in the databases.

  3. Create a new 64-bit Adaptive Server in a new directory.

  4. Create devices, databases, and tables.

  5. bcp data into tables.

  6. Recreate all views, triggers, stored procedures.

  7. Run dbcc checks on the 64-bit server and make sure they run cleanly.

Method #3: Replacing the binary

The third method requires you to modify some key files, recreate stored procedures, then replace the binary.

  1. Run dbcc checks on all databases in the 32-bit Adaptive Server and make sure the dbcc's run cleanly. (checkdb, checkalloc, checkcatalog and checkstorage)

  2. In a new directory, copy the files for the 64-bit Adaptive Server.

  3. Shut down the 32-bit server.

  4. Copy the interfaces file and the configuration file from the 32-bit $SYBASE directory to the 64-bit $SYBASE directory.

  5. Copy the 32-bit $SYBASE/install RUN_server file to the equivalent 64-bit $SYBASE/install directory.

  6. Edit the RUN_server file to reflect the new location of the interfaces, configuration, and log files.

  7. Remove all references to the 32-bit $SYBASE directories from your $PATH definition.

  8. cd to the 64-bit $SYBASE and source the SYBASE.csh script (c shell) or SYBASE.sh script (korn shell).

  9. cd to the 64-bit $SYBASE/install and execute:

    startserver -f RUN_server

  10. After the 64-bit server starts, run installmaster, installmodel, and installmsg.ebf.

  11. If you used dbccdb for dbcc checkstorage, run the installdbccdb. This recreates some tables in the dbccdb, and you may loose history data.

  12. Drop and recreate all your compiled objects, such as stored procedures, triggers, views, and defaults.

  13. If you have partitioned tables, update partition statistics.

  14. Run dbcc again on all databases to verify that they run cleanly.