Thursday, February 16, 2012

Cant Keep Primary Key Columns when moving db to SQL 2005 from 2000

there are some primary key columns which are autoincrement in some tables.
for exampl page_id, now we have deleted many pages in old server so there
are many gaps between the page_id
even the it doest start with 1 because during the testing many initial pages
were deleted.

but when we move it to the new server with sql2005 it gives them numbers from 1,2,3 and
so on.

I need to keep existing 2000 keys. How can I acomplish this?

it would have worked if it also updates this number in other tables which
refer to this column
for example page_id is autoincreement in tbl_category_pages ( this table
contains the page information)
and it also appears in tbl_page_content ( this table contains the page's
content)

because it changes this number at one place and not the other place it makes
the database incorrect.

i tried many things ( there is even an option to keep the values of such
columns but doesnt seem to work)

Thanks,

WessTo maintain existing relationships, simply select all tables and copy them to a notepad. From there you just copy and paste them in the query anlyzer.|||If you want tables with relationships and data, take a complete back up of the database. Use that backup file and restore in sql 2005.|||ramasp,

Thanks, I appreciate your help.

I have given this information to the developer I have working on this. He tells me he tried this and that it can not work because the two versions are different.

Please let me know if this should work and the proccess to do so.

Thanks,

Wess

No comments:

Post a Comment