December 25, 2008 at 11:38 pm
Hi All
I am developing one Windows application... That application using one database named as INVENTORY..All my tables and SP are there in that INVENTORY database...
Requirement
---------------
I hve one menu 'Take BackUp'.....
so how to take Backup that database while i am using that database..
what will be the query.. I mean what i will write in my .Net .cs file to take Backup of that Database...
Susant
9967487567
December 25, 2008 at 11:50 pm
susant (12/25/2008)
Hi AllI am developing one Windows application... That application using one database named as INVENTORY..All my tables and SP are there in that INVENTORY database...
Requirement
---------------
I hve one menu 'Take BackUp'.....
so how to take Backup that database while i am using that database..
what will be the query.. I mean what i will write in my .Net .cs file to take Backup of that Database...
Before taking backup, i suggest you ask your DBA about the recovery model that he's set for the database. Is there a backup policy or you want it to be taken 'at-will' using your application.
If u're taking it from application, the login must have the privilages of a db_backupoperator on ur database.
For full backup you need to write something like this.
Backup database INVENTORY to DISK='your backup path'
Please refer Books online for detailed options which you can use with your backup statement.
December 26, 2008 at 8:23 am
You can also take a backup using SMO in your C# application. Check out this video at jumstarttv.com for the how-to.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 26, 2008 at 9:05 am
Be sure that you manage the backup files as well. Perhaps delete the ones older than the last 2 after the backup completes.
December 26, 2008 at 9:33 pm
Hi Jack
The link u have given 'jumstarttv.com ' is not exist...
and one more thing can u send me some details on SMO.. I mean how to work integrate with my .Net application for taking Backup...
Susant
9967487567
December 26, 2008 at 9:41 pm
The word "video" is a link also and that one works. I messed up when I put the jumpstarttv link in.
I don't know that much about SMO as I have not written any applications to manage SQL Server as I use SSMS, which is why I pointed you to jumpstarttv. You can also use SQL BOL and google SMO.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
December 26, 2008 at 9:45 pm
susant the link is http://jumpstarttv.com/
video is at http://www.jumpstarttv.com/backing-up-your-database-with-smo_411.aspx
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply