Solved

Copying one table from sql 2005 to sql 2008

Posted on 2014-02-10
4
588 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 22

Assisted Solution

by:Steve Wales
Steve Wales earned 333 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 22

Assisted Solution

by:Steve Wales
Steve Wales earned 333 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 167 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

617 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