connect sql server from another domain

C

C#User

hi,
For the local sql server, the connection string is like:
Data Source=(local);Integrated Security=SSPI;Connection
Timeout=5;DataBase=northwind

But for another sql server on another domain, what the connection string
should look like??

i appreciate your help!
 
M

Martin Robins

Data Source=MyServer;Integrated Security=SSPI; ...

Assuming that the server is on the same domain as the workstation and that
you are authorised to access the database on the server, all you need to
change are the name of the "Data Source" to the name of the server you wish
to access (and possibly the database if it does not have the same name).
 
S

Steven Cheng[MSFT]

Hi,

In addtion to Martin's suggestion, here are some other web resources on
connecting sqlserver via ADO.NET
http://www.connectionstrings.com/
# OpenLink .NET Data Providers Connect String Attributes
http://www.openlinksw.com/info/docs/uda51/lite/dnetconnstr.html

Also, I think drag a "DataAdapter" component onto form and generate the
connectionstring via it is more convenient. Thanks.


Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx
 
S

Steven Cheng[MSFT]

Hi C#User,

Have you had a chance to check out the suggestions in my last reply or have
you got any further ideas on this issue? If there're anything else we can
help, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
 
M

Martin Robins

My apologies, I have just re-read your original post.

If the server is on another domain, you have two choices: (a) you can use
SQL security - a bit of a pain as you need another username/password
combination or (b) you could try assigning a trust between the two domains
and then set up the second domain to access the server as well.

SQL security is ideal if you are allowing access from multiple external
domains, but make sure you have all the latest service packs before you
enable this as there was a nasty virus last year that expolited a hole in
the SQL security. If these are internal domains then the trust would be much
better.

Martin.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top