Change data type int to Bigint

From: Richard R (rrose_at_informsnospam.co.uk)
Date: 06/22/04


Date: Tue, 22 Jun 2004 14:23:48 +0100

I have just noticed a ***-up in my datawarehouse as follows:
Primary key on products table is type BigInt, foriegn key on Fact table is
type Int.
There are a few tens of millions rows on each and the system is live in
production.
 Everything works OK, except when some bright spark queries using Access or
whatever and the BigInt changes to varchar on the client, and then the joins
seem to fail,

What is the least painful way to change the data type on the tables?

The preference is to put the bigInt onto the fact table, as a next phase
will have multiple servers generating product IDS, and while Int is big
enough to cope, I want to seperate the Identity seeds by a very, very, large
amount to avoid ever having conflicts even after a re-load on a server.

Thanks,

Richard