Wednesday, March 7, 2012

DTSWizard and identity columns

I have used the dtswizard which comes with sql server 2005 to create a copy of my db. The problem is, that the dtswizard doesn't set identity columns and primary keys on the db-copy. This causes a lot of errors since there are no primary keys and identity columns. How do I copy these settings when using DTSwizard?

thanks,
Thomas

I don't believe you can copy the constraints and keys with the DTSWizard.

However, the Copy Database function copies the keys and constraints.

Using SSMS, in the Object Explorer pane, on the Database you wish to copy, right-click, and select [Tasks...], then [Copy Database...]

|||I cannot find the Copy Database function. Maybe it is because my DB is on a shared hosting solution. I am not sure, I have the rights to do it?

Is there another way in which I can do a complete copy of the DB?

|||

If I had known that first...

For shared hosting situations, the SQL Server team has created a special utilitiy (Database Publishing Wizard) to create a script of the database so that you can copy the script up to the host and execute the script on the remote server, making a duplicate of the database. The Wizard also allows updating specific tables, or data within the tables.

Download your copy here:

Database Publishing Wizard
http://www.microsoft.com/downloads/details.aspx?familyid=56E5B1C5-BF17-42E0-A410-371A838E570A&displaylang=en

|||Thanks alot. That was exactly what I needed

No comments:

Post a Comment