Solved

Copying one table from sql 2005 to sql 2008

Posted on 2014-02-10
4
578 Views
Last Modified: 2014-02-15
I have a table generated daily on sql 2005 and I have to copy the table to sql 2008 on a different machine. I manually did this by generating scripts with data on sql 2005 and run the script on sql 2008, it worked, but running the generated script takes too long. The script file is about 150MB.
What option do I have besides generating scripts to copy a table between SQL 2005 and 2008 on two different machines?
0
Comment
Question by:crcsupport
  • 2
4 Comments
 
LVL 22

Assisted Solution

by:Steve Wales
Steve Wales earned 333 total points
Comment Utility
Are they on the same network ?  Can they talk to each other ?

If so: use the import / export wizard.

From the 2008 machine, open SSMS, expand to the database, right click on the database name, select Tasks and import data.

Then you can define the 2005 DB as the source, the 2008 as the destination and follow the steps in the wizard.
0
 
LVL 1

Author Comment

by:crcsupport
Comment Utility
SAme network, they can talk each other.

Thank you for the option.
Is there any option that I can automate the import/export like task scheduling? Maybe if I can get the script of the task, I can schedule it, but where do I find the script?
0
 
LVL 22

Assisted Solution

by:Steve Wales
Steve Wales earned 333 total points
Comment Utility
I am not a real expert in such things, but you should be able to use Integration Services (SSIS) to do that.  

Hopefully someone else can provide steps or talk to Mr Google on "Using SSIS to copy table from one database to another" (Never done it using SSIS, I'm afraid).
0
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 167 total points
Comment Utility
Another option is to create a linked server between the two, then it becomes a simple task of  writing the appropriate INSERT statement, as in:
INSERT SQL2008LinkedServerName.DatabaseName.OwnerName.TargetTableName(Col1, Col2, Col3,...)
SELECT  Col1, Col2, Col3,..
FROM SourceTableName
WHERE <insert appropriate condition here>
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now