Showing posts with label authentication. Show all posts
Showing posts with label authentication. Show all posts

Friday, March 30, 2012

ODBC DSN for SQL Database

Hi,

I am trying to configure DSN for a remote SQL database using Windows authentication. When I logn with a user ID and configure the DSN, it's working fine. But when I logout and login with another user ID, DSN test is failing with the following message.

Connection Failed:
SQL state 28000
SQL Server Error 18456
Microsoft ODBC SQLServer Driver SQL Server Login failed
for user.

Can any one please let me know how can I configure DSN so that it should work irrespective of what domain account I use to logon to the server later?

Thanks in advance.

Srini.Hi Srini

It sounds like only the first windows account (User ID) has access to SQLServer?

You can also test connectivity by trying to connect using one of the command line tools. I like to try this with SQLCmd (for SQL Server 2005) or osql (for SQL Server 2000)

Try either

sqlcmd -S<your server name here> -E
or
osql -S<your server name here> -E

The -E option tells the tools to use Windows Authentication.

Regards

Steve|||

Hello Steve my name is Chris and i have the same problem with the SQL that Srini has had but when i tried to run the "osql -S <My Server> -E i get the error Cannot generate SSPI context message please help me and point me in the right direction.

Thanks

Chris....

ODBC DSN for SQL Database

Hi,

I am trying to configure DSN for a remote SQL database using Windows authentication. When I logn with a user ID and configure the DSN, it's working fine. But when I logout and login with another user ID, DSN test is failing with the following message.

Connection Failed:
SQL state 28000
SQL Server Error 18456
Microsoft ODBC SQLServer Driver SQL Server Login failed
for user.

Can any one please let me know how can I configure DSN so that it should work irrespective of what domain account I use to logon to the server later?

Thanks in advance.

Srini.Hi Srini

It sounds like only the first windows account (User ID) has access to SQLServer?

You can also test connectivity by trying to connect using one of the command line tools. I like to try this with SQLCmd (for SQL Server 2005) or osql (for SQL Server 2000)

Try either

sqlcmd -S<your server name here> -E
or
osql -S<your server name here> -E

The -E option tells the tools to use Windows Authentication.

Regards

Steve|||

Hello Steve my name is Chris and i have the same problem with the SQL that Srini has had but when i tried to run the "osql -S <My Server> -E i get the error Cannot generate SSPI context message please help me and point me in the right direction.

Thanks

Chris....

ODBC DSN for SQL Database

Hi,

I am trying to configure DSN for a remote SQL database using Windows authentication. When I logn with a user ID and configure the DSN, it's working fine. But when I logout and login with another user ID, DSN test is failing with the following message.

Connection Failed:
SQL state 28000
SQL Server Error 18456
Microsoft ODBC SQLServer Driver SQL Server Login failed
for user.

Can any one please let me know how can I configure DSN so that it should work irrespective of what domain account I use to logon to the server later?

Thanks in advance.

Srini.Hi Srini

It sounds like only the first windows account (User ID) has access to SQLServer?

You can also test connectivity by trying to connect using one of the command line tools. I like to try this with SQLCmd (for SQL Server 2005) or osql (for SQL Server 2000)

Try either

sqlcmd -S<your server name here> -E
or
osql -S<your server name here> -E

The -E option tells the tools to use Windows Authentication.

Regards

Steve|||

Hello Steve my name is Chris and i have the same problem with the SQL that Srini has had but when i tried to run the "osql -S <My Server> -E i get the error Cannot generate SSPI context message please help me and point me in the right direction.

Thanks

Chris....

Monday, March 26, 2012

ODBC Connectivity problem in Sql Server2005

Hi,

I have created DSN connection with sql server authentication in Sql server 2005. There is message comes "Connection Succeeded".

After I try through my application again asking username and password for the DSN at run time. My application is developed in Powerbuilder 5.0.

The connection string as follows,

SQLCA.dbms= "ODBC"
SQLCA.dBparm = "CONNECTSTRING='DSN=ntm',APPNAME = 'ntm',uid='sa',pwd='sierra'"

Can you help me?

I'm not really sure what Powerbuilder syntax is, but did you try something like:
SQLCA.dBparm ="CONNECTSTRING='DSN=ntm;uid=sa;pwd=sierra'"|||

Thanks for your kind reply..

We have rectified that problem.

sql

ODBC Connectivity problem in Sql Server2005

Hi,

I have created DSN connection with sql server authentication in Sql server 2005. There is message comes "Connection Succeeded".

After I try through my application again asking username and password for the DSN at run time. My application is developed in Powerbuilder 5.0.

The connection string as follows,

SQLCA.dbms= "ODBC"
SQLCA.dBparm = "CONNECTSTRING='DSN=ntm',APPNAME = 'ntm',uid='sa',pwd='sierra'"

Can you help me?

I'm not really sure what Powerbuilder syntax is, but did you try something like:
SQLCA.dBparm ="CONNECTSTRING='DSN=ntm;uid=sa;pwd=sierra'"|||

Thanks for your kind reply..

We have rectified that problem.

Friday, March 23, 2012

ODBC connection using NT authentication

I want to create an ODBC connection with windows NT authentication on two servers the domain are different and their operating
systems r also different.
(one is Windows 2K other is NT).
how can i have to go about if i have to do this.sorry i forgot to mention the version
im using SQL SERVER 7|||This should be doable as long as there is a trust relationship established between the NT domain and the W2K domain. Depending on your requirements, this might have to be a two-way trust.

Regards,

hmscott|||My $0.02 ...

I think you could do a 'pass-through' if you cant get the domains to trust eachother. Create a user on the sql server and create the same user with the same password on the other server and you should be able to connect via windows authentication. Is it a good practice? I would say No. But a work aroud if you can't have the domains trust each other.

Originally posted by hmscott
This should be doable as long as there is a trust relationship established between the NT domain and the W2K domain. Depending on your requirements, this might have to be a two-way trust.

Regards,

hmscott|||Hi,

Thanks for ur reply. My client is not beliveing tht we need trust relationship, can u please provide any link
or url where it is mentioned.
Waiting for ur reply

TIA

Originally posted by hmscott
This should be doable as long as there is a trust relationship established between the NT domain and the W2K domain. Depending on your requirements, this might have to be a two-way trust.

Regards,

hmscott|||It is very unlikely that you will get two servers in different domains (NT&W2k) working without setting up a trust between the two domains. Windows authentication uses a SID (security identifier) each computer and each user has a unique SID and the authentication should use the SID not the username. It is true to say that NT4 could be fooled depending on what service pack you used, but W2k with Active Directory will require a trust.

I recently upgraded a whole network of users from NT4 to W2k with AD in a different domain. I researched this and it will only work with a trust relationship as HMScott says. In our original plan we were going to use replication and migrate the users one by one, in the end we moved every9one ov

The way we get around such problems is to use a Role, we have one SQL username in the Role and have our application use that username. Granting ODBC connections may be quick and easy but it leaves you a bit exposed to other issues of Security & Support.

Imagine if this was not the case, any old hacker could access you databases.sql

Wednesday, March 21, 2012

ODBC Connection Failure

Hi,
I'm trying to create a ODBC connection to SQL server 2000 using SQL server authentication. I have login id "lucky9797" and password "tool" but I'm keep getting the following error message:
Connection Failed:
SQLState:'28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login Failed for user "lucky9797"
Could someone please tell me why am I getting this error message? Thanks.
Message posted via http://www.sqlmonster.com
1) It might be that the collation sequence indicated at installation time is
case insensitive. Try typing "TOOL" instead of "tool"
"syed rahman via SQLMonster.com" <forum@.SQLMonster.com> wrote in message
news:0e43caa46e9040489d8c88e56a57a606@.SQLMonster.c om...
> Hi,
> I'm trying to create a ODBC connection to SQL server 2000 using SQL server
authentication. I have login id "lucky9797" and password "tool" but I'm keep
getting the following error message:
> Connection Failed:
> SQLState:'28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login Failed for
user "lucky9797"
> Could someone please tell me why am I getting this error message? Thanks.
> --
> Message posted via http://www.sqlmonster.com

ODBC Connection Failure

