Wednesday, February 15, 2012

Exporting tables along with their primary and forgen keys and records

Hi all,
Im trying to export 120 tables from SQL server 2000 to SQL server 2005 with their Primary and corresponding records.
Is there way to do this?
Thanks for any help.
Abrahimwhy not just restore from a backup? you can restore a 2000 backup to a 2005 server.|||if you just want the script enterprise manager has a very easy method of exporting...
go to your database, the tables of which u want to export, then go to tables in the table list section select the tables you want to export then right click -> All Taks -> Generate SQL Script

there in the formatting and options tab you can select all the required options like primary, foreign, triggers.indexes...just about everything

try this out and let me know is this what u want...

or as said by jezemine... directly restore the backup|||Hi all,

In Enterprise manager Import\Export Under Column Mappings Tab I see:
Create destination table.
Delete rows in destination table.
Append rows to destination table and enable identity insert.

I tried all of the above options, and none does what I wanted.

About restoring the database.

There are couples of issues that we prefer not to use the restore function.

Regards,

Abrahim|||If you want to generate scripts, here's a little console app I wrote to script out all objects and data in any 2000 or 2005 database. It's useful if you want to automate the scripting process, or if you hate GUIs.

http://www.codeplex.com/scriptdb

hope it's useful to you.|||So,

Is that mean Enterprise manager Import\Export is not capable of doing what I was trying to do?

Thanks in advance,

Abrahim|||7338

7339

You never checked the right options.... kindly check the attachments i have added along with this thread and you will have a better idea....

also if you perform the following option you will still reach here
Right Click on Database name -> All Tasks -> Generate SQL Script
7340

Alternatively a longer programmatic procedure
http://www.databasejournal.com/features/mssql/article.php/2205291

for importing data present in these tables you can use the import/export wizard

No comments:

Post a Comment