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

x
?
Solved

VB.net Transfer very large SQL tables between databases

Posted on 2015-02-24
5
Medium Priority
?
241 Views
Last Modified: 2016-02-18
Hi

I want to build a VB.net windows form used to transfer tables of 50 to a 100 million records of data between two SQL databases. I have the connection strings for both databases. What VB.net code would I use to do this to ensure that either all the records go in (or not) in a Transact Rollback way?
0
Comment
Question by:Murray Brown
  • 2
  • 2
5 Comments
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 40627669
if this is a "move of records", you should not do this with a vb.net application, but with sql run on the servers using linked servers
only this way you will get an efficient transfer ( SERVER1 => SERVER2 ) and garanteed transaction control instead of  this data transfer : SERVER1 => APPLICATION => SERVER2
0
 
LVL 52

Expert Comment

by:Vitor Montalvão
ID: 40627916
This is an one shot only procedure or something that you'll do it more often? In a schedule basis, maybe?
There are some good options for importing data into a database but the solution depends on what are your needs.
0
 

Author Comment

by:Murray Brown
ID: 40627932
Hi Vitor. That is a very good question. This is definitely not a one shot procedure. It will happen on a schedule basis.
Sorry Guy, I should have mentioned that
0
 
LVL 52

Accepted Solution

by:
Vitor Montalvão earned 2000 total points
ID: 40627948
I wouldn't develop nothing since Integration Services (SSIS) is a powerful ETL .NET tool.
Will save you hours of work as you can build the package and add it to SQL Server Agent as a job to run in a schedule basis.

Other option is to use the bcp utility. A SQL Server tool for bulk copy data. You can found more information about it here. After scripting the command you just need to schedule it using a tool like SQL Server Agent or the Task Scheduler from Windows.
0
 

Author Closing Comment

by:Murray Brown
ID: 40628092
thanks very much
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have a large data set and a SSIS package. How can I load this file in multi threading?
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

783 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