Hi,
I'm trying to create a ODBC connection to SQL server 2000 using SQL server a
uthentication. I have login id "lucky9797" and password "tool" but I'm keep
getting the following error message:
Connection Failed:
SQLState:'28000'
SQL Server Error: 18456
[Microsoft][ODBC SQL Server Driver][SQL Server]Login Failed for
user "lucky9797"
Could someone please tell me why am I getting this error message? Thanks.
Message posted via http://www.droptable.com1) It might be that the collation sequence indicated at installation time is
case insensitive. Try typing "TOOL" instead of "tool"
"syed rahman via droptable.com" <forum@.droptable.com> wrote in message
news:0e43caa46e9040489d8c88e56a57a606@.SQ
droptable.com...
> Hi,
> I'm trying to create a ODBC connection to SQL server 2000 using SQL server
authentication. I have login id "lucky9797" and password "tool" but I'm keep
getting the following error message:
> Connection Failed:
> SQLState:'28000'
> SQL Server Error: 18456
> [Microsoft][ODBC SQL Server Driver][SQL Server]Login Failed for

user "lucky9797"
> Could someone please tell me why am I getting this error message? Thanks.
> --
> Message posted via http://www.droptable.comsql

Monday, March 19, 2012

ODBC and user accounts

2 questions:
When you set up a new System DSN to a SQL Server db, you have the option of
selecting NT Authentication or SQL authentication.
1. I have been told that Microsoft recommends NT authentication. I haven't
been able to find anything on the MS site or BOL which says so, though.
Anyone got a link I could use which says this?
2. If you use NT authentication, your username (whoever happened to sign
into Windows when creating this DSN) is there, grayed out. Does that matter?
Is that name going to be used in any way when this ODBC connection is used
programatically?
The best forum for this kind of question would be m.p.access.odbcclientsvr
or m.p.access.externaldata.
NT authentication is recommended because the password used doesn't travel in
clear text over the local network. If you have a virus or a trojan on your
LAN, this is the kind of thing that these malwares can catch.
When you use NT authentication, the active current account of the client
machine is always used for connecting to SQL-Server. The username is not
stored, so if you move the MDB file to another machine or if that you use
another account, the new active account will be used instead of the old one.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OqxxA13eHHA.3960@.TK2MSFTNGP02.phx.gbl...
>2 questions:
> When you set up a new System DSN to a SQL Server db, you have the option
> of selecting NT Authentication or SQL authentication.
> 1. I have been told that Microsoft recommends NT authentication. I haven't
> been able to find anything on the MS site or BOL which says so, though.
> Anyone got a link I could use which says this?
> 2. If you use NT authentication, your username (whoever happened to sign
> into Windows when creating this DSN) is there, grayed out. Does that
> matter? Is that name going to be used in any way when this ODBC connection
> is used programatically?
>
|||> The best forum for this kind of question would be m.p.access.odbcclientsvr
> or m.p.access.externaldata.
Even if it's for SQL Server?
|||Although I am not using Access, your answer most likely stil applies, so
thanks for the explanation.
|||Even if you are using SQL-Server as the backend, your question is only
relevant to the type of client used as the Frontend. Most people using ODBC
links are using Access, hence my suggestion for the forums. However, if you
are using something else as for your frontend, then the best place would be
on a newsgroup about this type of client.
SQL-Server really doesn't care about knowing if the frontend client at the
other side is storing or not the password or if it will reuse the same
username when launched from another machine.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:uZJGnZ4eHHA.2332@.TK2MSFTNGP04.phx.gbl...
> Although I am not using Access, your answer most likely stil applies, so
> thanks for the explanation.
>
|||I am not sure what you mean. I am using SQL Server 2000 only. From the
server, (where my software is running), I set up an ODBC connection,
pointing to the database server. I am not using any front end.
|||You are in the particular case where both the frontend and the backend are
on the same physical machine. However, for the purpose of etablishing an
ODBC connection and reusing or not the same user account when the client
will reetablish later the connection, this doesn't change anything.
In what context are you using this ODBC connection? Are you using it for
etablishing a linked server or if you are using it for another application?
However, if things are currently working properly, then there is no need to
bother yourself with this any more; particularly if you are already using a
Trusted Connection.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
>
|||"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
Disregard the "other forum" suggestion. The basic information provided by
Sylvain applies, regardless of the application using ODBC to connect. It
also applies to any interface used to connect to sql server - odbc, dblib,
ole db, etc.
From a user perspective - the most important reason is that I don't need to
re-enter my security information (userID and password) every time I connect,
nor do I have to manage yet another password to access the dbms.
|||> However, if things are currently working properly, then there is no need
> to bother yourself with this any more;
I'm not bothering myself. I'm only continuing this conversation because you
sent me over to an Access group, when I am not using Access.
|||Hum, you asked in your OP if it does matter to etablish a DSN with or
without NT authentification when this DSN will be used later
programatically.
However, you didn't provide any info about what is exactly this
programmation; so the exact answer to your original question is *Yes*: it
Does matter because you can use this DSN to reconstruct a new DSN or to
etablish a DSN-Less connection with or without the same parameters.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OBP9yB6eHHA.3948@.TK2MSFTNGP03.phx.gbl...
> I'm not bothering myself. I'm only continuing this conversation because
> you sent me over to an Access group, when I am not using Access.
>

