Solved

VB.net Transfer very large SQL tables between databases

Posted on 2015-02-24
5
177 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:murbro
  • 2
  • 2
5 Comments
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
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 45

Expert Comment

by:Vitor Montalvão
Comment Utility
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:murbro
Comment Utility
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 45

Accepted Solution

by:
Vitor Montalvão earned 500 total points
Comment Utility
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:murbro
Comment Utility
thanks very much
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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
Via a live example, show how to shrink a transaction log file down to a reasonable size.

744 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

18 Experts available now in Live!

Get 1:1 Help Now