Is it possible to take backup of database with stored procedure using Sql Server 2005/2008 ?
What is the stored procedure for it…and what would be the scenarios where my project required to create such procedure in my project?
front end language will be C#.Net and backend is sql server.
Can anybody guide me in this… Thanks in advance..
Is it possible to take backup of database with stored procedure using Sql Server
Share
You can create your own stored procedure:
and then you can execute this procedure from your T-SQL code:
EDIT:
to execute your stored proceure in c#, you need do something like that:
EDIT AGAIN: I think, front-end Application can use SP to create backups to realize next scenario: Before mass-update operation (import of data, mass-cleaning etc) user can start backup from application. In this case user does not need the appropriate sql-server and database rights, he must not have any databse tools and sql knowledge, but backup can be done.