ODBC and user accounts

2 questions:
When you set up a new System DSN to a SQL Server db, you have the option of
selecting NT Authentication or SQL authentication.
1. I have been told that Microsoft recommends NT authentication. I haven't
been able to find anything on the MS site or BOL which says so, though.
Anyone got a link I could use which says this?
2. If you use NT authentication, your username (whoever happened to sign
into Windows when creating this DSN) is there, grayed out. Does that matter?
Is that name going to be used in any way when this ODBC connection is used
programatically?The best forum for this kind of question would be m.p.access.odbcclientsvr
or m.p.access.externaldata.
NT authentication is recommended because the password used doesn't travel in
clear text over the local network. If you have a virus or a trojan on your
LAN, this is the kind of thing that these malwares can catch.
When you use NT authentication, the active current account of the client
machine is always used for connecting to SQL-Server. The username is not
stored, so if you move the MDB file to another machine or if that you use
another account, the new active account will be used instead of the old one.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OqxxA13eHHA.3960@.TK2MSFTNGP02.phx.gbl...
>2 questions:
> When you set up a new System DSN to a SQL Server db, you have the option
> of selecting NT Authentication or SQL authentication.
> 1. I have been told that Microsoft recommends NT authentication. I haven't
> been able to find anything on the MS site or BOL which says so, though.
> Anyone got a link I could use which says this?
> 2. If you use NT authentication, your username (whoever happened to sign
> into Windows when creating this DSN) is there, grayed out. Does that
> matter? Is that name going to be used in any way when this ODBC connection
> is used programatically?
>|||> The best forum for this kind of question would be m.p.access.odbcclientsvr
> or m.p.access.externaldata.
Even if it's for SQL Server?|||Although I am not using Access, your answer most likely stil applies, so
thanks for the explanation.|||Even if you are using SQL-Server as the backend, your question is only
relevant to the type of client used as the Frontend. Most people using ODBC
links are using Access, hence my suggestion for the forums. However, if you
are using something else as for your frontend, then the best place would be
on a newsgroup about this type of client.
SQL-Server really doesn't care about knowing if the frontend client at the
other side is storing or not the password or if it will reuse the same
username when launched from another machine.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:uZJGnZ4eHHA.2332@.TK2MSFTNGP04.phx.gbl...
> Although I am not using Access, your answer most likely stil applies, so
> thanks for the explanation.
>|||I am not sure what you mean. I am using SQL Server 2000 only. From the
server, (where my software is running), I set up an ODBC connection,
pointing to the database server. I am not using any front end.|||You are in the particular case where both the frontend and the backend are
on the same physical machine. However, for the purpose of etablishing an
ODBC connection and reusing or not the same user account when the client
will reetablish later the connection, this doesn't change anything.
In what context are you using this ODBC connection? Are you using it for
etablishing a linked server or if you are using it for another application?
However, if things are currently working properly, then there is no need to
bother yourself with this any more; particularly if you are already using a
Trusted Connection.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
>|||"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
Disregard the "other forum" suggestion. The basic information provided by
Sylvain applies, regardless of the application using ODBC to connect. It
also applies to any interface used to connect to sql server - odbc, dblib,
ole db, etc.
From a user perspective - the most important reason is that I don't need to
re-enter my security information (userID and password) every time I connect,
nor do I have to manage yet another password to access the dbms.|||> However, if things are currently working properly, then there is no need
> to bother yourself with this any more;
I'm not bothering myself. I'm only continuing this conversation because you
sent me over to an Access group, when I am not using Access.|||Hum, you asked in your OP if it does matter to etablish a DSN with or
without NT authentification when this DSN will be used later
programatically.
However, you didn't provide any info about what is exactly this
programmation; so the exact answer to your original question is *Yes*: it
Does matter because you can use this DSN to reconstruct a new DSN or to
etablish a DSN-Less connection with or without the same parameters.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OBP9yB6eHHA.3948@.TK2MSFTNGP03.phx.gbl...
>> However, if things are currently working properly, then there is no need
>> to bother yourself with this any more;
> I'm not bothering myself. I'm only continuing this conversation because
> you sent me over to an Access group, when I am not using Access.
>|||I think my question was misunderstood.
1. Is there an official Microsoft recommendation to use NT Authentication
rather than SQL Server authentication on the ODBC connection itself. The
answer is Yes, which I found after I posted.
2. When you choose NT authentication, the box at the bottom of that same
screen, where you would type in your username/password, is grayed out. But
you can still see the text of your login name. If grayed out, does this
login name get used in any way by the ODBC connection?|||« If grayed out, does this login name get used in any way by the ODBC
connection? »
No, any user name stored in a DSN will not be used when etablishing a
trusted connection; the current active account will always be used.
If you want to, you can change the rules - for exemple switching the DSN
from a trusted connection a SQL account; however, this is probably not what
you have in mind, otherwise, you wouldn't ask the question here.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:eJAR8$6eHHA.284@.TK2MSFTNGP05.phx.gbl...
>I think my question was misunderstood.
> 1. Is there an official Microsoft recommendation to use NT Authentication
> rather than SQL Server authentication on the ODBC connection itself. The
> answer is Yes, which I found after I posted.
> 2. When you choose NT authentication, the box at the bottom of that same
> screen, where you would type in your username/password, is grayed out. But
> you can still see the text of your login name. If grayed out, does this
> login name get used in any way by the ODBC connection?
>|||Thanks!
> No, any user name stored in a DSN will not be used when etablishing a
> trusted connection; the current active account will always be used.

