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
 General SQL Server Forums
 New to SQL Server Programming
 table script with data

Author  Topic 

sent_sara
Constraint Violating Yak Guru

377 Posts

Posted - 2007-04-30 : 03:30:47
hi fys,
i need to take a table backup with data..and need to execute in other server..the one way is by DTS..
i need by sql command (table data).Can any one help ??????????????

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-30 : 03:55:50
This may be what you are looking for:
[url]http://vyaskn.tripod.com/code/generate_inserts.txt[/url]

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-30 : 04:09:29
Another way would be to generate script for table schema, run it on destination server and then using BCP, transfer the data.

Or else, you can add destination server as linked server and transfer the data by simple INSERT INTO...SELECT command.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-30 : 04:24:05
These threads have links to numerous methods:

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Generate+INSERT+Statement

Kristen
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-30 : 04:27:48
That thread has link to almost everything..!

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-30 : 07:05:00
Yeah, well it would wouldn't it ... its a thread about generic INSERT statements!!
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-30 : 07:12:34
Kristen,

I was talking about SQL Server Frequently Asked Questions thread, not about generic insert statements thread.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-04-30 : 07:23:00
Ah, sorry. Well in case non-obvious the link above will highlight the relevant item (I hope!)

Kristen
Go to Top of Page
   

- Advertisement -