Saturday, February 25, 2012

Problems with atached database ...

Hi NG, first sorry for my bad english.
I have created a VB project with uses al local SQL2005Express database and a public SQL2005Express database over the net.
I have added the public server using a stored procedure via 'sp_addlinkedserver' and the public server is set to mixed auth mode.
If I run my project in VisualStudio, everthing works fine, no problems to use functions which get theire data from the public server.
But if i use ClickOnce to instal my application on another pc, first everythink looks fine, sqlexpress was instaled and the application too.
If I start the application I was able to use all functions which connect to the local, attached database, but if I call a function which use the public server over the 'sp_addlinkedserver', I get the following error messsage :

' could not log in user ' ',no trusted sqlconnection for this user ' (sorry, self-translated)

but if I check the connectionstring of the addlinked server he is correct with both, username and pw.
Please could someone be so nice and explain it to me ?
Sincerely,
Oliver Petri.

hi Oliver,

SQLExpress installs by default allowing trusted connections only.. you can modify that behaviour both at install time, providing the SECURITYMODE=SQL parameter to the install wizard or enabling the relative setting if in UI mode, or later, at "run time".. you can use SQL Server Management Studio Express for that.. select the server's node, rx click and access the server's properties.. in the "security" page, modify the "server authentication" to "SQL Server and Windows authentication mode".. restart the instance..

regards

|||Thx for your answer, but that is not the problem. As I post '....the public server is set to mixed auth mode.' I have done this for both servers.
Sincerely,
Oliver Petri.

No comments:

Post a Comment