ODBC and user accounts

2 questions:
When you set up a new System DSN to a SQL Server db, you have the option of
selecting NT Authentication or SQL authentication.
1. I have been told that Microsoft recommends NT authentication. I haven't
been able to find anything on the MS site or BOL which says so, though.
Anyone got a link I could use which says this?
2. If you use NT authentication, your username (whoever happened to sign
into Windows when creating this DSN) is there, grayed out. Does that matter?
Is that name going to be used in any way when this ODBC connection is used
programatically?The best forum for this kind of question would be m.p.access.odbcclientsvr
or m.p.access.externaldata.
NT authentication is recommended because the password used doesn't travel in
clear text over the local network. If you have a virus or a trojan on your
LAN, this is the kind of thing that these malwares can catch.
When you use NT authentication, the active current account of the client
machine is always used for connecting to SQL-Server. The username is not
stored, so if you move the MDB file to another machine or if that you use
another account, the new active account will be used instead of the old one.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OqxxA13eHHA.3960@.TK2MSFTNGP02.phx.gbl...
>2 questions:
> When you set up a new System DSN to a SQL Server db, you have the option
> of selecting NT Authentication or SQL authentication.
> 1. I have been told that Microsoft recommends NT authentication. I haven't
> been able to find anything on the MS site or BOL which says so, though.
> Anyone got a link I could use which says this?
> 2. If you use NT authentication, your username (whoever happened to sign
> into Windows when creating this DSN) is there, grayed out. Does that
> matter? Is that name going to be used in any way when this ODBC connection
> is used programatically?
>|||> The best forum for this kind of question would be m.p.access.odbcclientsvr
> or m.p.access.externaldata.
Even if it's for SQL Server?|||Although I am not using Access, your answer most likely stil applies, so
thanks for the explanation.|||Even if you are using SQL-Server as the backend, your question is only
relevant to the type of client used as the Frontend. Most people using ODBC
links are using Access, hence my suggestion for the forums. However, if you
are using something else as for your frontend, then the best place would be
on a newsgroup about this type of client.
SQL-Server really doesn't care about knowing if the frontend client at the
other side is storing or not the password or if it will reuse the same
username when launched from another machine.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:uZJGnZ4eHHA.2332@.TK2MSFTNGP04.phx.gbl...
> Although I am not using Access, your answer most likely stil applies, so
> thanks for the explanation.
>|||I am not sure what you mean. I am using SQL Server 2000 only. From the
server, (where my software is running), I set up an ODBC connection,
pointing to the database server. I am not using any front end.|||You are in the particular case where both the frontend and the backend are
on the same physical machine. However, for the purpose of etablishing an
ODBC connection and reusing or not the same user account when the client
will reetablish later the connection, this doesn't change anything.
In what context are you using this ODBC connection? Are you using it for
etablishing a linked server or if you are using it for another application?
However, if things are currently working properly, then there is no need to
bother yourself with this any more; particularly if you are already using a
Trusted Connection.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
>|||"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:%23$PDWG5eHHA.2640@.TK2MSFTNGP06.phx.gbl...
>I am not sure what you mean. I am using SQL Server 2000 only. From the
>server, (where my software is running), I set up an ODBC connection,
>pointing to the database server. I am not using any front end.
Disregard the "other forum" suggestion. The basic information provided by
Sylvain applies, regardless of the application using ODBC to connect. It
also applies to any interface used to connect to sql server - odbc, dblib,
ole db, etc.
From a user perspective - the most important reason is that I don't need to
re-enter my security information (userID and password) every time I connect,
nor do I have to manage yet another password to access the dbms.|||> However, if things are currently working properly, then there is no need
> to bother yourself with this any more;
I'm not bothering myself. I'm only continuing this conversation because you
sent me over to an Access group, when I am not using Access.|||Hum, you asked in your OP if it does matter to etablish a DSN with or
without NT authentification when this DSN will be used later
programatically.
However, you didn't provide any info about what is exactly this
programmation; so the exact answer to your original question is *Yes*: it
Does matter because you can use this DSN to reconstruct a new DSN or to
etablish a DSN-Less connection with or without the same parameters.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Middletree" <middletree@.hottttttttmail.com> wrote in message
news:OBP9yB6eHHA.3948@.TK2MSFTNGP03.phx.gbl...
> I'm not bothering myself. I'm only continuing this conversation because
> you sent me over to an Access group, when I am not using Access.
>

