Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6210885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:14:26+00:00 2026-05-24T06:14:26+00:00

Is it possible to take backup of database with stored procedure using Sql Server

  • 0

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..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:14:26+00:00Added an answer on May 24, 2026 at 6:14 am

    You can create your own stored procedure:

    CREATE PROCEDURE sp_MyBackup
    AS BEGIN
      BACKUP DATABASE myDatabase to disk='c:\BACKUP\myDatabase.bak'
    END
    

    and then you can execute this procedure from your T-SQL code:

    exec sp_MyBackup
    

    EDIT:
    to execute your stored proceure in c#, you need do something like that:

    SqlConnection c= new SqlConection ( connectionstring );
    c.Open();
    SqlCommand cmd = new SqlCommand ("sp_MyBackup", c);
    cmd.CommadType = CommandType.StoredProcedure;
    cmd.ExecuteNonQuery();
    c.Close();
    

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to restore a backup of a SQL Server 2005 database onto
Possible Duplicate: Backup SQL Schema Only? Anybody tell how to take sql database backup
Is it possible to take advantage of SQL Server in Zend Framework? I tried
Whenever I restore a backup of my database in SQL Server I am presented
Is it possible to take a database that is using TDE and create a
Is it possible to take a csv file stored in the res/raw resource directory
Using osql command, SSQL backup of a database is created. It is saved to
Is it possible to search through a MySQL database using blob data to find
I have make Some Differential Backup for a Database, which will take the Backup
Would it be possible to take a users input as a variable to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.