Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to create a backup in an SQL Server 2014 database, I have 2 questions, I want to know which is the best and easy method (SMO or other) and want to know how the database after backup to exist but with no data so I can reenter data, I want to backup every six months because of volume of data, database contains only characters and dates no Special data (blob fields), I want to do it from VB Net 2015.

What I have tried:

seen code but undecided waht merhod to use
Updated 14-Jul-17 8:01am

1 solution

When making backups from code be sure to set the Connection and Command timeout of the connection to a high enough value as backups of big databases can take a long time.
Here is a simple way to make backups: Backup & Restore of SQL Server database using VB.NET[^]
To script the database using SMO, see this article: SMO Tutorial 3 of n - Scripting[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900