Solved

COpy MS SQL tables from one server to another

Posted on 2014-10-10
2
147 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Display Date and Time 7 48
SQL Server Agent Job Error 13 73
SQL Lag Function DateDiff 2 25
When are cursors useful? 8 56
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

737 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