Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Database in different Active Directory server

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.

like image 486
Benjamin Ortuzar Avatar asked Jul 12 '12 17:07

Benjamin Ortuzar


People also ask

Does Azure SQL Database support SQL Server authentication?

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.


1 Answers

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?

like image 107
Cade Roux Avatar answered Sep 23 '22 17:09

Cade Roux