Friday, February 24, 2012

Can't login with windows user

Why I can't login to a SQL database with windows username and password (both
in OLE DB and ODBC).
If I try with trusted connection (or windows authentication) with the same
user works, but if I write by hand user name (domain\user) and password I
get "Error in initilizing provider". With SQL users works.Hi,
For trusted connection you are not supposed to specify the user name and
password.
A single login to Operating system will give you access to SQL Server as
well. All you need is to click the "Windows Authentication" and click OK.
This will allow you to access the SQl Server with the credentials of
currently logged in OS user.
User name and password needs to be provided only for SQL server based
logins.
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:O8x4qMSSEHA.3812@.TK2MSFTNGP11.phx.gbl...
> Why I can't login to a SQL database with windows username and password
(both
> in OLE DB and ODBC).
> If I try with trusted connection (or windows authentication) with the same
> user works, but if I write by hand user name (domain\user) and password I
> get "Error in initilizing provider". With SQL users works.
>|||But I don't want to access the SQl Server with the credentials of
currently logged in OS user. I need another windows user. Windows not SQL|||Hi,
We cant enter the user name for the windows based user. A single login to OS
will allow allow to login to sql server.
But you could try this:-
1. Map the network (network mapping) to the SQL server using the Windows
user you need to connect to sql server (This user should have rights in sql
server)
2. Now using query analyzer try to connect.
This uses the mapped users security context to login inside sql server
Thanks
Hari
MCDBA
"Sorin Sandu" <ssandu@.bizland.ro.invalid> wrote in message
news:OZcYjreSEHA.644@.tk2msftngp13.phx.gbl...
> But I don't want to access the SQl Server with the credentials of
> currently logged in OS user. I need another windows user. Windows not SQL
>|||Hi
Please what do you mean by map the network (network mapping) ?|||Mapping a network drive is to create a namesake, say "J" drive which is
actually pointing to a share across your network, like \\shared1\sqlfiles.
To do so, open Windows explorer, go to the Tools menu, you'll find "Map
network drive" as the 1st option. That option gives you the drive 'letter'
you want to choose, as well as the "folder" which is the network share. You
will of course have to be using a domain account, and that should have
necessary permissions to access that shared folder.
Hope that helps!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.

No comments:

Post a Comment