Ms Sql database schedule backup via ssms

Gowrab Das Dip 41 Reputation points
2022-10-15T09:10:18.927+00:00

I want to schedule back-up (Every Day) my databases via ssms-18 with back-up file name format "databasename_back-up date_back-up time.bak". Can you help me to solve this?

SQL Server Other
{count} votes

2 answers

Sort by: Most helpful
  1. Bjoern Peters 8,921 Reputation points
    2022-10-15T12:23:02.043+00:00

    Hi @Gowrab Das Dip

    Best and easiest way to do this (and other important jobs) is to solve it with the well known SQL Server Maintenance Scripts from Ola Hallengren.

    It automatically creates all agent jobs and you just have to configure schedules!

    ola.hallengren.com


  2. YufeiShao-msft 7,146 Reputation points
    2022-10-17T06:44:31.307+00:00

    Hi @Gowrab Das Dip ,

    There is an example of creating a backup of the database in this doc
    Create and run SQL Server Agent jobs on Linux

    Create a backup job
    250888-image.png

    select Steps>New to configure the job, use the sql code to create the backup in Command box
    250889-image.png

    To schedule a job, select Schedule>New, select a recurring frequency and a start date
    250916-image.png

    Right click the job and select Start Job at Step option

    -------------

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.