Showing posts with label mode. Show all posts
Showing posts with label mode. Show all posts

Wednesday, March 28, 2012

Login failed for user ''. Reason: Not associated with a trusted SQL Server connection.

Hi,

I have 2 windows 2003 server, i instllaed sql server 2005 enterprise edition on the first one (Mixed Mode), and i am trying to install sql server reporting 2000 on the second one,

I installed the sql 2000 connectivity only on the second one , and i installed the sql server sp4 also, while installing reporting services i used the sql login account (sa,pwd)

i got the following error :

Cannot connect to sql server instance ...

Login failed for user ''. Reason: Not associated with a trusted SQL Server connection.

NB1: Allow Remote connection is enabled on sql server 2005.

NB2: I tried to connect from server 2 to server 1 from odbc and it worked properly with (sa,pwd) i have only a problem from reporting server.

Please any help?

Tarek Ghazali

SQL Server MVP

Are the machines in the same domain? What is the network configuration? What does "sql 2000 connectivity" mean?

Have you checked the errorlog? Is there any additional information on the failure there?

Try running a Profiler trace on the SQL Server machine to see if you can find any additional information on the login attempt.

Thanks
Laurentiu

|||

Here's a thread that may be related to the issue you are seeing: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=422598&SiteID=1

Thanks
Laurentiu

|||

Hi Laurentiu,

Thx for your reply,

I have 2 servers on the same domain and under vmware virtual

server (the new release beta 2) ,about sql 2000 connectivity you can install sql server 2000 as (database server or client or connectivity).

I don't have any log error.

Thanks,

Tarek Ghazali

SQL Server MVP

|||

Login failures are normally logged. Are you sure you checked the log on the right server - the one you were trying to connect to? Also, have you got any insights from running a Profiler trace?

Thanks
Laurentiu

|||

Hi Laurentiu,

I created a user on the domain , and i logged on windows by this user on the second server, i added this user to have access login on the first server and it worked fine.

Regards,

Tarek Ghazali

SQL Server MVP

Login failed for user ''. Reason: Not associated with a trusted SQL Server connection.

Hi,

I have 2 windows 2003 server, i instllaed sql server 2005 enterprise edition on the first one (Mixed Mode), and i am trying to install sql server reporting 2000 on the second one,

I installed the sql 2000 connectivity only on the second one , and i installed the sql server sp4 also, while installing reporting services i used the sql login account (sa,pwd)

i got the following error :

Cannot connect to sql server instance ...

Login failed for user ''. Reason: Not associated with a trusted SQL Server connection.

NB1: Allow Remote connection is enabled on sql server 2005.

NB2: I tried to connect from server 2 to server 1 from odbc and it worked properly with (sa,pwd) i have only a problem from reporting server.

Please any help?

Tarek Ghazali

SQL Server MVP

Are the machines in the same domain? What is the network configuration? What does "sql 2000 connectivity" mean?

Have you checked the errorlog? Is there any additional information on the failure there?

Try running a Profiler trace on the SQL Server machine to see if you can find any additional information on the login attempt.

Thanks
Laurentiu

|||

Here's a thread that may be related to the issue you are seeing: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=422598&SiteID=1

Thanks
Laurentiu

|||

Hi Laurentiu,

Thx for your reply,

I have 2 servers on the same domain and under vmware virtual

server (the new release beta 2) ,about sql 2000 connectivity you can install sql server 2000 as (database server or client or connectivity).

I don't have any log error.

Thanks,

Tarek Ghazali

SQL Server MVP

|||

Login failures are normally logged. Are you sure you checked the log on the right server - the one you were trying to connect to? Also, have you got any insights from running a Profiler trace?

Thanks
Laurentiu

|||

Hi Laurentiu,

I created a user on the domain , and i logged on windows by this user on the second server, i added this user to have access login on the first server and it worked fine.

Regards,

Tarek Ghazali

SQL Server MVP

sql

Friday, March 23, 2012

login failed for user '(null)'

