Results 1 to 4 of 4

Thread: Changing the DATATYPE of a PUBLISHED COLUMN

  1. #1
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114

    Question Changing the DATATYPE of a PUBLISHED COLUMN

    Hi guys,

    Is there any way or method to CHANGE the DATATYPE of a column in a published table being used for transactional replication (MSSQL 2000), WITHOUT DROPPING THE SUBSCRIPTION ????

    Im stuck in this mess and do have the option to drop the subscription, alter the table, create the subscription and rerun the snapshot or to recreate it by Manual Synchronisation either.

    Can anyone help? Has anyone been across this dilemma before and have troubleshooted the problem? If yes, help is much appreciated.


    MY PROBLEM:
    ~~~~~~~~~~~~~
    'MyTable' is currently being published and has subscriptions to it. The PRIMARY KEY column 'id' has an Identity property as well. 'id' is of datatype smallint, however because of bad planning, i now need to change that datatype to an integer to support a larger range WITHOUT DROPPING SUBSCRIPTIONS.
    I CANT DROP THE COLUMN EITHER AS IT IS BEING THE PRIMARY KEY COLUMN.

    IS THERE ANY OTHER WAY I CAN DO TO ARCHIEVE MY GOAL? THANKYOU.
    Last edited by KingSexy182; 10-27-2003 at 05:55 AM.

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    How about drop the column from article, change data type then add it back to article? You can drop/add column with sp_articlecolumn.

  3. #3
    Join Date
    Sep 2002
    Location
    Fantasy
    Posts
    4,254
    do it on the test environment. if there are foreign key tables then it becomes hectic

  4. #4
    Join Date
    Feb 2003
    Location
    Aussie Land
    Posts
    114
    thanks guys,

    but i cant drop the column and add it again, because the datatype type i want change is the PRIMARY KEY COLUMN.

    doesnt look to good for me..... = (

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •