how to backup database non remote computer?
-
Hi, I am trying to tell MSSQL Server running on a remote computer on LAN to back up a database on my computer. This is done through a application written in c++. The Idea is to back up the database on the computer where the server is located as well as on the computer running the app. What I did before this dual requirement was presented was create a stored procedure to backup the database which took the database name and the location to be backed up to as arguments. It works well as SQL Server backs it on the local drive specified the path. No if I send in the network address of my computer to do the same, SQL SERVER error log tells me that operating system denied permission ( which is what will be expected ). I send in a string as \\computername\driverletter$\path\filename.zip How can I modify this to include the user name and passwrod so that SQL SERVER can back it up on my computer without security problems??? I have tried net use kind of syntax but it does not help. Please help!! this is really important. Thanks In advance. :mad:
-
Hi, I am trying to tell MSSQL Server running on a remote computer on LAN to back up a database on my computer. This is done through a application written in c++. The Idea is to back up the database on the computer where the server is located as well as on the computer running the app. What I did before this dual requirement was presented was create a stored procedure to backup the database which took the database name and the location to be backed up to as arguments. It works well as SQL Server backs it on the local drive specified the path. No if I send in the network address of my computer to do the same, SQL SERVER error log tells me that operating system denied permission ( which is what will be expected ). I send in a string as \\computername\driverletter$\path\filename.zip How can I modify this to include the user name and passwrod so that SQL SERVER can back it up on my computer without security problems??? I have tried net use kind of syntax but it does not help. Please help!! this is really important. Thanks In advance. :mad:
The simplest way is to backup the data on the server and then copy the file to your remote pc using SHFileOperation. John
-
The simplest way is to backup the data on the server and then copy the file to your remote pc using SHFileOperation. John
-
that will require me to logon to the server computer from the app before attampting the copy won't it?
Now when I think of it the user that is logged on has to be an admin for that to work. Sorry. I guess I have worked as an admin too long... There are several ways around this. One way around is you can execute an application as a different user. I have done this in the past. Spawn an application that transfers the file as admin. John
-
Now when I think of it the user that is logged on has to be an admin for that to work. Sorry. I guess I have worked as an admin too long... There are several ways around this. One way around is you can execute an application as a different user. I have done this in the past. Spawn an application that transfers the file as admin. John
I tried using the SHFileOperation function. I gives me an error copying the file which says that error reading the source disk or file. This could be related to security issue, that windows will not let me copy the file from the server to this machine which is running the application. So the original problem is still there. I have the usernames and passwords of both computers(the DBServer and the host running application). How do I backup the DB to host or copy the already backedup file from Server???
-
I tried using the SHFileOperation function. I gives me an error copying the file which says that error reading the source disk or file. This could be related to security issue, that windows will not let me copy the file from the server to this machine which is running the application. So the original problem is still there. I have the usernames and passwords of both computers(the DBServer and the host running application). How do I backup the DB to host or copy the already backedup file from Server???
I know. Unless you are logged in on the local pc as an admin on the server pc SHFileOperation will not work. Sorry. John
-
I know. Unless you are logged in on the local pc as an admin on the server pc SHFileOperation will not work. Sorry. John
-
but I am logged in as admin !! The problem is how to tell windows that I have admin rights to the server when using the SHFileOperation function??
SHFileOperation uses the rights of the logged on user . Are you sure you passed the data correctly? Is your string double null terminated? John