My variation of this problem is as follows:
the server has the Windows authentication mode, I'am aware of it so I make
sure I comply with it in my connection attempt (through Enterprise Manager).
I attempt to
connect from another PC. Both the client PC and the server have the same
range of users, same names and passwords. When I connect to an sql server on
a server 2003 box, it works. When I connect to an sql server on an XP box, it
fails (login failed for user '(null)'. I made sure the security envronment is
identical for both (same logins, authentication mode etc). All computers are
in the same workgroup (no domain). When the guest account is included as an
allowable account for the sql server, it connects to the xp box, otherwise -
it fails. And it always connects locally (when I use the local Enterprise
Manager). Any suggestions?
Authentication is done using the guest account when simple
file sharing is enabled on XP - you can change it on XP Pro
but not XP home as simple file sharing is always enabled on
XP Home. Refer to the following for more info:
SQL Server clients are authenticated as guests if Simple
File Sharing is enabled
http://support.microsoft.com/?id=831133
-Sue
On Tue, 20 Sep 2005 19:13:02 -0700, "lange"
<lange@.discussions.microsoft.com> wrote:

>My variation of this problem is as follows:
>the server has the Windows authentication mode, I'am aware of it so I make
>sure I comply with it in my connection attempt (through Enterprise Manager).
>I attempt to
>connect from another PC. Both the client PC and the server have the same
>range of users, same names and passwords. When I connect to an sql server on
>a server 2003 box, it works. When I connect to an sql server on an XP box, it
>fails (login failed for user '(null)'. I made sure the security envronment is
>identical for both (same logins, authentication mode etc). All computers are
>in the same workgroup (no domain). When the guest account is included as an
>allowable account for the sql server, it connects to the xp box, otherwise -
>it fails. And it always connects locally (when I use the local Enterprise
>Manager). Any suggestions?
|||Thanks Sue. Actually I cannot ascertain what mode my file sharing was in,
because
I reinstalled Windows XP, but before I did that I had fixed the problem in a
different
way, although it may boil down to the same: it was about local group
policies. It's not that easily accessible:
you need to run gpedit.msc, navigate to:
Computer Configuration
Windows Settings
Security Settings
Local Policies
Security Options
there is an option there: "sharing and security model for local accounts"
it can be either :"classic" or "guest only". What is needed there is
"classic" of course. If think your solution may implicitly include toggling
this setting and it is easily accessible whereas what I did is not.
"Sue Hoegemeier" wrote:

> Authentication is done using the guest account when simple
> file sharing is enabled on XP - you can change it on XP Pro
> but not XP home as simple file sharing is always enabled on
> XP Home. Refer to the following for more info:
> SQL Server clients are authenticated as guests if Simple
> File Sharing is enabled
> http://support.microsoft.com/?id=831133
> -Sue
> On Tue, 20 Sep 2005 19:13:02 -0700, "lange"
> <lange@.discussions.microsoft.com> wrote:
>
>
sql

login failed for user '(null)'

My variation of this problem is as follows:
the server has the Windows authentication mode, I'am aware of it so I make
sure I comply with it in my connection attempt (through Enterprise Manager).
I attempt to
connect from another PC. Both the client PC and the server have the same
range of users, same names and passwords. When I connect to an sql server on
a server 2003 box, it works. When I connect to an sql server on an XP box, i
t
fails (login failed for user '(null)'. I made sure the security envronment i
s
identical for both (same logins, authentication mode etc). All computers are
in the same workgroup (no domain). When the guest account is included as an
allowable account for the sql server, it connects to the xp box, otherwise -
it fails. And it always connects locally (when I use the local Enterprise
Manager). Any suggestions?Authentication is done using the guest account when simple
file sharing is enabled on XP - you can change it on XP Pro
but not XP home as simple file sharing is always enabled on
XP Home. Refer to the following for more info:
SQL Server clients are authenticated as guests if Simple
File Sharing is enabled
http://support.microsoft.com/?id=831133
-Sue
On Tue, 20 Sep 2005 19:13:02 -0700, "lange"
<lange@.discussions.microsoft.com> wrote:

>My variation of this problem is as follows:
>the server has the Windows authentication mode, I'am aware of it so I make
>sure I comply with it in my connection attempt (through Enterprise Manager)
.
>I attempt to
>connect from another PC. Both the client PC and the server have the same
>range of users, same names and passwords. When I connect to an sql server o
n
>a server 2003 box, it works. When I connect to an sql server on an XP box,
it
>fails (login failed for user '(null)'. I made sure the security envronment
is
>identical for both (same logins, authentication mode etc). All computers ar
e
>in the same workgroup (no domain). When the guest account is included as an
>allowable account for the sql server, it connects to the xp box, otherwise
-
>it fails. And it always connects locally (when I use the local Enterprise
>Manager). Any suggestions?|||Thanks Sue. Actually I cannot ascertain what mode my file sharing was in,
because
I reinstalled Windows XP, but before I did that I had fixed the problem in a
different
way, although it may boil down to the same: it was about local group
policies. It's not that easily accessible:
you need to run gpedit.msc, navigate to:
Computer Configuration
Windows Settings
Security Settings
Local Policies
Security Options
there is an option there: "sharing and security model for local accounts"
it can be either :"classic" or "guest only". What is needed there is
"classic" of course. If think your solution may implicitly include toggling
this setting and it is easily accessible whereas what I did is not.
"Sue Hoegemeier" wrote:

> Authentication is done using the guest account when simple
> file sharing is enabled on XP - you can change it on XP Pro
> but not XP home as simple file sharing is always enabled on
> XP Home. Refer to the following for more info:
> SQL Server clients are authenticated as guests if Simple
> File Sharing is enabled
> http://support.microsoft.com/?id=831133
> -Sue
> On Tue, 20 Sep 2005 19:13:02 -0700, "lange"
> <lange@.discussions.microsoft.com> wrote:
>
>sql

Friday, March 9, 2012

Logim mode

Hi,
I connect to SQL-server from my application with 'sa' account.
It works when SQL-server is configured 'Windows Authentication'
and doesn't work for ' Mixed Mode Authentication'.
How it can be?Mixed authentication means that you can connect with windows user accounts and with sql server logins, Windows authentication only allows windows user accounts. The user 'sa' is a sql server builtin login, which means that you can't connect to a sql server configured with windows authentication.
Futhermore, the 'sa' user is standard configured as the administration account for maintaining the databases. Using this account from within an application is not a good choice (to say the least). If you want to use a sql server login for your application, it's best you create a new login and only grant the privileges needed for your application.|||Thanks Jora,
I created another sql server login.
The question is :
Why does this sql server login work from my application with
"Windows Authentication' SQL-server configuration and doesn't
work with Mixed Mode Authentication?
It have to be vice versa, no?|||Yes it should be vice versa. How did you create your sql server login? And how do you connect in your application to the database?|||Enterprise manager ->Security->Logins-> new login (with checkbox -SQL server authentication)
I connect to Sql server from Delphi application (BDE or ADO - both work
properly.
We also checked in registry for 'Logintype' value - it's OK.|||And within delphi? With a connection string or a udl file? How is this configured? We use Delphi and ADO with an udl file. In this udl file you specify the user that is connecting. The user specified has to be the sql server user and not set it to Windows authentication.|||I have two Delphi applications.
One is in Delphi7 (ADO connection) and you are true.
I used the connection string with 'NT integrated security' . Thank you.
But !
My another old Delphi4 application uses BDE alias for connection with
SQL server user name and password and it works !|||How have you created your bde connection? With an odbc dsn or directly in bde?|||Directly in BDE, SQL native driver. See an attached file.|||We only use mixed mode databases. When I create an alias of type 'mssql' i cannot login with a windows account but I can login with sql server login. When I use the type 'sql server' (through odbc) i can login with both windows as sql server login. That's all i can make of it. Hope it helps.