Downgrading from Adaptive Server 15.7 ESD #2

Use sp_downgrade to downgrade Adaptive Server 15.7 ESD #2 to an earlier version.

Prerequisites
Note: Do not use these steps if you are downgrading from Adaptive Server version 15.7 ESD #2 to either version 15.7 or 15.7 ESD #1. Instead, see Downgrading to an Earlier Version of Adaptive Server 15.7.
  1. Save the current auditing settings for the 15.7 ESD #2 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 ESD #2 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.

  1. Start the 15.7 ESD #2 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.
  2. Make sure Adaptive Server 15.7 ESD #2 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 as "15.0.1."
    • Adaptive Server 15.0.2 or a 15.0.2 ESD – specify the version as "15.0.2."

    sp_downgrade 'prepare' validates the readiness of Adaptive Server 15.7 ESD #2 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 the following, where version is the same number you used in the previous step:
    sp_downgrade 'downgrade', @toversion='version', @override=1

    Once this procedure completes successfully, there can be no more activity on the 15.7 ESD #2 server. Run checkpoint and immediately issue the shutdown command.

    Note: Since Adaptive Server 15.7 ESD #2 transaction logs may contain data that older server versions cannot interpret correctly, all transactions in all databases must be completed to prevent the older server from recovering any transactions. To ensure that all transactions are completed, issue the normal shutdown command, and not the shutdown with nowait command, after running sp_downgrade.
  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, issue:
    /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. 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. To restore the original messages for the earlier version of Adaptive Server, run this script after downgrading the server:
    isql -Usa -Psa_password -irestoremsgs.ebf
  7. Run any post-downgrade scripts that may be applicable to your site, including installmaster and instmsgs.ebf.
If you have not used any 15.7 ESD #2 functionality, this completes the primary downgrade process.
Related concepts
Additional Considerations for New Features Used
Related tasks
Post-Downgrade Tasks for Adaptive Server
Downgrading Job Scheduler