Wednesday, March 21, 2012
Remote SQL Server login failed for ASPNET user
posts have worked. What is a sure-fire way to get my web application to sto
p
using the ASPNET user for SQL Server authentication? I am trying to connect
to a Server on my LAN with a specified username and password. The error I
get is "Login failed for user '<computer name>\ASPNET'. I tried a standard
connection string and then one that Visual Studio generated when I dragged
the connection to a form:
"Server=<servername>;User ID=<userid>;Password=<password>Initial Catalog=<db
name>"
"workstation id=<my computer name>;packet size=4096;user
id=<user>;password=<password>;data source=<sql server name>;persist security
info=False;initial catalog=<db name>"
I have also tried putting in "Trusted_Connection=false". Also I saw
something about impersonation in the web.config, which i tried but it would
not compile.
The login works fine from inside the Visual Studio IDE and also through
Enterprise Manager.
Thanks for your help
SteveIn my experience this happens when you have the following conditions true...
1. You're using a connection string that's using Integrated Windows
authentication
2. Your web server is configured for anonymous access only
3. <identity impersonate="true" /> is set in your web config (system.web
section)
If your connection string uses a sql login:
User ID=<user>;password=<pwd>;Initial Catalog=<database>;Data Source=<server
>
You should never get this error if your using a SQL login, you're telling
the connection with what credentials to use to connect to the database, why
would it not use what you specified...? I'd double check the connection
string in the config file... You have to have "Integrated Security=True"
specified in your connect string otherwise you would not be attempting to
authenticate to the database using a windows account.
"Steve P" wrote:
> This is a common problem, but none of the methods I read about in the othe
r
> posts have worked. What is a sure-fire way to get my web application to s
top
> using the ASPNET user for SQL Server authentication? I am trying to conne
ct
> to a Server on my LAN with a specified username and password. The error I
> get is "Login failed for user '<computer name>\ASPNET'. I tried a standar
d
> connection string and then one that Visual Studio generated when I dragged
> the connection to a form:
> "Server=<servername>;User ID=<userid>;Password=<password>Initial Catalog=<
db
> name>"
> "workstation id=<my computer name>;packet size=4096;user
> id=<user>;password=<password>;data source=<sql server name>;persist securi
ty
> info=False;initial catalog=<db name>"
> I have also tried putting in "Trusted_Connection=false". Also I saw
> something about impersonation in the web.config, which i tried but it woul
d
> not compile.
> The login works fine from inside the Visual Studio IDE and also through
> Enterprise Manager.
> Thanks for your help
> Steve|||Thank you for responding, Alien2_51. I'll just go down your list:
1) I have made sure that my connection string does not include Integrated
Security=true"
2) I'm not sure about this. I'm just serving out the pages my my computer
(localhost). If I right-click on the default web site and go to directory
security, then to Edit anonymous access, the items that are checked are
"anonymous access", "allow IIS to control password", and "Integrated Windows
authentication". The user name in this dialog box is set to "IUSR_<my
computer name>". If I try to uncheck "integrated windows authentication", I
have to log in when I run the page and then the page won't even display.
3) In my machine.config file, impersonate="false". In the web.config of the
application, the value is not set.
Finally, I don't use the connection string that is in the web.config file
(sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes") I'm not
sure why it's in there; I just put the connection string in global.asax as a
n
application variable. I have also tried just hard-coding the connection
string into the code. I tried commenting out the connection string in
web.config to no avail.
Anyone please let me know if you have any other suggestions; your help is
certainly appreciated.
Thanks,
Steve
"Alien2_51" wrote:
> In my experience this happens when you have the following conditions true.
.
> 1. You're using a connection string that's using Integrated Windows
> authentication
> 2. Your web server is configured for anonymous access only
> 3. <identity impersonate="true" /> is set in your web config (system.w
eb
> section)
> If your connection string uses a sql login:
> User ID=<user>;password=<pwd>;Initial Catalog=<database>;Data Source=<serv
er>
> You should never get this error if your using a SQL login, you're telling
> the connection with what credentials to use to connect to the database, wh
y
> would it not use what you specified...? I'd double check the connection
> string in the config file... You have to have "Integrated Security=True"
> specified in your connect string otherwise you would not be attempting to
> authenticate to the database using a windows account.
>
>
>
> "Steve P" wrote:
>|||Figured out my problem...though the error message is misleading. Apparently
asp.net won't let you have 2 connections open at the same time (one to local
database and one to remote). I removed the local connection to test it and
it worked. Does anyone know how to have 2 simultaneous connections open? I
can use a dataset but the potential problem there is the amount of memory it
could use...
Thanks, Steve
"Steve P" wrote:
> This is a common problem, but none of the methods I read about in the othe
r
> posts have worked. What is a sure-fire way to get my web application to s
top
> using the ASPNET user for SQL Server authentication? I am trying to conne
ct
> to a Server on my LAN with a specified username and password. The error I
> get is "Login failed for user '<computer name>\ASPNET'. I tried a standar
d
> connection string and then one that Visual Studio generated when I dragged
> the connection to a form:
> "Server=<servername>;User ID=<userid>;Password=<password>Initial Catalog=<
db
> name>"
> "workstation id=<my computer name>;packet size=4096;user
> id=<user>;password=<password>;data source=<sql server name>;persist securi
ty
> info=False;initial catalog=<db name>"
> I have also tried putting in "Trusted_Connection=false". Also I saw
> something about impersonation in the web.config, which i tried but it woul
d
> not compile.
> The login works fine from inside the Visual Studio IDE and also through
> Enterprise Manager.
> Thanks for your help
> Steve|||Please disregard my last post. The error originated not from the remote
connection but from the local connection.
"Steve P" wrote:
> Figured out my problem...though the error message is misleading. Apparent
ly
> asp.net won't let you have 2 connections open at the same time (one to loc
al
> database and one to remote). I removed the local connection to test it an
d
> it worked. Does anyone know how to have 2 simultaneous connections open?
I
> can use a dataset but the potential problem there is the amount of memory
it
> could use...
> Thanks, Steve
> "Steve P" wrote:
>sql
remote sql server connection
I am trying to connect to remote sql server in vb.net application.
I am getting an error "login failed for user'abc' ".
why am I getting this error, what could be the possible reason.
any help will be appreciated.what is the login and password in your database?
whats ur connection string in vb.net?|||http://www.freevbcode.com/ShowCode.asp?ID=2226 a template to perform the task.
What is the connection string set and SQL server authentication?|||Originally posted by deidei76
what is the login and password in your database?
whats ur connection string in vb.net?
login: abc
password: abc
"data source=IP address of server;initial catalog=databasename;persist security info=False;user id=abc;workstation id=WSID;packet size=4096"|||Originally posted by Satya
http://www.freevbcode.com/ShowCode.asp?ID=2226 a template to perform the task.
What is the connection string set and SQL server authentication?
thanks satya.I am able to connect to the server now. simple and stupid mistake.I forgot to mention password in connection string.
Monday, March 12, 2012
remote query
it gives me this:
login failed for user '(null)'. Reason: Not associated
with a trusted SQL Server connection
My query statement
select * from openquery(server, 'select[table]
from database')
any help would be niceIt looks like a problem with how you have the security
mapping configured for your linked server. Make sure you
have this configured correctly with a valid login, password,
etc. You can find more information in books online under
linked servers.
-Sue
On Tue, 7 Oct 2003 13:36:32 -0700, "Jamie Elliott"
<jelliott@.alexlee.com> wrote:
>i am trying to do a remote query and when I run the query
>it gives me this:
>login failed for user '(null)'. Reason: Not associated
>with a trusted SQL Server connection
>My query statement
>select * from openquery(server, 'select[table]
>from database')
>any help would be nice|||Hi Jamie,
I agree with Sue. If you have Enterprise Manager, it is better to change
the security mapping in Security tab in linked server Properties. For
example, I would use a SQL login (allow that linked server to accept SQL
authentication) that can access linked SQL Server and select "Be made using
this security context", input the SQL login and password.
Bill Cheng
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
--
| Content-Class: urn:content-classes:message
| From: "Jamie Elliott" <jelliott@.alexlee.com>
| Sender: "Jamie Elliott" <jelliott@.alexlee.com>
| Subject: remote query
| Date: Tue, 7 Oct 2003 13:36:32 -0700
| Lines: 11
| Message-ID: <055701c38d12$b1c82ec0$a301280a@.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcONErHIaJzjVVOxSfOfBlXPy1QDEQ==| Newsgroups: microsoft.public.sqlserver.server
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.server:310079
| NNTP-Posting-Host: TK2MSFTNGXA11 10.40.1.163
| X-Tomcat-NG: microsoft.public.sqlserver.server
|
| i am trying to do a remote query and when I run the query
| it gives me this:
|
| login failed for user '(null)'. Reason: Not associated
| with a trusted SQL Server connection
|
| My query statement
| select * from openquery(server, 'select[table]
| from database')
|
| any help would be nice
|
Remote Procedure Call Failed
We are running IIS 4 under NT Server 4.0 Server, Serice pack 3; SQL
Server 6.5, Service Pack 3 and ASP 2.0, for our development databases.
We recently upgraded to IIS 4 and since then we keep getting thid
Remote Procedure error.
The exact error reads:
The server has reached the maximum recovery limit for the application
during the processing of your request. Please contact the server
administrator for assistance.
The next message that comes up is:
Server Application Error
The server has reached the maximum recovery limit for the application
during the processing of your request. Please contact the server
administrator for assistance.HTTP/1.1 500 Server Error Server:
Microsoft-IIS/4.0 Date: Mon, 29 Mar 1999 22:09:57 GMT Connection:
close Content-Type: text/html Content-Length: 93 The remote procedure
call failed.
We keep rebooting the server but this error persists. I can't find
anything that points to what can be causing this.
Has anyone else come across this problem?
Thanx in advance,
-=lata=-Lata,
1. Does this error happen only on the IIS? At the time of error, are you
able to use Query analyser and enterpirse manager and other client
connections to connect to sql server?
2. When you say you rebooted the server, is it the IIS server or the sQL
Server or the Windows server?
If other sql server applications and client connections are running fine,
then it could be an IIS issue.
Thanks,
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.
Remote Procedure Call Failed
We are running IIS 4 under NT Server 4.0 Server, Serice pack 3; SQL
Server 6.5, Service Pack 3 and ASP 2.0, for our development databases.
We recently upgraded to IIS 4 and since then we keep getting thid
Remote Procedure error.
The exact error reads:
The server has reached the maximum recovery limit for the application
during the processing of your request. Please contact the server
administrator for assistance.
The next message that comes up is:
Server Application Error
The server has reached the maximum recovery limit for the application
during the processing of your request. Please contact the server
administrator for assistance.HTTP/1.1 500 Server Error Server:
Microsoft-IIS/4.0 Date: Mon, 29 Mar 1999 22:09:57 GMT Connection:
close Content-Type: text/html Content-Length: 93 The remote procedure
call failed.
We keep rebooting the server but this error persists. I can't find
anything that points to what can be causing this.
Has anyone else come across this problem?
Thanx in advance,
-=lata=-
Lata,
1. Does this error happen only on the IIS? At the time of error, are you
able to use Query analyser and enterpirse manager and other client
connections to connect to sql server?
2. When you say you rebooted the server, is it the IIS server or the sQL
Server or the Windows server?
If other sql server applications and client connections are running fine,
then it could be an IIS issue.
Thanks,
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.
Remote ODBC connections fail to SQL 2005 database (Error: 18456, Severity: 14, State: 8.)
18456) error messages in SQL Server 2005" at
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx
2007-03-21 11:49:14.55 Logon Error: 18456, Severity: 14, State: 8.
2007-03-21 11:49:14.55 Logon Login failed for user 'USERNAMEOBSCURED'.
[CLIENT: 192.168.183.144]
According to the blog, this indicates that the password is invalid, but I
have reset it 5 times, making sure the password is the same at both ends.
This username, USERNAMEOBSCURED, is a SQL Server authentication type user,
and I have verfied that Enforce password policy, expiration, must change
password are all unchecked and the account is not set to locked out.
The ODBC client is another Windows Server 2003 SP1 computer in the same
workgroup as the SQL 2005 SP1 server. I am using the Microsoft SQL Server
ODBC Driver Version 03.86.1830 via TCP/IP.
Since I don't have that much experence running SQL server, which and
what database permissions should USERNAMEOBSCURED be given? If I want to
create a new username to test it, how should that be done for SQL Server
authentication? If these are in the books online, please point me to the
right location.
Hi,
I understand that you encountered the error:
Login failed for user 'USERNAMEOBSCURED'
When you remotely use ODBC driver to connect to your SQL 2005 instance.
If I have misunderstood, please let me know.
For troubleshooting the login errors, you may refer to:
Troubleshooting: Login failed for user 'x'
http://msdn2.microsoft.com/en-us/library/ms366351.aspx
How to: Change Server Authentication Mode
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Though the error state indicates that it is a password error, I recommend
that also check the following and let me know the results:
1. Check if you can log on your SQL Server locally with the login and
password;
2. Open SQL Server Configuration Manager to see if the TCP/IP protocol has
been enabled;
3. Open SQL Server Surface Area Configuration, click Surface Area
Configuration for Services and Connections to see if Local and remote
connections is selected under the Remote Connections.
4. If the issue persists, try creating a new login to see if this issue
persists;
5. Run "osql /S<server name> /U<login id> /P<password>" from command line
on your client computer to check if you can connect to your SQL Server;
6. Disable the firewall on your SQL Server computer and run "netstat -nba
>C:\serviceslist.log" to check which TCP port has been listened by your SQL
Server service (sqlservr.exe); then run "telnet <server name> <TCP port>"
from command on the client computer to check if you can log on the port.
7. Run "cliconfg.exe" from command line on the client computer, switch to
the Alias tab, add an alias with TCP/IP protocol for the SQL instance.
Please note that fill in the correct Tcp port and server name (the SQL
Server computer name) in the input fields. Then run the step 2 again.
If all above methods still cannot make it work, please use NetMon to
monitor the network stream by filter the TCP protocal and port.
You may refer to:
Microsoft Network Monitor 3
http://www.microsoft.com/downloads/details.aspx?familyid=AA8BE06D-4A6A-4B69-
B861-2043B665CB53&displaylang=en
How To Capture TCP and HTTP Data Frames Using Network Monitor and MSXML
HTTP Code
http://support.microsoft.com/kb/295405
How to capture network traffic with Network Monitor
http://support.microsoft.com/kb/148942
Troubleshooting by Using Network Monitor
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/intwork/
inbc_ias_ykqb.mspx?mfr=true
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Using suggestion 4 by creating a new user USERNAMEOBSCUREDTEST and
setting the User Mapping set to DATABASENAMEOBSCURED database under Default
Schema dbo is proving to be a temporary workaround. I am consulting with
the 3rd party creator of the database to try and understand why the username
is already in the database but is not mapped according to SQL 2005. I am
wondering if this is due to the fact that the database was not created fresh
in SQL 2005, it was imported from an existing SQL 7 database from another
machine. Apparently USERNAMEOBSCURED is not mapped to any database according
to the view in Microsoft SQL Server Management Studio, and when I attempt to
map the username to DATABASENAMEOBSCURED with the default Database role
membership of public I get this error:
"TITLE: Microsoft SQL Server Management Studio
Create failed for User 'USERNAMEOBSCURED'. (Microsoft.SqlServer.Smo)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00. 2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo. ExceptionTemplates.FailedOperationExceptionText&Ev tID=Create+User&LinkId=20476[/url]
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
User, group, or role 'USERNAMEOBSCURED' already exists in the current
database. (Microsoft SQL Server, Error: 15023)
For help, click:
[url]http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00 .2047&EvtSrc=MSSQLServer&EvtID=15023&LinkId=20476[ /url]
BUTTONS:
OK
--"
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:ic0m3bFbHHA.1028@.TK2MSFTNGHUB02.phx.gbl...
> Hi,
> I understand that you encountered the error:
> Login failed for user 'USERNAMEOBSCURED'
> When you remotely use ODBC driver to connect to your SQL 2005 instance.
> If I have misunderstood, please let me know.
> For troubleshooting the login errors, you may refer to:
> Troubleshooting: Login failed for user 'x'
> http://msdn2.microsoft.com/en-us/library/ms366351.aspx
> How to: Change Server Authentication Mode
> http://msdn2.microsoft.com/en-us/library/ms188670.aspx
> Though the error state indicates that it is a password error, I recommend
> that also check the following and let me know the results:
> 1. Check if you can log on your SQL Server locally with the login and
> password;
> 2. Open SQL Server Configuration Manager to see if the TCP/IP protocol has
> been enabled;
> 3. Open SQL Server Surface Area Configuration, click Surface Area
> Configuration for Services and Connections to see if Local and remote
> connections is selected under the Remote Connections.
> 4. If the issue persists, try creating a new login to see if this issue
> persists;
> 5. Run "osql /S<server name> /U<login id> /P<password>" from command line
> on your client computer to check if you can connect to your SQL Server;
> 6. Disable the firewall on your SQL Server computer and run "netstat -nba
> Server service (sqlservr.exe); then run "telnet <server name> <TCP port>"
> from command on the client computer to check if you can log on the port.
> 7. Run "cliconfg.exe" from command line on the client computer, switch to
> the Alias tab, add an alias with TCP/IP protocol for the SQL instance.
> Please note that fill in the correct Tcp port and server name (the SQL
> Server computer name) in the input fields. Then run the step 2 again.
> If all above methods still cannot make it work, please use NetMon to
> monitor the network stream by filter the TCP protocal and port.
> You may refer to:
> Microsoft Network Monitor 3
> http://www.microsoft.com/downloads/details.aspx?familyid=AA8BE06D-4A6A-4B69-
> B861-2043B665CB53&displaylang=en
> How To Capture TCP and HTTP Data Frames Using Network Monitor and MSXML
> HTTP Code
> http://support.microsoft.com/kb/295405
> How to capture network traffic with Network Monitor
> http://support.microsoft.com/kb/148942
> Troubleshooting by Using Network Monitor
> http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/intwork/
> inbc_ias_ykqb.mspx?mfr=true
> Hope this helps. If you have any other questions or concerns, please feel
> free to let me know.
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> ================================================== ===
> Get notification to my posts through email? Please refer to:
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> If you are using Outlook Express, please make sure you clear the check box
> "Tools/Options/Read: Get 300 headers at a time" to see your reply
> promptly.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ================================================== ====
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ================================================== ====
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> ================================================== ====
>
>
>
>
>
>
>
>
|||Hi,
Thanks for your response.
Since your database is migrated from SQL 7.0, this issue is indeed
possible. Please try the tool mapsids.exe according to this article to see
if this issue persists:
How to resolve permission issues when you move a database between servers
that are running SQL Server
http://support.microsoft.com/kb/240872/EN-US/
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://support.microsoft.com/kb/274188/
Hope this helps.
Best regards,
Charles Wang
Microsoft Online Partner Support
PLEASE NOTE: The partner managed newsgroups are provided
to assist with break/fix issues and simple how to questions.
We also love to hear your product feedback!
Let us know what you think by posting
- from the web interface: Partner Feedback
- from your newsreader:
microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Hi,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.
Charles Wang
Microsoft Online Community Support
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
|||Sorry for the long delay, we were able to fix the issue with the
duplicate users, I'll have to dig up my notes from two weeks ago to recall
the procedure we used. Sorry for not closing this issue sooner.
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:Y6QkJsFcHHA.2060@.TK2MSFTNGHUB02.phx.gbl...
> Hi,
> I am interested in this issue. Would you mind letting me know the result
> of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Charles Wang
> Microsoft Online Community Support
> ================================================== ====
> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ================================================== ====
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> ================================================== ====
>
|||Hi,
Thanks for your updating and response. Please do not worry about it.
Anytime your posting back is welcome.
Have a good day!
Best regards,
Charles Wang
Microsoft Online Community Support
================================================== ===
Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
================================================== ====
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
================================================== ====
This posting is provided "AS IS" with no warranties, and confers no rights.
================================================== ====
Remote ODBC connections fail to SQL 2005 database (Error: 18456, Severity: 14, State: 8.)
18456) error messages in SQL Server 2005" at
http://blogs.msdn.com/sql_protocols/archive/2006/02/21/536201.aspx
2007-03-21 11:49:14.55 Logon Error: 18456, Severity: 14, State: 8.
2007-03-21 11:49:14.55 Logon Login failed for user 'USERNAMEOBSCURED'.
[CLIENT: 192.168.183.144]
According to the blog, this indicates that the password is invalid, but I
have reset it 5 times, making sure the password is the same at both ends.
This username, USERNAMEOBSCURED, is a SQL Server authentication type user,
and I have verfied that Enforce password policy, expiration, must change
password are all unchecked and the account is not set to locked out.
The ODBC client is another Windows Server 2003 SP1 computer in the same
workgroup as the SQL 2005 SP1 server. I am using the Microsoft SQL Server
ODBC Driver Version 03.86.1830 via TCP/IP.
Since I don't have that much experence running SQL server, which and
what database permissions should USERNAMEOBSCURED be given? If I want to
create a new username to test it, how should that be done for SQL Server
authentication? If these are in the books online, please point me to the
right location.Hi,
I understand that you encountered the error:
Login failed for user 'USERNAMEOBSCURED'
When you remotely use ODBC driver to connect to your SQL 2005 instance.
If I have misunderstood, please let me know.
For troubleshooting the login errors, you may refer to:
Troubleshooting: Login failed for user 'x'
http://msdn2.microsoft.com/en-us/library/ms366351.aspx
How to: Change Server Authentication Mode
http://msdn2.microsoft.com/en-us/library/ms188670.aspx
Though the error state indicates that it is a password error, I recommend
that also check the following and let me know the results:
1. Check if you can log on your SQL Server locally with the login and
password;
2. Open SQL Server Configuration Manager to see if the TCP/IP protocol has
been enabled;
3. Open SQL Server Surface Area Configuration, click Surface Area
Configuration for Services and Connections to see if Local and remote
connections is selected under the Remote Connections.
4. If the issue persists, try creating a new login to see if this issue
persists;
5. Run "osql /S<server name> /U<login id> /P<password>" from command line
on your client computer to check if you can connect to your SQL Server;
6. Disable the firewall on your SQL Server computer and run "netstat -nba
>C:\serviceslist.log" to check which TCP port has been listened by your SQL
Server service (sqlservr.exe); then run "telnet <server name> <TCP port>"
from command on the client computer to check if you can log on the port.
7. Run "cliconfg.exe" from command line on the client computer, switch to
the Alias tab, add an alias with TCP/IP protocol for the SQL instance.
Please note that fill in the correct Tcp port and server name (the SQL
Server computer name) in the input fields. Then run the step 2 again.
If all above methods still cannot make it work, please use NetMon to
monitor the network stream by filter the TCP protocal and port.
You may refer to:
Microsoft Network Monitor 3
http://www.microsoft.com/downloads/details.aspx?familyid=AA8BE06D-4A6A-4B69-
B861-2043B665CB53&displaylang=en
How To Capture TCP and HTTP Data Frames Using Network Monitor and MSXML
HTTP Code
http://support.microsoft.com/kb/295405
How to capture network traffic with Network Monitor
http://support.microsoft.com/kb/148942
Troubleshooting by Using Network Monitor
http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/intwork/
inbc_ias_ykqb.mspx?mfr=true
Hope this helps. If you have any other questions or concerns, please feel
free to let me know.
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Using suggestion 4 by creating a new user USERNAMEOBSCUREDTEST and
setting the User Mapping set to DATABASENAMEOBSCURED database under Default
Schema dbo is proving to be a temporary workaround. I am consulting with
the 3rd party creator of the database to try and understand why the username
is already in the database but is not mapped according to SQL 2005. I am
wondering if this is due to the fact that the database was not created fresh
in SQL 2005, it was imported from an existing SQL 7 database from another
machine. Apparently USERNAMEOBSCURED is not mapped to any database according
to the view in Microsoft SQL Server Management Studio, and when I attempt to
map the username to DATABASENAMEOBSCURED with the default Database role
membership of public I get this error:
"TITLE: Microsoft SQL Server Management Studio
--
Create failed for User 'USERNAMEOBSCURED'. (Microsoft.SqlServer.Smo)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.2047.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+User&LinkId=20476
--
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch.
(Microsoft.SqlServer.ConnectionInfo)
--
User, group, or role 'USERNAMEOBSCURED' already exists in the current
database. (Microsoft SQL Server, Error: 15023)
For help, click:
http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.2047&EvtSrc=MSSQLServer&EvtID=15023&LinkId=20476
--
BUTTONS:
OK
--"
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:ic0m3bFbHHA.1028@.TK2MSFTNGHUB02.phx.gbl...
> Hi,
> I understand that you encountered the error:
> Login failed for user 'USERNAMEOBSCURED'
> When you remotely use ODBC driver to connect to your SQL 2005 instance.
> If I have misunderstood, please let me know.
> For troubleshooting the login errors, you may refer to:
> Troubleshooting: Login failed for user 'x'
> http://msdn2.microsoft.com/en-us/library/ms366351.aspx
> How to: Change Server Authentication Mode
> http://msdn2.microsoft.com/en-us/library/ms188670.aspx
> Though the error state indicates that it is a password error, I recommend
> that also check the following and let me know the results:
> 1. Check if you can log on your SQL Server locally with the login and
> password;
> 2. Open SQL Server Configuration Manager to see if the TCP/IP protocol has
> been enabled;
> 3. Open SQL Server Surface Area Configuration, click Surface Area
> Configuration for Services and Connections to see if Local and remote
> connections is selected under the Remote Connections.
> 4. If the issue persists, try creating a new login to see if this issue
> persists;
> 5. Run "osql /S<server name> /U<login id> /P<password>" from command line
> on your client computer to check if you can connect to your SQL Server;
> 6. Disable the firewall on your SQL Server computer and run "netstat -nba
>>C:\serviceslist.log" to check which TCP port has been listened by your SQL
> Server service (sqlservr.exe); then run "telnet <server name> <TCP port>"
> from command on the client computer to check if you can log on the port.
> 7. Run "cliconfg.exe" from command line on the client computer, switch to
> the Alias tab, add an alias with TCP/IP protocol for the SQL instance.
> Please note that fill in the correct Tcp port and server name (the SQL
> Server computer name) in the input fields. Then run the step 2 again.
> If all above methods still cannot make it work, please use NetMon to
> monitor the network stream by filter the TCP protocal and port.
> You may refer to:
> Microsoft Network Monitor 3
> http://www.microsoft.com/downloads/details.aspx?familyid=AA8BE06D-4A6A-4B69-
> B861-2043B665CB53&displaylang=en
> How To Capture TCP and HTTP Data Frames Using Network Monitor and MSXML
> HTTP Code
> http://support.microsoft.com/kb/295405
> How to capture network traffic with Network Monitor
> http://support.microsoft.com/kb/148942
> Troubleshooting by Using Network Monitor
> http://www.microsoft.com/technet/prodtechnol/windows2000serv/reskit/intwork/
> inbc_ias_ykqb.mspx?mfr=true
> Hope this helps. If you have any other questions or concerns, please feel
> free to let me know.
> Best regards,
> Charles Wang
> Microsoft Online Community Support
> =====================================================> Get notification to my posts through email? Please refer to:
> http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
> ications
> If you are using Outlook Express, please make sure you clear the check box
> "Tools/Options/Read: Get 300 headers at a time" to see your reply
> promptly.
>
> Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
> where an initial response from the community or a Microsoft Support
> Engineer within 1 business day is acceptable. Please note that each follow
> up response may take approximately 2 business days as the support
> professional working with you may need further investigation to reach the
> most efficient resolution. The offering is not appropriate for situations
> that require urgent, real-time or phone-based interactions or complex
> project analysis and dump analysis issues. Issues of this nature are best
> handled working with a dedicated Microsoft Support Engineer by contacting
> Microsoft Customer Support Services (CSS) at
> http://msdn.microsoft.com/subscriptions/support/default.aspx.
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> ======================================================>
>
>
>
>
>
>
>|||Hi,
Thanks for your response.
Since your database is migrated from SQL 7.0, this issue is indeed
possible. Please try the tool mapsids.exe according to this article to see
if this issue persists:
How to resolve permission issues when you move a database between servers
that are running SQL Server
http://support.microsoft.com/kb/240872/EN-US/
PRB: "Troubleshooting Orphaned Users" Topic in Books Online is Incomplete
http://support.microsoft.com/kb/274188/
Hope this helps.
Best regards,
Charles Wang
Microsoft Online Partner Support
PLEASE NOTE: The partner managed newsgroups are provided
to assist with break/fix issues and simple how to questions.
We also love to hear your product feedback!
Let us know what you think by posting
- from the web interface: Partner Feedback
- from your newsreader:
microsoft.private.directaccess.partnerfeedback.
We look forward to hearing from you!
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Hi,
I am interested in this issue. Would you mind letting me know the result of
the suggestions? If you need further assistance, feel free to let me know.
I will be more than happy to be of assistance.
Charles Wang
Microsoft Online Community Support
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================|||Sorry for the long delay, we were able to fix the issue with the
duplicate users, I'll have to dig up my notes from two weeks ago to recall
the procedure we used. Sorry for not closing this issue sooner.
"Charles Wang[MSFT]" <changliw@.online.microsoft.com> wrote in message
news:Y6QkJsFcHHA.2060@.TK2MSFTNGHUB02.phx.gbl...
> Hi,
> I am interested in this issue. Would you mind letting me know the result
> of
> the suggestions? If you need further assistance, feel free to let me know.
> I will be more than happy to be of assistance.
> Charles Wang
> Microsoft Online Community Support
> ======================================================> When responding to posts, please "Reply to Group" via
> your newsreader so that others may learn and benefit
> from this issue.
> ======================================================> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> ======================================================>|||Hi,
Thanks for your updating and response. Please do not worry about it.
Anytime your posting back is welcome.
Have a good day!
Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================Get notification to my posts through email? Please refer to:
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications
If you are using Outlook Express, please make sure you clear the check box
"Tools/Options/Read: Get 300 headers at a time" to see your reply promptly.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
======================================================When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================This posting is provided "AS IS" with no warranties, and confers no rights.
======================================================
Monday, February 20, 2012
remote connection to 2005 express: Login Failed?
I have Sql Server 2005 Express installed on my WinXP PRO machine at home (no domain). I have opened the ports on the firewall, etc.
When I try and login from the SQLCMD command line tool I get a Login Failed error. Here is the connection string that I'm trying to use:
SQLCMD -S **.***.**.*\SQLEXPRESS -U Steve -P MyPassword
The error:
Login failed for user 'Steve'.
When I use Management Studio Express on the same machine running Sql Server, it shows the User name: NEVERSTILL\Steve
'NEVERSTILL' is the name of my computer.
If I try and use that same username with a remote connection I get the same error.
I have googled for the error and msg code, but nothing fitting my situation is coming up.
Anyone have any ideas for me?
Check the error log and please post the error state that shows there before the login failed message.
Thanks
Laurentiu
Remote connection failed, even with proper configuration
I am unable to connect to a SQL instance on the server from a workstation on the same network.
SQL Express SP1 is installed on the server, and allows mixed authentication. The instance name is <SERVERNAME>\SQLEXPRESS.
Both the Database and Browser services are running.
Local and remote connections are enabled under SAC. I also used sp_configure to make the same changes.
All Protocols for SQLEXPRESS have been Enabled using the Configuration Manager.
The firewalls on both machines have been disabled.
Rebooting the server or restarting services after various changes hasn't affected the outcome.
Local connections made directly on the server are always successful using either authentication mode.
SQL Native Client Driver is installed on the workstation.
The workstation user is trusted. However, neither authentication mode is successful.
The connection string from the workstation uses the named instance above and the SQL Native Client driver.
Other services on the server are working and avaialble to the workstation, such as shared folders.
When I attempt a connection from the workstation I receive the following errors:
Connection failed:
SQLState: '08001'
SQL Server Error: -1
[Microsoft][SQL Native Client]SQL Networtk Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Connection failed:
SQLState: 'HYT00'
SQL Server Error: 0
[Microsoft][SQL Native Client]Login timeout expired
Connection failed:
SQLState: '08001'
SQL Server Error: -1
[Microsoft][SQL Native Client]An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default setting SQL Server does not allow remote connections.
I have tried all of the recommendations I can find here without any luck. What am I missing?
Hi,
can you post full connection string used to connection machines!!?
Are you able to get connected each other servers from SSMS?
Hemantgiri S. Goswami
|||Try to connect to the Server directly using the appropiate port rather than just using the instance name (to see if the SQL Browser is causing the problem) Use the format Servername,portnumber for this. If this does not work, you might have not enabled TCP/IP for connections.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de
Would you mind posting what the offending program was? I'm getting the same reaction from SQL Server 2005 Express in my LAN with an application that was running just a couple of weeks ago.
TIA
Mike Baker
Adobe Community Expert
Remote connection failed
I had made an application which is using SQL Expresss.
When I deploy that application on a server where only .Net Framework 2.0 is installed then it gives an error of remote connection.
Does that need some prerequisite for SqlExpress or the reason of error is something else.
Dear Rajkumar,
By default Sql Express does not allow remote connections.
Configuring remote connections is shown overhere.
HTH,
Suprotim Agarwal
|||The Given points are written on the article you provided.
But I don''t have any SQLExpress Server or SQLServer2005 installed on my server machine.
I have only .net framework 2005 installed.
|||
Dear rajkumar,
I agree that your application is deployed on the server where only .NET framework is installed. However my question is where is the database installed.
Well if the db is installed in your machine apply the suggestions given in the post to enable remote connections on your database.
HTH,
Suprotim Agarwal
Remote connection failed
Connection failed:
SQLState: '28000'
SQL Server Error: 18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
'myUserName'. Reason: Not associated with a trusted SQL Server connection.
Upon examination of the SQL Server Log, I see the exact same message.
The connection string being used is ...
"Driver={SQL Server}; Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433;
Network=DBMSSOCN; Database=myDatabase"
SQL Server Properties - Security tab has the following settings ...
Authentication: Windows only
Audit level: All
Allow cross-database ownership chaining: not checked
When SQLDriverConnect is called, an SQL Server Login dialog comes up
allowing me to Use Trusted Connection or provide Login ID and Password. If
Use Trusted Connection is checked, then same error as above is returned
except myUserName is replaced by "(null)". If not checked, then the login
has failed with all username/password combinations I know of on my server.
Referencing an earlier posting dated 10/31/2005 entitled "Error connecting
through the web", Sue Hoegemeier wrote, "Use Integrated Security=SSPI with
an OLE DB provider in your connection string instead of supplying a username
and password." Sue, what does this part of the connection string "look"
like? Can you give me an example? Also, how can the Reason given in the
error message be remedied?
Any help would be greatly appreciated. Thanks.
Hi Kris,
1. If you use a trusted connection and the login fails for
user null, the credentials aren't being passed to the
server. The issues with that depend on if you are connecting
across a network and how the client PC is setup in that
network, if you have any network issues which you can find
in the event logs of the PC, etc.
2. You can't use a username/password combination in your
case as the server is setup to use Windows authentication
only. You have to use windows authentication so can't pass a
user name and password as you would do if using SQL Server
login.
3. You are using an ODBC connection instead of OLE DB. For
that connection, use Trusted_connection=Yes. You can find
examples at:
http://www.carlprothman.net/Default...erForSQLServer
-Sue
On Mon, 5 Dec 2005 14:23:04 -0500, "Kris"
<kfraley@.direcway.com> wrote:
>I am getting the following error ...
>Connection failed:
>SQLState: '28000'
>SQL Server Error: 18452
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user
>'myUserName'. Reason: Not associated with a trusted SQL Server connection.
>Upon examination of the SQL Server Log, I see the exact same message.
>The connection string being used is ...
>"Driver={SQL Server}; Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433;
>Network=DBMSSOCN; Database=myDatabase"
>SQL Server Properties - Security tab has the following settings ...
>Authentication: Windows only
>Audit level: All
>Allow cross-database ownership chaining: not checked
>When SQLDriverConnect is called, an SQL Server Login dialog comes up
>allowing me to Use Trusted Connection or provide Login ID and Password. If
>Use Trusted Connection is checked, then same error as above is returned
>except myUserName is replaced by "(null)". If not checked, then the login
>has failed with all username/password combinations I know of on my server.
>Referencing an earlier posting dated 10/31/2005 entitled "Error connecting
>through the web", Sue Hoegemeier wrote, "Use Integrated Security=SSPI with
>an OLE DB provider in your connection string instead of supplying a username
>and password." Sue, what does this part of the connection string "look"
>like? Can you give me an example? Also, how can the Reason given in the
>error message be remedied?
>Any help would be greatly appreciated. Thanks.
>
|||Thank you for responding Sue.
Since posting yesterday, I have successfully been able to establish a
connection to SQL Server. Apparently, there were several problems, but the
changes necessary to get it working were relatively few and included...
1. In Enterprise Manager, create new username/password login with SQL Server
Authentication.
2. Select Authentication = SQL Server and Windows on Security tab of SQL
Server Properties dialog.
3. Connection string in SQLDriverConnect string is "Driver={SQL Server};
Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433; Network=DBMSSOCN;
Database=myDatabase; Uid=myNewUsername; Pwd=myNewPassword". Incidentally,
originally, I had actually obtained the connection string used from the
examples listed on the web site you provided below. I think I found that on
another one of your postings. Regardless, thank you for providing that URL.
Special note: I wanted to say a word about your #3 below. I tried using
Trusted_Connection=yes, but it did not work with my remote (over the
internet) connection. Though I am not 100% certain, I believe it may not
have worked because the Windows login username/password on my remote client
PC differs from the Windows login on the Windows Server 2003 machine hosting
the SQL Server.
Anyway, thank you for your postings; I have found them to be very helpful!
Hopefully, it is not too early to wish you a Merry Christmas and happy New
Year.
Kris
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:5lv9p1h2k9a0p810lfo8p16met440o60h0@.4ax.com...
> Hi Kris,
> 1. If you use a trusted connection and the login fails for
> user null, the credentials aren't being passed to the
> server. The issues with that depend on if you are connecting
> across a network and how the client PC is setup in that
> network, if you have any network issues which you can find
> in the event logs of the PC, etc.
> 2. You can't use a username/password combination in your
> case as the server is setup to use Windows authentication
> only. You have to use windows authentication so can't pass a
> user name and password as you would do if using SQL Server
> login.
> 3. You are using an ODBC connection instead of OLE DB. For
> that connection, use Trusted_connection=Yes. You can find
> examples at:
> http://www.carlprothman.net/Default...erForSQLServer
> -Sue
> On Mon, 5 Dec 2005 14:23:04 -0500, "Kris"
> <kfraley@.direcway.com> wrote:
>
|||Hi Kris,
To follow up on the last issue in question with using
windows authentication, like I said in my first reply when
you use that and you get login failed for user null, then
credentials aren't being passed. And that would depend on
the network configuration, etc.
If you are going over a remote connection or are not logging
into the domain where SQL Server is then no, Windows
authentication won't work. It passes your network login
credentials to SQL Server. If you are logged into a
different domain and don't have any type of domain trusts
set up (where different domains can "talk" to each other and
know about each others logins), SQL Server has no way to
verify those credentials. So your guess was correct and
changing the authentication mode to allow a SQL login and
using that would be an option in your case.
And thanks for the kind words!
-Sue
On Tue, 6 Dec 2005 09:29:11 -0500, "Kris"
<kfraley@.direcway.com> wrote:
>Thank you for responding Sue.
>Since posting yesterday, I have successfully been able to establish a
>connection to SQL Server. Apparently, there were several problems, but the
>changes necessary to get it working were relatively few and included...
>1. In Enterprise Manager, create new username/password login with SQL Server
>Authentication.
>2. Select Authentication = SQL Server and Windows on Security tab of SQL
>Server Properties dialog.
>3. Connection string in SQLDriverConnect string is "Driver={SQL Server};
>Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433; Network=DBMSSOCN;
>Database=myDatabase; Uid=myNewUsername; Pwd=myNewPassword". Incidentally,
>originally, I had actually obtained the connection string used from the
>examples listed on the web site you provided below. I think I found that on
>another one of your postings. Regardless, thank you for providing that URL.
>Special note: I wanted to say a word about your #3 below. I tried using
>Trusted_Connection=yes, but it did not work with my remote (over the
>internet) connection. Though I am not 100% certain, I believe it may not
>have worked because the Windows login username/password on my remote client
>PC differs from the Windows login on the Windows Server 2003 machine hosting
>the SQL Server.
>Anyway, thank you for your postings; I have found them to be very helpful!
>Hopefully, it is not too early to wish you a Merry Christmas and happy New
>Year.
>Kris
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
>news:5lv9p1h2k9a0p810lfo8p16met440o60h0@.4ax.com.. .
>
Remote connection failed
Connection failed:
SQLState: '28000'
SQL Server Error: 18452
[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
'myUserName'. Reason: Not associated with a trusted SQL Server connection.
Upon examination of the SQL Server Log, I see the exact same message.
The connection string being used is ...
"Driver={SQL Server}; Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1
433;
Network=DBMSSOCN; Database=myDatabase"
SQL Server Properties - Security tab has the following settings ...
Authentication: Windows only
Audit level: All
Allow cross-database ownership chaining: not checked
When SQLDriverConnect is called, an SQL Server Login dialog comes up
allowing me to Use Trusted Connection or provide Login ID and Password. If
Use Trusted Connection is checked, then same error as above is returned
except myUserName is replaced by "(null)". If not checked, then the login
has failed with all username/password combinations I know of on my server.
Referencing an earlier posting dated 10/31/2005 entitled "Error connecting
through the web", Sue Hoegemeier wrote, "Use Integrated Security=SSPI with
an OLE DB provider in your connection string instead of supplying a username
and password." Sue, what does this part of the connection string "look"
like? Can you give me an example? Also, how can the Reason given in the
error message be remedied?
Any help would be greatly appreciated. Thanks.Hi Kris,
1. If you use a trusted connection and the login fails for
user null, the credentials aren't being passed to the
server. The issues with that depend on if you are connecting
across a network and how the client PC is setup in that
network, if you have any network issues which you can find
in the event logs of the PC, etc.
2. You can't use a username/password combination in your
case as the server is setup to use Windows authentication
only. You have to use windows authentication so can't pass a
user name and password as you would do if using SQL Server
login.
3. You are using an ODBC connection instead of OLE DB. For
that connection, use Trusted_connection=Yes. You can find
examples at:
http://www.carlprothman.net/Default...verForSQLServer
-Sue
On Mon, 5 Dec 2005 14:23:04 -0500, "Kris"
<kfraley@.direcway.com> wrote:
>I am getting the following error ...
>Connection failed:
>SQLState: '28000'
>SQL Server Error: 18452
>[Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for
user
>'myUserName'. Reason: Not associated with a trusted SQL Server connection.
>Upon examination of the SQL Server Log, I see the exact same message.
>The connection string being used is ...
>"Driver={SQL Server}; Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,
1433;
>Network=DBMSSOCN; Database=myDatabase"
>SQL Server Properties - Security tab has the following settings ...
>Authentication: Windows only
>Audit level: All
>Allow cross-database ownership chaining: not checked
>When SQLDriverConnect is called, an SQL Server Login dialog comes up
>allowing me to Use Trusted Connection or provide Login ID and Password. If
>Use Trusted Connection is checked, then same error as above is returned
>except myUserName is replaced by "(null)". If not checked, then the login
>has failed with all username/password combinations I know of on my server.
>Referencing an earlier posting dated 10/31/2005 entitled "Error connecting
>through the web", Sue Hoegemeier wrote, "Use Integrated Security=SSPI with
>an OLE DB provider in your connection string instead of supplying a usernam
e
>and password." Sue, what does this part of the connection string "look"
>like? Can you give me an example? Also, how can the Reason given in the
>error message be remedied?
>Any help would be greatly appreciated. Thanks.
>|||Thank you for responding Sue.
Since posting yesterday, I have successfully been able to establish a
connection to SQL Server. Apparently, there were several problems, but the
changes necessary to get it working were relatively few and included...
1. In Enterprise Manager, create new username/password login with SQL Server
Authentication.
2. Select Authentication = SQL Server and Windows on Security tab of SQL
Server Properties dialog.
3. Connection string in SQLDriverConnect string is "Driver={SQL Server}
;
Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433; Network=DBMSSOCN;
Database=myDatabase; Uid=myNewUsername; Pwd=myNewPassword". Incidentally,
originally, I had actually obtained the connection string used from the
examples listed on the web site you provided below. I think I found that on
another one of your postings. Regardless, thank you for providing that URL.
Special note: I wanted to say a word about your #3 below. I tried using
Trusted_Connection=yes, but it did not work with my remote (over the
internet) connection. Though I am not 100% certain, I believe it may not
have worked because the Windows login username/password on my remote client
PC differs from the Windows login on the Windows Server 2003 machine hosting
the SQL Server.
Anyway, thank you for your postings; I have found them to be very helpful!
Hopefully, it is not too early to wish you a Merry Christmas and happy New
Year.
Kris
"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
news:5lv9p1h2k9a0p810lfo8p16met440o60h0@.
4ax.com...
> Hi Kris,
> 1. If you use a trusted connection and the login fails for
> user null, the credentials aren't being passed to the
> server. The issues with that depend on if you are connecting
> across a network and how the client PC is setup in that
> network, if you have any network issues which you can find
> in the event logs of the PC, etc.
> 2. You can't use a username/password combination in your
> case as the server is setup to use Windows authentication
> only. You have to use windows authentication so can't pass a
> user name and password as you would do if using SQL Server
> login.
> 3. You are using an ODBC connection instead of OLE DB. For
> that connection, use Trusted_connection=Yes. You can find
> examples at:
> http://www.carlprothman.net/Default...verForSQLServer
> -Sue
> On Mon, 5 Dec 2005 14:23:04 -0500, "Kris"
> <kfraley@.direcway.com> wrote:
>
>|||Hi Kris,
To follow up on the last issue in question with using
windows authentication, like I said in my first reply when
you use that and you get login failed for user null, then
credentials aren't being passed. And that would depend on
the network configuration, etc.
If you are going over a remote connection or are not logging
into the domain where SQL Server is then no, Windows
authentication won't work. It passes your network login
credentials to SQL Server. If you are logged into a
different domain and don't have any type of domain trusts
set up (where different domains can "talk" to each other and
know about each others logins), SQL Server has no way to
verify those credentials. So your guess was correct and
changing the authentication mode to allow a SQL login and
using that would be an option in your case.
And thanks for the kind words!
-Sue
On Tue, 6 Dec 2005 09:29:11 -0500, "Kris"
<kfraley@.direcway.com> wrote:
>Thank you for responding Sue.
>Since posting yesterday, I have successfully been able to establish a
>connection to SQL Server. Apparently, there were several problems, but the
>changes necessary to get it working were relatively few and included...
>1. In Enterprise Manager, create new username/password login with SQL Serve
r
>Authentication.
>2. Select Authentication = SQL Server and Windows on Security tab of SQL
>Server Properties dialog.
>3. Connection string in SQLDriverConnect string is "Driver={SQL Server
};
>Server=xxx.xxx.xxx.xxx; Address=xxx.xxx.xxx.xxx,1433; Network=DBMSSOCN;
>Database=myDatabase; Uid=myNewUsername; Pwd=myNewPassword". Incidentally,
>originally, I had actually obtained the connection string used from the
>examples listed on the web site you provided below. I think I found that o
n
>another one of your postings. Regardless, thank you for providing that URL
.
>Special note: I wanted to say a word about your #3 below. I tried using
>Trusted_Connection=yes, but it did not work with my remote (over the
>internet) connection. Though I am not 100% certain, I believe it may not
>have worked because the Windows login username/password on my remote client
>PC differs from the Windows login on the Windows Server 2003 machine hostin
g
>the SQL Server.
>Anyway, thank you for your postings; I have found them to be very helpful!
>Hopefully, it is not too early to wish you a Merry Christmas and happy New
>Year.
>Kris
>"Sue Hoegemeier" <Sue_H@.nomail.please> wrote in message
> news:5lv9p1h2k9a0p810lfo8p16met440o60h0@.
4ax.com...
>