Re: Remote connection failed



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@xxxxxxxxxxxxx> wrote in message
news:5lv9p1h2k9a0p810lfo8p16met440o60h0@xxxxxxxxxx
> 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.aspx?tabid=90#ODBCDriverForSQLServer
>
> -Sue
>
> On Mon, 5 Dec 2005 14:23:04 -0500, "Kris"
> <kfraley@xxxxxxxxxxxx> 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.
>>
>


.



Relevant Pages

  • Getting to the bottom of MSDE network connection problems ...
    ... but other than that it is MSDE 2000 with sp3a already applied. ... I've finally figured out the connection problems associated with this, ... and it seems the problems are due to Windows XP and not MSDE. ... the enterprise/standard versions of SQL server won't install ...
    (microsoft.public.sqlserver.msde)
  • Re: Remote connection failed
    ... 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. ...
    (microsoft.public.sqlserver.connect)
  • Re: Bizzare SQL Network Error
    ... The bizzare thing is that, the same connection string, the same code to ... In a windows APP it works fine, in a Web APP I get ... >>I am trying to connect to a default instance of SQL Server 2000 Enterprise ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: login 101..
    ... On Windows 2003, SQL Server 2005 can enforce the Windows password complexity ... Windows authentication - SQL Server uses a special protocol to ask ... user is in the list of allowed logins, ...
    (microsoft.public.sqlserver.security)
  • RE: How to create a trusted connection
    ... You need to grant access for the Windows login by referring to the books ... is set to use Windows authentication to be able to do trusted connection. ... There are two modes of authentication in SQL Server: ...
    (microsoft.public.sqlserver.security)

Loading