Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Copy Billions of data from One database table to another database table
WhatsApp
Venkatesan Jayakantham
14y
4
k
0
0
25
Blog
Copy Billions of data from One database table to another database table
:
Copy Billions of data from One database table to another database table by venkatesan prabu On May 15, 2010
I faced a very different scenario, Copy huge amount of data(Billion records) from one database table to another database table. Do I need to consider anything or Just put select * into or Insert Into query for moving the data.?
It's a very good challenging issue. We can think about some possible options for this issue.
1. Change the database property to "Simple recovery model" Else, you ldf file willbe bombarded due to huge transaction.
2. Do not do the transaction as a whole. Instead, do it in batches. This will provide room to SQL Server to process it.
3. Else you can put it in while loop. So that, your records will be processed in batches.
4. If the database is identical except that particular table. In that case, restore the database.
5. We can think about database mirroring to mirror the database.
Cheers,
Venkatesan Prabu .J
Copy Billions of data from One database table to another database table
Up Next
Insert Values from One Database Table to Another Database Table in SQL Server
Ebook Download
View all
Functions in SQL Server: Practical Guide
Read by 9k people
Download Now!
Learn
View all
Membership not found