Wednesday, March 7, 2012

Login to SQL Server

I have registered SQL server instance (SQLServer1) in SQL Server group,
and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
to connect usinng string:
"PROVIDER=SQLOLEDB.1;DATA
SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
i'm geting the message:
"Login failed for user 'ABCABC'. Reason: Not associated with a trusted
SQL Server connection"
Why is that so?
thanks.
*** Sent via Developersdex http://www.codecomments.com ***
Seems like SQL Server only accepts Windows logins.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"George Ivanov" <gsivanov@.yahoo.com> wrote in message news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
|||Hi George
This connection string will connect using SQL authentication. If you want
Domain authentication you must use something similar to
"Persist Security Info=False;Integrated
Security=SSPI;database=northwind;server=mySQLServe r"
Integrated Security=SSPI; is the key item here and means that the already
domain authenticated user who is starting your application will be used to
access SQL server. This could be the interactive user on the desktop, IIS or
another application so you will need to make sure that whatever starts your
application is already logged on with the required account.
Nik Marshall-Blank MCSD/MCDBA
Linz, Austria
"George Ivanov" <gsivanov@.yahoo.com> wrote in message
news:On9qlKI1FHA.4032@.TK2MSFTNGP15.phx.gbl...
> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
|||It seems like you are using Windows user (you have provide domain name on
your message) not sql user.
But it seems on your connection string you are using sql user.
So if you want to use Trusted Connection you need to change your connection
string.
Check out:
http://www.connectionstrings.com/
"George Ivanov" wrote:

> I have registered SQL server instance (SQLServer1) in SQL Server group,
> and User login 'ABCABC' from domain 'DATA_DOMAIN', but when i'm trying
> to connect usinng string:
> "PROVIDER=SQLOLEDB.1;DATA
> SOURCE=SQLServer1;DATABASE=DB1;UID=ABCABC;PWD=xxxx ;"
> i'm geting the message:
> "Login failed for user 'ABCABC'. Reason: Not associated with a trusted
> SQL Server connection"
> Why is that so?
> thanks.
> *** Sent via Developersdex http://www.codecomments.com ***
>

No comments:

Post a Comment