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
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Export/Import and Identities

Author  Topic 

rbarber
Starting Member

1 Post

Posted - 2010-08-13 : 09:38:41
I created a website for my company on my home server.
It grew to be important enough to the company, that they'd like it on a higher bandwidth server, so they are paying for a host for it.

I do not have restore permissions on the host, but I do have access to it via SQL studio.

Here at work, I installed SQL 2008 express. I backed up my database from my home server, and restored it here on my work machine.
I then attached to the web hosts database through the same SQL studio so I can see both databases at once.

What I have been able to do is to import data from my copy of the database into tables on the remote host.

My problem is that while all the data and structure gets there, all my identity columns no linger identities.

I can go through and manually make them so, but that's a great number of tables.

I always name my identity columns "ID".

Is there a way, perhaps by using EXEC sp_MSforeachtable to set all columns named ID to be identities, without re-seeding them?

Why yes, I can make that icon in cornflower blue.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-08-14 : 03:03:00
how do you do import? you've an option to maintain identity values if you're using export import wizard

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -