Downgrading from Adaptive Server 15.7

Use sp_downgrade to downgrade Adaptive Server 15.7 to an earlier version.

Prerequisites
  1. Save the current auditing settings for the 15.7 Adaptive Server by saving the output of the sp_displayaudit system procedure in all system and user databases where any auditing options have been turned on:
    1> sp_displayaudit
    2> go
  2. Back up all of your databases and the $SYBASE release area.
Task

Downgrade from Adaptive Server 15.7 to an Adaptive Server 15.0, 15.0.1, 15.0.2, 15.0.3, or 15.5. Downgrading to versions of Adaptive Server earlier than 15.0 is not supported.

Downgrade from Adaptive Server Cluster Edition version 15.7 to to Adaptive Server Cluster Edition 15.0.1.5.

  1. Start the 15.7 server in single-user mode using dataserver -m to guarantee that no other user can access Adaptive Server while you are going through the downgrade steps. See the Utility Guide for more details on starting the server in single-user mode. If you do not do this, Adaptive Server displays the following when you run sp_downgrade:
    You cannot run sp_downgrade; server must be in single-user mode.
    Try restarting the server using the -m option.
  2. Make sure Adaptive Server 15.7 is prepared for downgrade by executing this command from the master database:
    sp_downgrade 'prepare', @toversion='version'

    The format for the value of version does not need periods, so these are all valid:"15.5", "155", "15.0", "150", "15.0.1", "1501", "15.0.2", "1502", "15.0.3," "1503". The version you enter should be the Adaptive Server version to which you want to downgrade.

    Note: If you have used the 15.0.2 features for encrypted columns and you are downgrading to:
    • Adaptive Server 15.0 or 15.0 ESD #1 – specify the version as "15.0."
    • Adaptive Server 15.0, 15.0 ESD #2, 15.0.1, or a 15.0.1 ESD – specify the version parameter as "15.0.1."
    • Adaptive Server 15.0.2 or a 15.0.2 ESD – specify the version parameter as "15.0.2."

    sp_downgrade 'prepare' validates the readiness of Adaptive Server 15.7 for downgrade. It may print messages regarding manual changes required before the downgrade can be completed. Repeat this step, correcting any errors reported, and make sure you understand the implications of all warnings before proceeding.

  3. Execute:
    sp_downgrade 'downgrade', @toversion='version', @override=1

    Use the same version number as in step 2. Once this command completes successfully there can be no more activity on the 15.7 server. Run checkpoint and immediately shut down the 15.7 server.

  4. Copy the RUN_SERVER file to the release area for the version you are downgrading to. Modify the file to use the dataserver binary of the version to which you are downgrading, using -e, -c, and -M option point to the old server.
    For example, if you are downgrading to 15.0.2, change 15.7-related information to 15.0.2-related information. From the SYBASE directory:
    /work_dirs/sybase/ase1502/ASE-15_0/bin/dataserver\
        -s old_server_name\
        -d downgraded_master_device\
        -e old_server_log_file\
        -c old_server_config_file\
        -M /work_dirs/sybase/ase1502\
  5. Restart the old server using the modified RUN_SERVER file. Ensure that the environment variable points to the old server release such as $SYBASE, $SYBASE_ASE, or $SYBASE_OCS.
    Note: When downgrading to a 15.0 or a 15.0.1 server, you can reset user passwords by setting sp_passwordpolicy 'allow password downgrade' to 0. User passwords are reset and print on the console. Be sure to save the output of sp_downgrade 'downgrade', <version> into a file, so the passwords are not lost. To regenerate the sa password, restart the downgraded server with -psa. See sp_passwordpolicy in Reference Manual: Procedures.
  6. Run any post-downgrade scripts that may be applicable to your site.
If you have not used any 15.7 functionality, this completes the primary downgrade process.
Related concepts
Downgrade Considerations for Adaptive Server with Replicated Databases
Additional Considerations for New Features Used
Related tasks
Downgrading an Adaptive Server that Uses Encryption
Post-Downgrade Tasks for Adaptive Server
Downgrading Job Scheduler