November 6, 2008 at 11:26 pm
When i try to import/export data between two server, and if the destination table is created for transfer, i miss the primary keys, foreign keys and identity properties in the destination tables. How can i keep these while transferring data?
Thanks for the help in advance
Hari
techiebuddy.com
November 7, 2008 at 12:15 am
Hi Hari,
Did you have a look at the Copy Database Wizard? It brings everything (unless you specify otherwise).
HTH!
/Elisabeth
elisabeth@sqlserverland.com
MCITP | MCT
http://sqlblog.com/blogs/elisabeth_redei/
http://linkedin.com/in/elisabethredei
November 7, 2008 at 12:23 am
Thank you for your reply
but i have to copy data to my web server which is with my hosting provider and i don't have permission to create db there.
November 7, 2008 at 6:03 am
Hi,
Can you run scripts? In that case you could script you objects but you probably want to apply constraints after the data export. Also, if you bring over your IDENTITY columns, SET IDENTITY INSERT ON has to be used.
Best option is if you have SSIS, then there is a Transfer SQL Server objects task that can do the job for you.
HTH!
/Elisabeth
PS. By accident this post ended up in another thread initially, sorry everyone for messing things up DS.
elisabeth@sqlserverland.com
MCITP | MCT
http://sqlblog.com/blogs/elisabeth_redei/
http://linkedin.com/in/elisabethredei
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply