Hi all!
A sister company of ours has a SQL server that I pull data from using one of our SQL servers. They do not want me to link to their server (I don't know why) so I use the following code within a stored procedure:
and this works fine. But I would rather not hard code the user name and password. I tried to create User Name and Password as parameters and pass them through, but it will not work. Is there a way that I can add this layer of security?
Thanks!
A sister company of ours has a SQL server that I pull data from using one of our SQL servers. They do not want me to link to their server (I don't know why) so I use the following code within a stored procedure:
Code:
Select Field1, Field2, Field3
FROM OPENDATASOURCE(
'SQLOLEDB',
'Data Source=192.168.1.1;User ID=Username;Password=password'
).Instance.owner.Table
Where rundate = @vcRunDate
and this works fine. But I would rather not hard code the user name and password. I tried to create User Name and Password as parameters and pass them through, but it will not work. Is there a way that I can add this layer of security?
Thanks!