February 2, 2009 at 10:40 pm
Hi,
I would like to know how to Change the Data type int to Big int in production Database which is used for replication.
Example :
Assuming I have two tables Address, Users, AddressType
The PK field In AddressType Table Is AddresTypeID which is int
and the table Address refers the AddresTypeID from AddressType Table for the field AddressTypeRef which is also of int datatype, AddressID in Address Table is also of Int data type and in the USers table the AddressID is also int data type and UserID in Users Table is also of the type int and the USerID in users table is refered for so many tables.
Now my request is how to change the type from int to Bigint where in the tables are related and it has PK, FK Constraints for the tables.
Purpose of changing the datatype from int to bigint is i had used the seedvalue for all the autogenerated fields, now for int data type it can take upto 999999999. So if it exceeds that then it will be big problem, so now i need to change the data type from int to bigint.
With Regards
Dakshina Murthy
February 9, 2009 at 7:27 am
Hi,
Is this a big table ?
Can it be removed from the publication, altered and then put back in ??
Regards
Graeme
February 9, 2009 at 9:40 pm
Yes most of them are big tables.
February 11, 2009 at 7:54 am
There is only one option to do it. That is drop the table from Replication and then add it after the alter commands are done.
To add it there are two options.
1. Add the Table and re snap shot it.
2. If down time is possible, then Add the table and dont initialize the table in the subscriber. Since you have the data already in subscriber , there is no need to re initialize the data
-Roy
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply