ll (ba**********@yahoo.com) writes:
I'm currently using MS SQL Server 2000. A colleague said that she
thought that there was a way to set a property to 'preserve the
primary keys in the tables, although I haven't located that yet.
Would SQL 2000 have a place to make this adjustment?
I still don't know what you are talking about. OK, I know there is
some export/import thing in Enterprise Manager, but I have never
used it.
There are several ways to move things from production to test, and
the absolutely simplest way is to use BACKUP/RESTORE. In that case
you don't have to worry about primary keys or anything else not being
copied. All you need to care about is to fix user/login mapping.
Other ways to export data is to build the datbase from scripts (preferrably
kept under source control) and then use INSERT/SELECT or bulk copy to
move the data.
The last thing I would set my bets on is something that scripts the database
for me, and does a lot things behind my back that I don't know if I can
trust or not.
So, is there any particular reason BACKUP/RESTORE is not the right thing
for you?
--
Erland Sommarskog, SQL Server MVP,
es****@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx