I am using the DMO API via .NET to provide an alternative interface for job scheduling functions on the SQL Server 2000 Agent. The working code looks something like this:
using SQLDMO; internal class TestDmo { public void StartJob() { SQLServerClass sqlServer = new SQLServerClass(); sqlServer.Connect("MyServerName", "sql_user_id", " p@ssword ");
Everything works in the above form (SQL Server authentication with uid / pwd provided), but I would also like to provide authentication as a trusted user (e.g. SSPI, Trusted Connection).
Is this possible in the DMO API? If so, how?
Note. The SQLServerClass.Connect method does not seem to have overloads, I already tried to pass null values ββfor the user ID and password to no avail, and Google was not useful. Any ideas?
source share