zapdefraginfo
For every data partition undergoing incremental reorganization, a row is stored in
sysattributes. Use the dbcc command
zapdefraginfo to delete this information from
sysattributes before performing a downgrade.
The syntax is:
dbcc zapdefraginfo( dbid | dbname, objid | objname
[, indexid | indexname
[, ptnid | ptnname | 0,
['print' | 'zap' | 'zap_no_log' ]]])
where:
- zapdefraginfo – deletes incremental reorganization
information from sysattributes and the corresponding
meta-information on allocation pages.
- dbid | dbname –
specifies the target database ID or name and deletes the
sysattributes rows pertaining to incremental reorganization
under the class "misc table info."
- database_name – is the name of the database to check. If no database name is
given, dbcc uses the current database.
- indexid | indexname –
specifies the ID or name of the index of the target partition. Currently the
value '0' for indexid or the name of the table for
indexname are supported in this parameter.
- objid | objname –
specifies the ID or name of the accessed object.
- ptnid | ptnname –
specifies the ID or name of the target partition and deletes only the extents
that correspond to that partition. The value of 0 for this parameter specifies
that all the partitions of the object must be considered.
- print – prints each extent and the extent version of the
specified object or partition.
- zap – deletes the extent version information for the
specified object or partition.
- zap_no_log – deletes the extent version information for the
specified object without logging the changes involved.
In cases where the sysattributes incremental reorganization rows are
accidentally deleted, use dbcc zapdefraginfo to reset the extent
version information of the object so that reorg defrag does not
mistakenly skip the supposedly fragmented extents while reorganizing.
shrinkdb_setup
Checks whether backlink pointers exist for each partition of a table in the database.
If the backlink pointers do not exist,
shrinkdb_setup creates
them. The syntax
is:
dbcc shrinkdb_setup(dbname[,object_name[, force [, verbose]]]
where:
- dbname – is the name of the database you are
checking.
- object_name – is the name of the object you are
checking.
- force – is:
- true – check tables and partitions whether or not
they are already marked as being maintained.
- false – do not check the tables or
partitions.
- verbose – print messages at the beginning of each check
performed (on by default).
Usage:
- After you run dbcc shinkdb_setup
- Mark any large object columns that include replication indexes as
"suspect" to ensure that Replication Server uses the backlink
pointers on these LOB columns.
- Databases are marked to indicate that dbcc
shinkdb_setup has configured backlink pointers for
text and image columns. You cannot run a use
index command to create replication indexes.