Trusted Connections Not Working
Feb 19, 2001
Help!
I have rebuilt a very old sql server, and have managed to restore all databases etc.. and everything work okay logged in as sa, however if I try to link to it through odbc connections with the trusted connection option set I get a message like :
Login Failed User: Reason: Not defined as a valid user of a trusted SQL Server Connection.
Any suggestions?
View 1 Replies
ADVERTISEMENT
Apr 27, 2004
Hey all, not sure if this is even possible but is there a way to connection an SQL server with ASP.NET using my username and password as the trusted connection? As I am a trusted connection but the ASP.NET working process isnt. Anything can be done about this apart from addeing the ASP.NET account as a trusted connection?
Thanks
Luke
View 4 Replies
View Related
Dec 14, 2005
I was just wondering about the old error:"user not associated with a trusted connection"I know how to solve it, but I dont really understand what im doing. If my connection string is like:Trusted_Connection=true;Initial Catalog=jobitdev;Data Source=192.168.109.4;Packet Size=4096;then how validation is done on the sql server side of things? If i specify the "Trusted_connection" property what does the server do to validate the user? I'm assuming that the user it checks is the current windows user?
View 4 Replies
View Related
Oct 12, 2005
I am attemting to develop a link between a access and SQL2003 database on two different machines. The aim is to update information from a query within the access database to a table within the SQL2003 database - the stumbling block is that the SQL2003 database requires a user name and password to log into the database and append from the access database.
View 1 Replies
View Related
Dec 2, 2005
seems a lot of people are having this problem but none of the solutions i tried has worked so far. I want to develop asp.net applications at my home pc running Win Xp pro SP2. I use MSDE as the database server and manage it with sql server enterprise manager. I do all the programming in Delphi 2005 and I run IIS 5.1, all on the same PC.
Now...if I build a test windows application and try to connect to the database with a connection object or UDL file, winnt authentication works. If I then try to connect through an asp.net application, where I have the connection string coded in the .aspx file I either get a "login failed" or "not trusted sql server connection". I have tried to set up login accounts on Enterprise manager both as winnt authentication or sql server authentication but none has worked with asp.net (no problem with windows apps). Funnilly I don't have that problem at work, though the sql server at the office is on a separate pc. I know many people face this problem, can anyone help me out?
thanx in advance
View 1 Replies
View Related
Jan 3, 2001
i am attempting to bcp using the -T (trusted connection) option in sql 6.5. the login security mode is set to integrated. the bcp is however failing with msg 18452 error not associated with a trusted connection. why is this happening? i do not want to hardcode the sa password in the bcp command.
thanks
View 1 Replies
View Related
Dec 5, 2007
Hi,
How does one go about setting up a trusted connection to sqlserver 2005 so I don't have to put the username/password in the web.config file?
Are there any other adv/disadv. with doing this?
View 6 Replies
View Related
Aug 29, 2007
Is there a way to use trusted connections in ASP.NET and WinForm applications yet prevent users from accessing databases directly (outside of applications) ? I know the use of trusted connections are recommended for several reasons however I have a lot of applications that I need to prevent users from accessing databases directly outside of the applications themselves.
View 5 Replies
View Related
May 13, 2008
Hi there, I'm not exactly sure where to post this question, so I'll post it here.
I have 2 Windows XP machines, not part of a network domain. One of the XP machines is running SQL Server 2005 Express edition, lets call this DB machine. The other machine is just running my application - App machine. As part of my application, I want to be able to do a backup of the database.
The DB machine is also running the application. If I log into my application on the DB machine using SQL Server Authentication, and run the backup it works fine. (It's using the T-SQL BACKUP command). If it log into my application on the App machine, and try to do the backup, I'm getting an error saying that "The user is not associated with a trusted SQL connection". The same user is being used in both scenarios, and this user can update the database fine on the App machine, so it's not really a connection problem, it seems a permission problem. The SQL user I have created is a member of the db_backupoperator role for the required database.
Is anyone aware as to why I would be getting this error?
View 3 Replies
View Related
May 13, 2008
Hi there, I'm not exactly sure where to post this question, so I'll post it here.
I have 2 Windows XP machines, not part of a network domain. One of the XP machines is running SQL Server 2005 Express edition, lets call this DB machine. The other machine is just running my application - App machine. As part of my application, I want to be able to do a backup of the database.
The DB machine is also running the application. If I log into my application on the DB machine using SQL Server Authentication, and run the backup it works fine. (It's using the T-SQL BACKUP command). If it log into my application on the App machine, and try to do the backup, I'm getting an error saying that "The user is not associated with a trusted SQL connection". The same user is being used in both scenarios, and this user can update the database fine on the App machine, so it's not really a connection problem, it seems a permission problem. The SQL user I have created is a member of the db_backupoperator role for the required database.
Is anyone aware as to why I would be getting this error?
View 7 Replies
View Related
Feb 19, 2006
Hi - I have developed a database using Windows Authentication in Management Studio (CTP) but now need to set up logins for users externally - crucially NOT using windows authentication. I want to resrict these new logins to only run specific stored procs and completely deny all other privileges.
I've created a login 'bc_user' but when I try and connect using management studio (ctp) I get:-
Cannot connect to [server_name]SQLEXPRESS.
Login failed for user 'bc_user'. The user is not associated with a trusted SQL Server connection. (Microsoft SQL Server, Error: 18452).
(Connecting in code from VS produces a less specific message).
My user creation T-SQL looks like this:-
USE master
go
CREATE LOGIN bc_user WITH PASSWORD = 'test_pwd', DEFAULT_DATABASE = testdb, CHECK_EXPIRATION = OFF, CHECK_POLICY = OFF
go
USE testdb
go
CREATE USER bc_user FOR LOGIN bc_user
go CREATE ROLE restricted_users
go
EXEC sp_addrolemember 'restricted_users', 'bc_user'
go
USE testdb
go GRANT EXECUTE ON dbo.example_stored_proc TO restricted_users
DENY ALTER ON dbo.example_stored_proc TO restricted_users
DENY CONTROL ON dbo.example_stored_proc TO restricted_users
DENY TAKE OWNERSHIP ON dbo.example_stored_proc TO restricted_users
DENY VIEW DEFINITION ON dbo.example_stored_proc TO restricted_users
I have searched for this error code and it is documented as a 'bug' in SQL 2000, fixed in SP2. Any ideas what might be causing this or what I have missed? I there a setting in SQL Server (express) that causes this? I have both TCP/IP and Named Pipes connections available and Windows authentication works fine from both VS and Management Studio (CTP).
Thanks
David
View 7 Replies
View Related
May 17, 2005
Hi there,
Here we have got a
asp.net application that was developed when database was
sitting on SQL server 6.5. Now client has moved all of their databases
to SQL server 2000. When the database was on 6.5 the previous
development team has used oledb connections all over. As the databases
have been moved to SQL server 2000 now i am in process of changing the
database connection part. As part of the process i have a login
authorization code.
Private Function Authenticate(ByVal username As String, ByVal password As String, ByRef results As NorisSetupLib.AuthorizationResult) As Boolean
Dim conn As IDbConnection = GetConnection()
Try
Dim cmd As IDbCommand = conn.CreateCommand()
Dim sql As String = "EDSConfirmUpdate" '"EDSConfirmUpdate""PswdConfirmation"
'Dim cmd As SqlCommand = New SqlCommand("sql", conn)
cmd.CommandText = sql
cmd.CommandType = CommandType.StoredProcedure
NorisHelpers.DBHelpers.AddParam(cmd, "@logon", username)
NorisHelpers.DBHelpers.AddParam(cmd, "@password", password)
conn.Open()
'Get string for return values
Dim ReturnValue As String = cmd.ExecuteScalar.ToString
'Split string into array
Dim Values() As String = ReturnValue.Split(";~".ToCharArray)
'If the return code is CONTINUE, all is well. Otherwise, collect the
'reason why the result failed and let the user know
If Values(0) = "CONTINUE" Then
Return True
Else
results.Result = Values(0)
'Make sure there is a message being returned
If Values.Length > 1 Then
results.Message = Values(2)
End If
Return False
End If
Catch ex As Exception
Throw ex
Finally
If (Not conn Is Nothing AndAlso conn.State = ConnectionState.Open) Then
conn.Close()
End If
End Try
End Function
''' -----------------------------------------------------------------------------
''' <summary>
''' Getting the Connection from the config file
''' </summary>
''' <returns>A connection object</returns>
''' <remarks>
''' This is the same for all of the data classes.
''' Reads a specific
connection string from the web.config file for the service, creates a
connection object and returns it as an IDbConnection.
''' </remarks>
''' -----------------------------------------------------------------------------
Private Function GetConnection() As IDbConnection
'Dim conn As IDbConnection = New System.Data.OleDb.OleDbConnection
Dim conn As IDbConnection = New System.Data.SqlClient.SqlConnection
conn.ConnectionString = NorisHelpers.DBHelpers.GetConnectionString(NorisHelpers.DBHelpers.COMMON)
Return conn
End Function
in the above GetConnection() method i
have commented out the .net dataprovider for oledb and changed it to
.net dataprovider for SQLconnection. this function works fine. But in
the authenticate method above at the line
Dim ReturnValue As String = cmd.ExecuteScalar.ToString
for some reason its throwing the below error.
Run-time exception thrown : System.Data.SqlClient.SqlException - @password is not a parameter for procedure EDSConfirmUpdate.
If i comment out the
Dim conn As IDbConnection = New System.Data.SqlClient.SqlConnection
and uncomment the .net oledb provider,
Dim conn As IDbConnection = New System.Data.OleDb.OleDbConnection
then it works fine.
I also have changed the webconfig file as below.
<!--<add
key="Common" value='User ID=**secret**;pwd=**secret**;Data
Source="ESMALLDB2K";Initial Catalog=cj_common;Auto
Translate=True;Persist Security Info=False;Provider="SQLOLEDB.1";'
/>-->
<add key="Common" value='User ID=**secret**;pwd=**secret**;Data Source="ESMALLDB2K";Initial Catalog=cj_common;' />
Please help. Thanks in advance.
View 4 Replies
View Related
Mar 3, 2006
hi
I had a view in which I did something like this
isnull(fld,val) as 'alias'
when I assign a value to this in the client (vb 6.0) it works ok in sql2000 but fails in 2005.
When I change the query to fld as 'alias' then it works ok in sql 2005 .
why ?? I still have sql 2000 (8.0) compatability.
Also some queries which are pretty badly written run on sql 2000 but dont run at all in sql 2005 ???
any clues or answers ?? it is some configuration issue ?
Thanks in advance.
View 5 Replies
View Related
Jul 20, 2005
Just a quick question about connection management. My application willnever need more than 1 or 2 connections about at any given time. Also, I donot expect many users to be connected at any given time. For efficiency, Iwould like to keep connections alive throughout the lifetime of the objectsrequiring them, rather than opening a new connection, executing code andthen closing it again. What is the most efficient way of doing this?Should I perform the open/close or just one open when I create the objectand a close when I dispose of it?
View 1 Replies
View Related
Jan 7, 2004
I am writing a pgm that attaches to a SQL Server database. I have an Add stored procedure and an Update stored procedure. The two are almost identical, except for a couple parameters. However, the Add function works and the Update does not. Can anyone see why? I can't seem to find what the problem is...
This was my test:
Dim cmd As New SqlCommand("pContact_Update", cn)
'Dim cmd As New SqlCommand("pContact_Add", cn)
Try
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@UserId", SqlDbType.VarChar).Value = UserId
cmd.Parameters.Add("@FirstName", SqlDbType.VarChar).Value = TextBox1.Text
[...etc more parameters...]
cmd.Parameters.Add("@Id", SqlDbType.VarChar).Value = ContactId
cn.Open()
cmd.ExecuteNonQuery()
Label1.Text = "done"
cn.Close()
Catch ex As Exception
Label1.Text = ex.Message
End Try
When I use the Add procedure, a record is added correctly and I receive the "done" message. When I use the Update procedure, the record is not updated, but I still receive the "done" message.
I have looked at the stored procedures and the syntax is correct according to SQL Server.
Please I would appreciate any advice...
View 2 Replies
View Related
Jul 4, 2007
I have a Web application in asp.net 1.1Iam using windows authentication. The application is on IIS on MachineA. When i try to access this from MachineB as http://MachineA/test/test.aspx, it gives me the error "login failed for user 'null' : not associated with a trusted sql connection"Both MachineA and MachineB are on the same domain & iam not using any sql authentication. Could someone suggest me where i might have gone wrong. Web.config has authentication as 'windows', allow users = "*" and Identity impersonation = trueOn IIS, the vitual directory of 'test' application has Directory secuirty set to 'Integrated Security'Please let me know if someone had dealt with similar scenario. Thanks.
View 2 Replies
View Related
Nov 1, 2004
Hello,
I keep getting this error when I try to connect to my SQL Server:
"Login failed for user ''. Reason: Not associated with a trusted SQL Server connection."
I've tried to use both methods of logging into the DB (integrated security and using a SQL username and password).
Anyone have any idea on how to fix this?
Dale
View 2 Replies
View Related
Mar 8, 2005
i had try to use the following comand to login msde server
osql -U sa -P ****
and it reture the following:
Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server
connection.
how can i fixed this problem,and i really want to use command line to maniuplate msde server
View 3 Replies
View Related
Jul 3, 2001
Hello,
I have just installed MSSQL 2000 on Windows 2000. what I am finding is that I cannot open an isql (or query analyzer) session using the sql login (i am successful when i use NT authentication). The error message I get is as follows
Msg 18452, Level 14, State 1:
Login failed for user 'xxx'. Reason: Not associated with a trusted SQL Server
connection.
DB-Library: Login incorrect.
MSDN talks about setting the registry entries differently, but that seems to be only for SQL 7.
anybody have any hints about this.
View 1 Replies
View Related
Feb 1, 2001
I'm attempting to set up a dts transfer SQL 7 box to SQL 7 box. These two servers are on two separate NT domains with no trust relationship, and I will be sending the info across a VPN.
Anyone out there have a similar situation? Offer any recommendations, pitfalls, ports used, ways to do this??? I'd appreciate any ANY ideas on how to make this work. Thanks in advance.
-Tricia
View 2 Replies
View Related
May 12, 2000
Can anyone please tell me how to create a trusted connection?. I am from Unix world and NT is still kind of new to
me. Let say my SQL server is located in this machine residing in domain X and I want a NT user, ABC, who is in
domain Y to have acess to my server. What do I need to do?. Many thanks.
View 1 Replies
View Related
Mar 21, 2000
Is there any way to connect to SQL Server from a non trusted domain. Passthrough authentication works for other NT Server resources (like exchange folder, printers, shared folders), but SQL Server 7.0 does not seem to accept this passthrough authentication (where the username and password are the same in both domains). There is no internet access required.
View 1 Replies
View Related
Apr 19, 2000
Friends,
Does anyone know how to create trusted connections?. What I want to do is to have
connection to a sql server that's in a different domain as I am (a NT workstation).
I tried to create a login id on the server with my nt id but got an error:
"15401: NT group or user not found"
I msut be missing some steps.
Thanks in advance.
View 2 Replies
View Related
Dec 11, 2001
Can anyone please advise me on how to set a sql7.0 and sql2000 server having trusted connection. Appreciate your help"""
View 1 Replies
View Related
May 31, 1999
Big S**t little town.
I operate the above environment and have been advised due to application issues to upgrade my ODBC to 3.6 from 2.x
I upgraded one of my clients and am unable to use the already successfully configured and operational Integrated Security, It will only operate with Standard security.
However the other clients with ODBC 2.x are still able to use Integrated Security.
The configuration of both ODBC's in so far as is possible (different screens and entries) is identical. I confirm the after the 3.6 ODBC is installed the end summary screen confirms a Trusted configuration. However the test connection utility fails with the well and guaranteed to give a hernia "not associated with a trusted SQL connection".
With anticipation and thanks.
Peter Dear
PS Why when I do a spell check on ODBC's, does it return "Oddballs"?
View 1 Replies
View Related
May 5, 2004
What does it mean when a users is connected but it is a "non-trusted connection". This is showing up in the log file after my users connect. How does this effect the system/user? We have been experiencing speed issues and I was wondering if this might be a possible source of the problem.
Thanks in advance.
View 1 Replies
View Related
Aug 16, 2005
If I install SQL Server using a certain Windows Login, does that login assume some sort of "sa" alias?
(I'm trying to explain the behaviour that when I login in to a server using the same username that I used when i installed the SQL Server instance, using trusted authentication, then use a database within which I haven't created any users, I seem to get full permissions, as if I had gone in as "sa")
View 1 Replies
View Related
Mar 8, 2007
Can someone please help me set up a user for sql server.
Background - ZERO sql server experience - only used MS access a bit
I have a SQL database that was created automatically for me by ASP.NET membership - for use with the login function on web sites.
The login runs fine on my pc running sql server express
When I put it on my host (who is using SQL server 2000) it does not work & I have been told that I need to change the connection string to include Server (got that) userid and password.
And there is the problem - how do I add a user with a password to a sql server database on my pc which is then ftp'd out to my internet host so I can use that user ID and password in my connection string?
Now as I say I know nothing about sql - Please baby me if you can help ....
View 7 Replies
View Related
Jul 20, 2005
Hi-Is it possible to do a trusted connection for a web server not onthe same physical machine. By this I mean can I make a remoteconnection from a web server to a sql server using a trusted connection.If so, how?Thanks,Dave
View 2 Replies
View Related
Dec 29, 2005
I am trying to get my Clasic ASP web App to see my SQL Server. I have moved to a new PC that is now XP vs. Win2k. I also now have SQL2005 VS. SQL 2K. I am getting the following error:
Login failed for user '1200MAINIUSR_1200MAIN'. The user is not associated with a trusted SQL Server connection
I have set up an account in SQL but it doesn't seem to be working correctly. Any help would be appriciated.
Thanks, Doug
View 8 Replies
View Related
May 18, 2006
I'm trying to get a utility to run, and it's insisting on a user or trusted connection. I'm using SQL Server 2000 running locally. I've tried every login name, default, user I can think of but it rejects all of them.
What should I use for "trusted connection"?
View 8 Replies
View Related
Sep 20, 2007
I can not connect to my Local SQL Server 2005 in C# code,
it throws the error,
The user is not associated with a trusted SQL Server connection.
i tried to change the mode to Mixed Mode, but i don't see it, I see only Windows and SQL Server Auth mode,
i tried to change to SQL Server Mode, but none of user log will work, it says, this login is not in trusted connection,
so i would make any login associated with trusted account.
Thanks,
View 9 Replies
View Related
Dec 15, 2007
Hello,
I have an application we use here at work that I wanted to bring home to work from my house. At work I can get the application to connect to the SQL Server without problems. At home I get:
Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
I am connected to the office using a VPN connection. I have permissions to access the database (I am the server admin). It only happens when I connect thru VPN. I have tried it on 2 other systems here in the house to insure its not just my computer.
At the moment the application will only work with a trusted connection or Windows Authentication. It will not work with SQL authentication.
Any ideas?
Thanks!
View 4 Replies
View Related