5

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.

3 Answers 3

2

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?

Sign up to request clarification or add additional context in comments.

Comments

2

Yes, but since you're using integrated authentication, Domain B will need to trust Domain A. If you're infamiliar with this term, your domain admins should be able to help. You will probably need to qualify the server name too, as domain\server or server.domain.

4 Comments

What would the connection string look like without integrated authentitacion and fully qualified name.
Without integrated authentication, you'd lose Integrated Security=SSPI and instead have User name=xxx;Password=xxx where these are the credentials of a suitable SQL Server logon.
Would the username include the fully qualified name? Username=Domain\Server1\User1;Password=xxx
No, it has to be a SQL Server logon and not a domain logon if you're not using integrated security.
2

This is an example of the connection string I use in order to have SSIS access from a different servers databases on a different domain. Data Source=[IP Address];User ID=[Windows Log In];Password=[Your Password];Initial Catalog=[Your Database Name];Provider=SQLNCLI10.1

Hopefully that helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.