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