Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to create Backup of database for a fixed time?

How to create Backup of database for a fixed time?

Scheduled Pinned Locked Moved Database
databasehelptutorialquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Care Career
    wrote on last edited by
    #1

    Hi HOw to create Backup of database using query for a fixed time? I do not want to use Wizard. plz help as soon as possible. Thanks

    M 1 Reply Last reply
    0
    • C Care Career

      Hi HOw to create Backup of database using query for a fixed time? I do not want to use Wizard. plz help as soon as possible. Thanks

      M Offline
      M Offline
      Marek Grzenkowicz
      wrote on last edited by
      #2

      This will create a backup: BACKUP DATABASE pubs TO DISK = N'c:\temp\pubs.bak' but I have no idea if that's what you need, since I don't know what you mean by 'for a fixed time'. Could you explain?

      C 1 Reply Last reply
      0
      • M Marek Grzenkowicz

        This will create a backup: BACKUP DATABASE pubs TO DISK = N'c:\temp\pubs.bak' but I have no idea if that's what you need, since I don't know what you mean by 'for a fixed time'. Could you explain?

        C Offline
        C Offline
        Care Career
        wrote on last edited by
        #3

        Thnks for replay BACKUP DATABASE Parikrama TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\SQLSpyNetJob.bak' WITH NOINIT, NOSKIP, STATS = 10 can anyone tell wht is the meaning of STATS =10 in above query. And plz tell me i want query tht taking automatically bacup of database with in interval0f 10-10 minutes by job scheduler . Thanks

        R 1 Reply Last reply
        0
        • C Care Career

          Thnks for replay BACKUP DATABASE Parikrama TO DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\SQLSpyNetJob.bak' WITH NOINIT, NOSKIP, STATS = 10 can anyone tell wht is the meaning of STATS =10 in above query. And plz tell me i want query tht taking automatically bacup of database with in interval0f 10-10 minutes by job scheduler . Thanks

          R Offline
          R Offline
          Rob Graham
          wrote on last edited by
          #4

          Care Career wrote:

          database

          SQL Server Books On Line[^] are your friend. That means with statistics update based on a 10% sample of the data. Creating a backup every 10 minutes is only likely to work for a very small database, as backup can take more time than this. Creating a job to do this on a scheduled interval takes more than one query, and is best done using the database maintenance wizard. It is possible manually, but the procedure is more lengthy than can be described here. Use the reference I have provided, and look up SQL Server Agent tasks, or Database maintenance.

          C M 2 Replies Last reply
          0
          • R Rob Graham

            Care Career wrote:

            database

            SQL Server Books On Line[^] are your friend. That means with statistics update based on a 10% sample of the data. Creating a backup every 10 minutes is only likely to work for a very small database, as backup can take more time than this. Creating a job to do this on a scheduled interval takes more than one query, and is best done using the database maintenance wizard. It is possible manually, but the procedure is more lengthy than can be described here. Use the reference I have provided, and look up SQL Server Agent tasks, or Database maintenance.

            C Offline
            C Offline
            Care Career
            wrote on last edited by
            #5

            thnx lot Can u tell how to start Sql server agent? 1069 logon faliure error is coming when i start sql server agent. Thnx

            M 1 Reply Last reply
            0
            • C Care Career

              thnx lot Can u tell how to start Sql server agent? 1069 logon faliure error is coming when i start sql server agent. Thnx

              M Offline
              M Offline
              Marek Grzenkowicz
              wrote on last edited by
              #6

              Try to search for yourself before you ask - this is the first result Google gave me: http://www.mssqlcity.com/FAQ/Trouble/error_1069.htm[^]. What account does SQL Server Agent use on your machine?

              1 Reply Last reply
              0
              • R Rob Graham

                Care Career wrote:

                database

                SQL Server Books On Line[^] are your friend. That means with statistics update based on a 10% sample of the data. Creating a backup every 10 minutes is only likely to work for a very small database, as backup can take more time than this. Creating a job to do this on a scheduled interval takes more than one query, and is best done using the database maintenance wizard. It is possible manually, but the procedure is more lengthy than can be described here. Use the reference I have provided, and look up SQL Server Agent tasks, or Database maintenance.

                M Offline
                M Offline
                Marek Grzenkowicz
                wrote on last edited by
                #7

                Rob Graham wrote:

                That means with statistics update based on a 10% sample of the data.

                Are you sure? This is what I found:

                STATS [ = percentage ] Displays a message each time another percentage completes, and is used to gauge progress. If percentage is omitted, SQL Server displays a message after each 10 percent is completed. The STATS option reports the percentage complete as of the threshold for reporting the next interval. This is at approximately the specified percentage; for example, with STATS=10, if the amount completed is 40 percent, the option might display 43 percent. For large backup sets, this is not a problem, because the percentage complete moves very slowly between completed I/O calls.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups