So we've set up a sp_linkedserver on SQL Server to connect to a remote Access database.
Assume the path to this database is W:/breakfast/pancakes/secretPancakes/pancakeDB.accdb
We know the username and password to the actual database
Password: allY0urPancakeAreBelongToUs!
The problem is, there is also authentication to get into the "secretPancakes" directory.
This authentication is
Username: SuperChef
Password: ilovesf00d
Here is the code for making the sp_linkedserver...
/****** Object: LinkedServer [PancakeDB] Script Date: 06/13/2012 10:08:21 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'PancakeDB', @srvproduct=N'Access 2007', @provider=N'Microsoft.ACE.OLEDB.12.0', @datasrc=N'W:/breakfast/pancakes/secretPancakes/pancakeDB.accdb
', @provstr=N';PWD=allY0urPancakeAreBelongToUs'
/* For security reasons the linked server remote logins password is changed with ######## */
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'PancakeDB',@useself=N'False',@locallogin=NULL,@rmtuser=NULL,@rmtpassword=NULL
The rmtuser and rmtpassword are for the database though correct? Thing is, if I go on my actual computer and open the protected directory (secretPancakes) and ask Windows to remember my credentials, it'll work fine on my computer, but not on others'.
I'm trying to fix this so we don't have to do the objNetwork.MapNetworkDrive(DriveLetter, RemotePath, False, UserID, UserPWD) thing, which is a pain. (objNetwork = Microsoft.VisualBasic.CreateObject("WScript.Network"))
So my question is: how do I pass along the credentials for folder access within the linkedserver?
UPDATE:
This screen shot may help...?
Also, is this where I would change these credentials to the credentials used to get into that folder right?