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.
dol_downgrade_check('database_name', target_version)
name or ID of the database you are checking. database_name may be a qualified object name (for example, mydb.dbo.mytable).
integer version of Adaptive Server to which you are downgrading (for example, version 15.0.3 is 1503).
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)
Returns zero (success) if the target version is 15.7 or later, indicating that no work is necessary.
If you specify a qualified table, but do not indicate the database to which it belongs, dol_downgrade_check checks the current database.
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. |