Tuesday, March 27, 2012
A Different Login failed for user sa problem
I know there are already topics on the "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection" problem but I think this one might be different.
I am working with 2 servers, both running Windows Server 2003 with 1 running SQL Server 2000 and the other acting as a Web Server, and a PC running Windows XP Pro as a development machine - all of which are on the same domain.
I am developing a couple of ASP.NET web applications, and this is where the problem occurs. If I try to connect to the SQL database with the web application running on the development PC I get the "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection" error message.
This is where it gets interesting. If I take a copy of the code that is running on the development PC and run it on the Web Server, it is able to connect to the SQL database without any problems.
The Authentication mode is set to SQL Server and Windows. I have tried several different things with our Techs and we get the same problem.
Any ideas or suggestions would be greatly appreciated as we are totally stumped.
Thanks,
AlHowdy
Never, ever, ever, ever has NT authentication on SQL been bullet proof...then mix that with multiple versions of VB & SQL & W2K & W2K3 and....aw man...game over.....
Worth trying using plain SQL authentication ( if thats acceptible in your environment ) and see how that goes - at least it will get your app working initially. Then work on the NT authentication bit.
You may wind up having to wait for the next SP for everything if its a bug.
Cheers,
SG.|||All I am using at the moment is SQL authentication and I have absolutely no interest in using NT or Windows Authentication.
Thanks anyway,
Al|||Howdy,
Sounds like connection thinks it is using a trusted connection...can you force it to be sure its using straight SQL authentication? I have seen similar errors with sql configured apps trying to use ODBC connections configured fro NT authentication.
HTH
Cheers,
SG|||Go to the enterprise manager, right click on the server, in the properties, select security tab and select the first option(SQL Server and Windows NT) in the Authentication.
Now try connecting from your application.
Sunday, March 25, 2012
A connection remains open after calling Disconnect
Hi,
I would like to be able to connect to a SQL Server using SMO and then reconnect using a different login username and password.
In the following sample code I call svr.ConnectionContext.Disconnect. After the Disconnect call an attempt to change the timeout or any Login properties gives error:
Connection properties cannot be changed after connection has been made
Regards,
Joginder Nahil
www.starprint2000.com
Dim objServer As Server
objServer = New Server()
With objServer.ConnectionContext
.NonPooledConnection = True
.ConnectTimeout = 30
.LoginSecure = True
.Connect()
MsgBox("Connected. Database : " & objServer.Databases(0).Name)
.Disconnect()
' The following line gives error: Connection properties cannot be changed after connection has been made
.ConnectTimeout = 60
.LoginSecure = False
.Login="me"
.Password="pppp"
.Connect()
End With
Hi,
I have found a solution. You have to set the server object to nothing before the ConnectionContext is released and can be re-used as shown below:
Regards,
Joginder Nahil
www.starprint2000.com
Dim objServer As Server
objServer = New Server()
With objServer.ConnectionContext
.NonPooledConnection = True
.ConnectTimeout = 30
.LoginSecure = True
.Connect()
MsgBox("Connected. Database : " & objServer.Databases(0).Name)
.Disconnect()
End With
' Release the Server object only then the Connection is released
objServer= Nothing
objServer = New Server
With objServer.ConnectionContext
.ConnectTimeout = 60
.LoginSecure = False
.Login="me"
.Password="pppp"
.Connect()
End With
Thursday, March 22, 2012
A connection could not be established...Cannot open user default
quote:
> Seems like the database is "lost", as you terminated the restore, and the
> logins that your EM registration login is using has that database as the
> default database. I suggest you login using ISQL.EXE and change default
> database using sp_defaultdb.
>
Thanks for the information. That seems to have fixed the lost db server
issue in the drop down. Still can't get the damn app server to
connect to the db server though. Will keep searching.
quote:
> Thanks for the information. That seems to have fixed the lost db server
> issue in the drop down. Still can't get the damn app server to connect
> to the db server though. Will keep searching.
Everyone may ignore my last post.
A connection could not be established LOGIN FAILURE
LOGIN FAILURE
I have just installed sql server 6.5 on windows nt server 4.0, the sql server services are running with no problems.
Now When I open the sql enterprise manager and I try do something like right click in my default data base I got this error.
It's my 2nd time installing this...
Please, any help is welcome..
thanks for your time...
Quote:
Originally Posted by SQLnewbie
A connection could not be established TO MYSERVER [SQL SERVER]
LOGIN FAILURE
I have just installed sql server 6.5 on windows nt server 4.0, the sql server services are running with no problems.
Now When I open the sql enterprise manager and I try do something like right click in my default data base I got this error.
It's my 2nd time installing this...
Please, any help is welcome..
thanks for your time...
You have to remove the SQL from your computer then reinstall it again
Dont forget to name your server
Tuesday, March 20, 2012
a bug in Enterprise Manager ?
am prompted to confirm the password even if the password
is not changed. Worse thing is that most of the time I
don't know the login password , so I am not able use EM to
assign permissions. I have access to other computers with
SQL EM working, and if I need to I can still use QA. I use
my pc for most of the sql admin work and would like if I
can resolve this.
What should I do ?
Thanks in advanceSee if this helps:
FIX: You Are Prompted for Password Confirmation After You Change a Standard
SQL Server Login
http://support.microsoft.com/default.aspx?scid=kb;en-us;826161&Product=sql2k
Rand
This posting is provided "as is" with no warranties and confers no rights.
a bug in Enterprise Manager ?
am prompted to confirm the password even if the password
is not changed. Worse thing is that most of the time I
don't know the login password , so I am not able use EM to
assign permissions. I have access to other computers with
SQL EM working, and if I need to I can still use QA. I use
my pc for most of the sql admin work and would like if I
can resolve this.
What should I do ?
Thanks in advance
See if this helps:
FIX: You Are Prompted for Password Confirmation After You Change a Standard
SQL Server Login
http://support.microsoft.com/default...&Product=sql2k
Rand
This posting is provided "as is" with no warranties and confers no rights.
a bug in Enterprise Manager ?
am prompted to confirm the password even if the password
is not changed. Worse thing is that most of the time I
don't know the login password , so I am not able use EM to
assign permissions. I have access to other computers with
SQL EM working, and if I need to I can still use QA. I use
my pc for most of the sql admin work and would like if I
can resolve this.
What should I do ?
Thanks in advanceSee if this helps:
FIX: You Are Prompted for Password Confirmation After You Change a Standard
SQL Server Login
http://support.microsoft.com/defaul...1&Product=sql2k
Rand
This posting is provided "as is" with no warranties and confers no rights.