Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Copying one table from sql 2005 to sql 2008

Posted on 2014-02-10
4
Medium Priority
?
593 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 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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

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…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

927 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