Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 7,2000
»
Replication
»
Changing of Data type int to Big int in...
Changing of Data type int to Big int in production Database which is used for replication
Rate Topic
Display Mode
Topic Options
Author
Message
dakshinamurthy-655138
dakshinamurthy-655138
Posted Monday, February 02, 2009 10:40 PM
Old Hand
Group: General Forum Members
Last Login: Friday, June 14, 2013 8:27 AM
Points: 329,
Visits: 890
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
Post #648579
Graeme100
Graeme100
Posted Monday, February 09, 2009 7:27 AM
Ten Centuries
Group: General Forum Members
Last Login: Tuesday, June 04, 2013 4:38 AM
Points: 1,209,
Visits: 630
Hi,
Is this a big table ?
Can it be removed from the publication, altered and then put back in ??
Regards
Graeme
Post #652804
dakshinamurthy-655138
dakshinamurthy-655138
Posted Monday, February 09, 2009 9:40 PM
Old Hand
Group: General Forum Members
Last Login: Friday, June 14, 2013 8:27 AM
Points: 329,
Visits: 890
Yes most of them are big tables.
Post #653385
Roy Ernest
Roy Ernest
Posted Wednesday, February 11, 2009 7:54 AM
Hall of Fame
Group: General Forum Members
Last Login: Thursday, June 13, 2013 11:29 AM
Points: 3,280,
Visits: 6,626
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
Post #654841
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.