Microsoft KB Archive/811899

= PRB: Error 4928 Occurs When You Try to Rename a Non-Replicated Column =

Article ID: 811899

Article Last Modified on 10/17/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



SYMPTOMS
When you try to rename a column of a table that is not replicated, you may receive an error message similar to:

4928: Cannot alter column '%.*ls' because it is '%ls'.

For example, your error message might contain this text:

Cannot alter column 'notes' because it is 'REPLICATED'.



CAUSE
The replication process marks databases, database objects and columns to indicate their

involvement in replication. However, when replication is removed on the database, those indicators

that are marked may not be reset.



WORKAROUND
Important: Do not use the following workaround if the object is being used for replication. This problem is specific to cases where all replication has been removed from the database but there are objects that remain incorrectly flagged as involved in replication. Using the following procedure on a database that is still replicated is not supported and may break replication on the server.

Steps to Take Before You Work Around This Problem

  Verify that the column is marked for replication. You can check the syscolumns

table in your database to verify this. For example, run the following query against

the database that contains the column that you want to rename. Replace

with the name of the column that you want to rename:

SELECT *

FROM syscolumns

WHERE name = 'column_name'

The column is marked for replication only when the  column value is

greater than or equal to 4096.  Make sure to have a contingency plan, such as a database backup. Microsoft

recommends that you make a full database backup of the database before you

use the workaround. For more information about the BACKUP command,

see the &quot;BACKUP, Transact-SQL Reference&quot; topic in SQL Server Books Online.

Steps to Work Around The Behavior

Notes


 * The following procedure is dependent on SQL Server system tables. The structure

of the system tables may vary in different SQL Server versions. Microsoft does not

recommend that you select directly from the system tables.
 * In most cases, Microsoft does not recommend that you change system tables

directly. For example, do not try to modify system tables by using DELETE,

UPDATE, or INSERT statements, or by using user-defined triggers.

After you make sure that the marked columns in the database are not used by replication,

follow these steps:

  Run the following code to clear the replication indicators on the columns.

sp_configure 'allow updates', 1

go

reconfigure with override

go

begin transaction

UPDATE syscolumns

SET colstat = colstat & ~4096

WHERE colstat & 4096 <>0

go   Verify that rows were affected. If the intended rows in the syscolumns table were

updated, commit the transaction, or roll back the transaction by using one of these commands:

rollback transaction

go     -or- commit transaction

go   Run the following code to set the server configuration back:

sp_configure 'allow updates', 0

go

reconfigure with override

go </li></ol>

<div class="references_section">