Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Database copy makes sets all Identity fields to FA

Author  Topic 

sindle@ensco.com
Starting Member

5 Posts

Posted - 2009-11-06 : 11:46:22
We are copying our 2005 DB from 1 server to another nightly. In SQL 2000, this went OK. In 2005, all our PK's which are set to IDENTITY=TRUE are showing up on the backup server to be FALSE (and of course the database is unusable except to query). Any additions to the tables on the backup copy need to have their PK's filled in manually. TOTALLY bad!
Any idea on why this is happening and/or how to correct this?
Thanks in advance,
Rob

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-06 : 11:47:19
It doesn't sound like you are doing the copy correctly. You need to use BACKUP/RESTORE.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

sindle@ensco.com
Starting Member

5 Posts

Posted - 2009-11-06 : 11:58:21
I think we are doing the copy based on the copy database wizard.
WHY in the world would a copy done this way, blow away the identity setting?
Have you heard of this happening before???
Thanks,
ROb
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-06 : 12:25:25
Don't use the copy database wizard, that's what you get with it. And yes it's common, which is why people don't use it.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -