dol_downgrade_check

Description

Returns the number of data-only-locked (DOL) tables in the specified database that contain variable-length columns wider than 8191 bytes. Returns 0 when there are no wide, variable-length columns and you can safely perform the downgrade.

Syntax

dol_downgrade_check('database_name', target_version) 

Parameters

database_name

name or ID of the database you are checking. database_name may be a qualified object name (for example, mydb.dbo.mytable).

target_version

integer version of Adaptive Server to which you are downgrading (for example, version 15.0.3 is 1503).

Examples

Example 1

Checks DOL tables in the pubs2 database for wide, variable-length columns so you can downgrade to version 15.5:

select dol_downgrade_check('pubs2', 1550)

Usage

Permissions

The permission checks for dol_downgrade_check differ based on your granular permissions settings.

Granular permissions enabled

With granular permissions enabled, you must be the database owner or have manage database permission to execute dol_downgrade_check.

Granular permissions disabled

With granular permissions disabled, you must be the database owner or be a user with sa_role to execute dol_downgrade_check.