Click here to Skip to main content
15,917,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
dear all

I need take my live sql db backup to my local system... how can i get the .bak file pls help me.....

when i use this code will appear a error message like this :-



// Sql Query

backup database rh_bookmany
to disk ='E:\rh_bookmany.bak'
with name='rh_bookmany' ,
     noformat ,
     init     ,
     skip     ,
     norewind ,
     nounload ,
     stats=10


////Error Msg

Msg 3201, Level 16, State 1, Line 1
Cannot open backup device 'E:\rh_bookmany.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.
Posted

The clue is in the message:
Cannot open backup device 'E:\rh_bookmany.bak'. Operating system error 5(Access is denied.)
Try putting the file somewhere that the program does have write access to...
If necessary (and it's not a bad idea) create a folder especially for the backups, and set the permissions.
 
Share this answer
 
Comments
abdul wahab.o 14-May-11 3:08am    
I did that already but that not possible...the same error msg generated again

thanks for ur responds
dear wahab,

it is not possible to get the back up of the live server. in your query you trying to get local path but we can't access the live server as local machine...


if you need the back up you have to contact the live server admin
.


Hope this will help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900