ODBC and SQL Security

Hi,
What is the best practice for authentication to Win2003 Server with SQL
Server 2000 database? For example, an Access 2003 application that would us
e
a ODBC pass-through query to connect and select (read only) data from the
SQL Server database. Would prefer to hard code the username and password
using VBA as this is a reporting app only. We are using a Novell network on
servers where Access app is installed. Usernames are only unique within the
contexts on multiple Novell servers.Bonnie
http://vyaskn.tripod.com/ sql_serve...r />
.htm#Step1
--administaiting
best practices
http://vyaskn.tripod.com/sql_server...t_practices.htm --secu
rity
best practices
"Bonnie" <Bonnie@.discussions.microsoft.com> wrote in message
news:1A495F95-D112-4364-A11B-F1FDC24D93C4@.microsoft.com...
> Hi,
> What is the best practice for authentication to Win2003 Server with SQL
> Server 2000 database? For example, an Access 2003 application that would
use
> a ODBC pass-through query to connect and select (read only) data from the
> SQL Server database. Would prefer to hard code the username and password
> using VBA as this is a reporting app only. We are using a Novell network
on
> servers where Access app is installed. Usernames are only unique within
the
> contexts on multiple Novell servers.

Friday, March 9, 2012

Occasional Authentication Failure

This is an interesting problem. I've never seen this in 5+ years of SQL Server work.
I just started a new job and the folks tell me this happens once a month or so.
We use Trusted Connections for the bulk of work. For some reason one of the multiple SQL Servers we run will just stop recognizing trusted connections. Out of the blue you will just start getting the "Cannot associate user (null) with a trusted connecti
on". The server will log an error indicating it can't find the Domain Controller. The strange thing is only 1 of our SQL Server boxes are affected. There are at least 3 other machines that don't have this issue.
Reboot the server and it's fixed. But, obviously we don't like bouncing production servers. These are running on Server 2003.
I was curious if anyone had seen this before.
Well usually when it says Null as the user , it is a problem with Windows
Authentication itself, not a SQL issue
Check this article :
How to troubleshoot connectivity issues in SQL Server 2000
http://support.microsoft.com/default...b;en-us;827422
HTH
Dylan
"Shawn Brock" <Shawn Brock@.discussions.microsoft.com> wrote in message
news:B62E0490-D630-4378-A3B9-FE36378221CE@.microsoft.com...
> This is an interesting problem. I've never seen this in 5+ years of SQL
Server work.
> I just started a new job and the folks tell me this happens once a month
or so.
> We use Trusted Connections for the bulk of work. For some reason one of
the multiple SQL Servers we run will just stop recognizing trusted
connections. Out of the blue you will just start getting the "Cannot
associate user (null) with a trusted connection". The server will log an
error indicating it can't find the Domain Controller. The strange thing is
only 1 of our SQL Server boxes are affected. There are at least 3 other
machines that don't have this issue.
> Reboot the server and it's fixed. But, obviously we don't like bouncing
production servers. These are running on Server 2003.
> I was curious if anyone had seen this before.

