Creating an agent for automatic backups as a stored procedure RRS feed

  • Question

  • Hello, everyone!

    Quick question from someone, who has MICROSOFT SQL experience for 4 weeks now. been working with the SSMS, and just want to ask: I want to run a task via a stored procedure, which creates a backup of a certain DB every 15 minutes. I have some experience with Stored Procedures, Triggers, and Backup creation, just dunno how to concoct all the wisodm into one simple task, as emberassing how it may seem :/

    Wednesday, October 9, 2019 12:53 PM

All replies

  • Hope you are excited to work in SQL Server.

    Are you looking for Maintenance Plan

    Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
     [Blog]  [LinkedIn]

    Wednesday, October 9, 2019 1:03 PM
  • Hello Friend ,

    Usually you will use jobs or maintenance plan (which in the end will be jobs too, but graphically).
    These options are only enabled for Standard versions and above.

    For Express Edition versions you will need to use the windows Task to schedule scripts created via .bat and .sql files.

    Check your version of Sql Server and start your studies according to the link already sent by SQLZealots.

    To you see your Sql SErver Version you can use: 

    select @@version

    Good studies.

    If this answer has helped you, mark it helpful so that someone else with a question or similar problem can find an answer or help more easily. Jefferson Clyton Pereira da Silva - [MCSA | MCP | MCTS | MTA | Database Analyst - Sql Server and Oracle]

    Wednesday, October 9, 2019 2:36 PM
  • Wednesday, October 9, 2019 2:49 PM
  • Another commonly used solution os the one provided by Ola Hallengren, which among other thing has one such procedure. 

    Tibor Karaszi, SQL Server MVP (Web Blog)

    Thursday, October 10, 2019 6:35 AM
  • Hi Adamantus,

    You could use jobs or maintenance plan to back up databases automatically as SQLZealots mentioned,unless you are using SQL Server express.

    If you are using the SQL Server express version, you could use a Transact-SQL script together with Windows Task Scheduler to automate backups of databases on a scheduled basis. For more information, please refer to How to schedule and automate backups of SQL Server databases in SQL Server Express.

    Hope this could help you.

    Best Regards,

    Amelia Gu

    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, October 10, 2019 7:43 AM
  • thank you very much for the answers!

    Yeah, I noticed there is supposed to be a tab which could maintain the schedules for me, though it would be the easy way :)

    I have Standard, and some sorts of script now at the ready.

    BTW, is there a possibility to receive E-Mail notifications for replies?

    Thursday, October 10, 2019 11:40 AM
  • BTW, is there a possibility to receive E-Mail notifications for replies?

    Sure, use the "Alert me" link on top of the thread.

    Olaf Helper

    [ Blog] [ Xing] [ MVP]

    Thursday, October 10, 2019 11:53 AM