I am currently logged to a users machine on Active Directory Domain A, and I need to access a Database in MSSQL 2000 located in Domain B via VB6. The user has accounts in both Active Directory Servers. The Active Directory Domains are not related or linked.
At the moment i`m using the following MSSQL connection string:
gcnnBD.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=" & gsDataBase & ";Data Source=" & gsServidor & ";Connect Timeout=" & gsTimeOutconnection string.
Is it possible to connect to Domain B via the connection string, if im logged in to Domain A?
What would the connection string look like?
Any suggestions are welcome.
Azure SQL Database and SQL Managed Instance support SQL authentication and Azure AD authentication. SQL Managed instance additionally supports Windows Authentication for Azure AD principals.
Would this application need to access network resources on domain A at all?
Because of integrated security, the process has to be launched with domain credentials.
Assuming there is no trust relationship, to do this, you can use RUNAS /NETONLY to have the program being run use another domain credentials for ALL network work (which is why I ask if you will be also working on domain A from that program). http://ss64.com/nt/runas.html
In fact, I modified a program I wrote to relaunch itself with the equivalent Win32 API call in order to ensure that it was launched with domain credentials after I asked this question a few years ago: How to build RUNAS /NETONLY functionality into a (C#/.NET/WinForms) program?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With