Occasional Authentication Failure

This is an interesting problem. I've never seen this in 5+ years of SQL Ser
ver work.
I just started a new job and the folks tell me this happens once a month or
so.
We use Trusted Connections for the bulk of work. For some reason one of the
multiple SQL Servers we run will just stop recognizing trusted connections.
Out of the blue you will just start getting the "Cannot associate user (nu
ll) with a trusted connecti
on". The server will log an error indicating it can't find the Domain Contr
oller. The strange thing is only 1 of our SQL Server boxes are affected. T
here are at least 3 other machines that don't have this issue.
Reboot the server and it's fixed. But, obviously we don't like bouncing pro
duction servers. These are running on Server 2003.
I was curious if anyone had seen this before.Well usually when it says Null as the user , it is a problem with Windows
Authentication itself, not a SQL issue
Check this article :
How to troubleshoot connectivity issues in SQL Server 2000
http://support.microsoft.com/defaul...kb;en-us;827422
HTH
Dylan
"Shawn Brock" <Shawn Brock@.discussions.microsoft.com> wrote in message
news:B62E0490-D630-4378-A3B9-FE36378221CE@.microsoft.com...
> This is an interesting problem. I've never seen this in 5+ years of SQL
Server work.
> I just started a new job and the folks tell me this happens once a month
or so.
> We use Trusted Connections for the bulk of work. For some reason one of
the multiple SQL Servers we run will just stop recognizing trusted
connections. Out of the blue you will just start getting the "Cannot
associate user (null) with a trusted connection". The server will log an
error indicating it can't find the Domain Controller. The strange thing is
only 1 of our SQL Server boxes are affected. There are at least 3 other
machines that don't have this issue.
> Reboot the server and it's fixed. But, obviously we don't like bouncing
production servers. These are running on Server 2003.
> I was curious if anyone had seen this before.

Obtaining Window login name from a trigger

Hi,
We are running SQL 2K with SQL Server and Windows authentication. Our system has been designed to login external user to SQL Server using one login account. I am trying to retrieve that actual Windows login user name from a trigger. Does anyone know ho
w I accomphish this task.
Try SUSER_SNAME function:
http://msdn.microsoft.com/library/de...u-sus_86xx.asp
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Herb" <Herb@.discussions.microsoft.com> wrote in message
news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our
system has been designed to login external user to SQL Server using one
login account. I am trying to retrieve that actual Windows login user name
from a trigger. Does anyone know how I accomphish this task.
|||If you are using something like MTS / COM+ then you're not going to be able to get that information unless the component explicitly passes in the user name.
"Herb" wrote:

> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our system has been designed to login external user to SQL Server using one login account. I am trying to retrieve that actual Windows login user name from a trigger. Does anyone know
how I accomphish this task.
|||Hi,
Thanks for your suggestion. When I issue SUSER_SNAME while using Window Authication, I do get the Window user ID. However, when I issue SUSER_SNAME while using SQL login, I get the SQL login(for ex. SQL login = RUSER, SUSER_SNAME retrieves RUSER).
"Narayana Vyas Kondreddi" wrote:

