Solved

COpy MS SQL tables from one server to another

Posted on 2014-10-10
2
146 Views
Last Modified: 2014-10-10
I have two servers (serverA and serverB) both containing MS SQL 2005. How do I copy tables from serverA to serverB using a Coldfusion program or a script? What is the best way to go about this ?
0
Comment
Question by:Errol Farro
2 Comments
 
LVL 49

Assisted Solution

by:Vitor Montalvão
Vitor Montalvão earned 250 total points
ID: 40372834
The easiest way is to use the Import/Export Wizard from SQL Server Management Studio. Just right-click on the database A from server A and chose Tasks/Export Data... and follow the wizard.

Other way is using T-SQL but you need to create first a Linked Server to server B on server A and then run a query similar to this one:
INSERT INTO ServerB.dbo.TableName
SELECT * FROM ServerATableName

Open in new window

0
 
LVL 2

Accepted Solution

by:
Pratik Makwana earned 250 total points
ID: 40372836
try this.......

Select * into ServerA.DestinationDB.dbo.tableName from ServerB.SourceDB.dbo.SourceTable

For generate script :
1.Right-click on the database name, then select "Tasks" then click on "Generate Scripts". After that, the Script Wizard opens. Click on "Next".
2. Select the Database you want to script.
3.Choose the object types. Click on "Next".
4.Select the tables.
5.Select the Output option for the script.
6.Change/Edit the database name to the name you want to execute this script for.
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Hi. There are several upload tutorials using jquery and coldfusion. I found a very interesting one here Upload Your Files using Jquery & ColdFusion and Preview them (http://www.randhawaworld.com/) . I did keep the main js functions but made sever…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question