Question

What command would I execute to safely change (i.e. from int to bigint) a replicated column's data type in SQL Server 2005?

The column is not a key. There is a non-clustered index on the column.

Was it helpful?

Solution

ALTER TABLE MyTable 
    ALTER COLUMN myIntCol bigint

From BOL:

By default, the following schema changes made at a Publisher running SQL Server are replicated to all SQL Server Subscribers:

  • ALTER TABLE
  • ALTER VIEW
  • ALTER PROCEDURE
  • ALTER FUNCTION
  • ALTER TRIGGER
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top