Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Copying one table from sql 2005 to sql 2008

Posted on 2014-02-10
4
Medium Priority
?
590 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
[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
4 Comments
 
LVL 23

Assisted Solution

by:Steve Wales
Steve Wales earned 1332 total points
ID: 39848859
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
ID: 39848864
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 23

Assisted Solution

by:Steve Wales
Steve Wales earned 1332 total points
ID: 39848867
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 668 total points
ID: 39849042
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

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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

730 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