backing up database on 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.
Re: backing up database on remote computer???
Re: backing up database on remote computer???
Can you map a drive on the server to your computer? That way you could specify the user and password.
HTH
backing up database on remote computer???
No I cannot map the drive becauyse this is dynamic, at the time of writing I don't know where the server is of if it is even remote or local. All I know is program uses SQL SERVER which can be remote or local. When the program is distributed to sites and the backup utilities are used this is when I need to perfrom this operation.
There has to some kind of API function or sth which let's you copy stuff to remote computers if you knwo username and passwords to those computers.
Re: backing up database on remote computer???
Why are you worried about the location of the server? Your original email said that you wanted to backup the database on your computer - can you not have the server map a drive to your computer - the name of your computer should never change.
Re: backing up database on remote computer???
OK Maybe I did not clarify the problem enough.
The server and the host(host = machine running my app) can both change.
So going to windows and mapping from there is not an option( I wish it was).
I do not know where the server is gonan be (or even if it is gonna be remote) and I do not know the name of the computer that is gonna run this app. All i know is the usernames and passwrds to the admin account for both the computers (server and host).
The server name will be known through an INI file which will be set whenever server is shifted.
Same with host which is known through the INI or I can even use API to get it(but we already have INI).
So the info avalible at runtime is
ServerName
HOST Name
admin user names and passwords to both.
So I have two options either I make the SQL SERVER do two backups(one on server and one on host) or I copy the backup file from the server to the host.
Both of these seem to hit the wall cuz of security issue????? :(
I am still trying though
Re: backing up database on remote computer???