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. Backup database is terminating abnormally

Backup database is terminating abnormally

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelpquestion
9 Posts 2 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.
  • S Offline
    S Offline
    sunil goyalG
    wrote on last edited by
    #1

    hi all, i have a small code of piece which create backup of Sql server database. It works well but in some cases(when i select target path to desktop folder or documents and settings folder or program files folder) it gives following error "Can not open backup device" & Target Path & . "Operating system error 5(Access is denied.).Backup database is terminating abnormally" Please suggest for this error ?

    L 1 Reply Last reply
    0
    • S sunil goyalG

      hi all, i have a small code of piece which create backup of Sql server database. It works well but in some cases(when i select target path to desktop folder or documents and settings folder or program files folder) it gives following error "Can not open backup device" & Target Path & . "Operating system error 5(Access is denied.).Backup database is terminating abnormally" Please suggest for this error ?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Are these folders located on the server, or are you selecting a folder in your local desktop? Have you checked whether you got write-permissions on the folder?

      S 1 Reply Last reply
      0
      • L Lost User

        Are these folders located on the server, or are you selecting a folder in your local desktop? Have you checked whether you got write-permissions on the folder?

        S Offline
        S Offline
        sunil goyalG
        wrote on last edited by
        #3

        eddyvluggen wrote:

        Are these folders located on the server, or are you selecting a folder in your local desktop?

        This folder is located on local desktop(or program files or documents and settings).I have no write permission on this folder. Whether there are any method to check the permission of the folder and change the permission of the folder using vb.net ?

        L 1 Reply Last reply
        0
        • S sunil goyalG

          eddyvluggen wrote:

          Are these folders located on the server, or are you selecting a folder in your local desktop?

          This folder is located on local desktop(or program files or documents and settings).I have no write permission on this folder. Whether there are any method to check the permission of the folder and change the permission of the folder using vb.net ?

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          sunil goyalG wrote:

          This folder is located on local desktop

          In that case you'll need to backup on the server, and copy the backup from the server-machine to your local machine. Can you make a backup to the root of C: on the servermachine?

          sunil goyalG wrote:

          I have no write permission on this folder.

          You'll need permission. Ask your network-administrator if you can't change the permissions. Hope this helps,

          S 1 Reply Last reply
          0
          • L Lost User

            sunil goyalG wrote:

            This folder is located on local desktop

            In that case you'll need to backup on the server, and copy the backup from the server-machine to your local machine. Can you make a backup to the root of C: on the servermachine?

            sunil goyalG wrote:

            I have no write permission on this folder.

            You'll need permission. Ask your network-administrator if you can't change the permissions. Hope this helps,

            S Offline
            S Offline
            sunil goyalG
            wrote on last edited by
            #5

            eddyvluggen wrote:

            In that case you'll need to backup on the server, and copy the backup from the server-machine to your local machine

            in my present case, Server and client is same

            eddyvluggen wrote:

            You'll need permission. Ask your network-administrator if you can't change the permissions.

            How can i do this thing programmatically ? It is a stand alone computer

            L 1 Reply Last reply
            0
            • S sunil goyalG

              eddyvluggen wrote:

              In that case you'll need to backup on the server, and copy the backup from the server-machine to your local machine

              in my present case, Server and client is same

              eddyvluggen wrote:

              You'll need permission. Ask your network-administrator if you can't change the permissions.

              How can i do this thing programmatically ? It is a stand alone computer

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              sunil goyalG wrote:

              in my present case, Server and client is same

              In that case, you should be able to backup to C:\.. Have you tried whether you can backup there? It's important because it rules out any other problems, like a full harddisk and the likes.

              sunil goyalG wrote:

              How can i do this thing programmatically ?

              You can't "grant" yourself permissions from code that easily, that would be a security-hole. If you can't copy a text-file to the appropriate folder, then you also can't backup there. Can you check whether you can write a textfile to the folder that you want to backup to? There should be a local administrator-account on the machine. That's the one that's used to set/check the permissions.

              S 1 Reply Last reply
              0
              • L Lost User

                sunil goyalG wrote:

                in my present case, Server and client is same

                In that case, you should be able to backup to C:\.. Have you tried whether you can backup there? It's important because it rules out any other problems, like a full harddisk and the likes.

                sunil goyalG wrote:

                How can i do this thing programmatically ?

                You can't "grant" yourself permissions from code that easily, that would be a security-hole. If you can't copy a text-file to the appropriate folder, then you also can't backup there. Can you check whether you can write a textfile to the folder that you want to backup to? There should be a local administrator-account on the machine. That's the one that's used to set/check the permissions.

                S Offline
                S Offline
                sunil goyalG
                wrote on last edited by
                #7

                eddyvluggen wrote:

                you should be able to backup to C:\.. Have you tried whether you can backup there?

                i am able to take backup on root(c:\) or any other folder except(desktop,program files & documents and Settings folder)

                eddyvluggen wrote:

                Can you check whether you can write a textfile to the folder that you want to backup to?

                i am able to create any text file to above specified folder but whenever i try to create backup file then it gives error. any suggestion ?

                L 1 Reply Last reply
                0
                • S sunil goyalG

                  eddyvluggen wrote:

                  you should be able to backup to C:\.. Have you tried whether you can backup there?

                  i am able to take backup on root(c:\) or any other folder except(desktop,program files & documents and Settings folder)

                  eddyvluggen wrote:

                  Can you check whether you can write a textfile to the folder that you want to backup to?

                  i am able to create any text file to above specified folder but whenever i try to create backup file then it gives error. any suggestion ?

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  Sounds like you do have write-permissions then :) It might be that the path is too long, or the spaces in the path might cause problems. Can you backup to "C:\PROGRA~1"?

                  S 1 Reply Last reply
                  0
                  • L Lost User

                    Sounds like you do have write-permissions then :) It might be that the path is too long, or the spaces in the path might cause problems. Can you backup to "C:\PROGRA~1"?

                    S Offline
                    S Offline
                    sunil goyalG
                    wrote on last edited by
                    #9

                    eddyvluggen wrote:

                    Can you backup to "C:\PROGRA~1"?

                    No. i can not backup to this path. Also not on desktop and documents and settings folder. Except these folder i can take backup in any folder programmatically.

                    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