> Try SUSER_SNAME function:
> http://msdn.microsoft.com/library/de...u-sus_86xx.asp
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "Herb" <Herb@.discussions.microsoft.com> wrote in message
> news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> system has been designed to login external user to SQL Server using one
> login account. I am trying to retrieve that actual Windows login user name
> from a trigger. Does anyone know how I accomphish this task.
>
>
|||You'll need to pass the "real" login name through to SQL. One technique for
this when an application uses a single service account is to use SET
CONTEXT_INFO to pass the information through with the user connection and
pull this out in your trigger (i. Note that you have to explicitly set this
in your app for each connection that you require this information for. In
some configurations this may not be practical/possible. See BOL for more on
the command.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Herb" <Herb@.discussions.microsoft.com> wrote in message
news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our
system has been designed to login external user to SQL Server using one
login account. I am trying to retrieve that actual Windows login user name
from a trigger. Does anyone know how I accomphish this task.
|||Thanks for the suggestion. I will give that a try.
"Jasper Smith" wrote:

> You'll need to pass the "real" login name through to SQL. One technique for
> this when an application uses a single service account is to use SET
> CONTEXT_INFO to pass the information through with the user connection and
> pull this out in your trigger (i. Note that you have to explicitly set this
> in your app for each connection that you require this information for. In
> some configurations this may not be practical/possible. See BOL for more on
> the command.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Herb" <Herb@.discussions.microsoft.com> wrote in message
> news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> system has been designed to login external user to SQL Server using one
> login account. I am trying to retrieve that actual Windows login user name
> from a trigger. Does anyone know how I accomphish this task.
>
>
|||Thanks for that information. We still have some apps that are using COM+
Herb
"Shawn Brock" wrote:
[vbcol=seagreen]
> If you are using something like MTS / COM+ then you're not going to be able to get that information unless the component explicitly passes in the user name.
> "Herb" wrote:
w how I accomphish this task.

Obtaining Window login name from a trigger

Hi,
We are running SQL 2K with SQL Server and Windows authentication. Our syste
m has been designed to login external user to SQL Server using one login acc
ount. I am trying to retrieve that actual Windows login user name from a tr
igger. Does anyone know ho
w I accomphish this task.Try SUSER_SNAME function:
http://msdn.microsoft.com/library/d.../>
us_86xx.asp
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"Herb" <Herb@.discussions.microsoft.com> wrote in message
news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our
system has been designed to login external user to SQL Server using one
login account. I am trying to retrieve that actual Windows login user name
from a trigger. Does anyone know how I accomphish this task.|||If you are using something like MTS / COM+ then you're not going to be able
to get that information unless the component explicitly passes in the user n
ame.
"Herb" wrote:

> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our system has
been designed to login external user to SQL Server using one login account. I am tr
ying to retrieve that actual Windows login user name from a trigger. Does anyone kn
ow
how I accomphish this task.|||Hi,
Thanks for your suggestion. When I issue SUSER_SNAME while using Window Aut
hication, I do get the Window user ID. However, when I issue SUSER_SNAME wh
ile using SQL login, I get the SQL login(for ex. SQL login = RUSER, SUSER_S
NAME retrieves RUSER).
"Narayana Vyas Kondreddi" wrote:

> Try SUSER_SNAME function:
> http://msdn.microsoft.com/library/d...
-sus_86xx.asp
> --
> Vyas, MVP (SQL Server)
> http://vyaskn.tripod.com/
>
> "Herb" <Herb@.discussions.microsoft.com> wrote in message
> news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> system has been designed to login external user to SQL Server using one
> login account. I am trying to retrieve that actual Windows login user nam
e
> from a trigger. Does anyone know how I accomphish this task.
>
>|||You'll need to pass the "real" login name through to SQL. One technique for
this when an application uses a single service account is to use SET
CONTEXT_INFO to pass the information through with the user connection and
pull this out in your trigger (i. Note that you have to explicitly set this
in your app for each connection that you require this information for. In
some configurations this may not be practical/possible. See BOL for more on
the command.
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Herb" <Herb@.discussions.microsoft.com> wrote in message
news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> Hi,
> We are running SQL 2K with SQL Server and Windows authentication. Our
system has been designed to login external user to SQL Server using one
login account. I am trying to retrieve that actual Windows login user name
from a trigger. Does anyone know how I accomphish this task.|||Thanks for the suggestion. I will give that a try.
"Jasper Smith" wrote:

> You'll need to pass the "real" login name through to SQL. One technique fo
r
> this when an application uses a single service account is to use SET
> CONTEXT_INFO to pass the information through with the user connection and
> pull this out in your trigger (i. Note that you have to explicitly set thi
s
> in your app for each connection that you require this information for. In
> some configurations this may not be practical/possible. See BOL for more o
n
> the command.
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Herb" <Herb@.discussions.microsoft.com> wrote in message
> news:38AB6DF7-C403-469B-A00C-F56CAE4DB2DD@.microsoft.com...
> system has been designed to login external user to SQL Server using one
> login account. I am trying to retrieve that actual Windows login user nam
e
> from a trigger. Does anyone know how I accomphish this task.
>
>|||Thanks for that information. We still have some apps that are using COM+
Herb
"Shawn Brock" wrote:
[vbcol=seagreen]
> If you are using something like MTS / COM+ then you're not going to be abl
e to get that information unless the component explicitly passes in the user
name.
> "Herb" wrote:
>
w how I accomphish this task.