| Author |
Trusted SQL-server connection..?
|
|
| Kent Johnson 2006-02-08, 8:23 pm |
| Hi all,
I have an MS-Access application that connects to a database via a DNS-Less
script.
I have installed SQL-server on my local PC running Win2003Server which has
the same setup as my production server.
This works fine and I suppose this is because the server is "trusted".
But when I do the same on the production server I get the message:
"Login failed for user (null). Reason: not associated with a trusted SQL
server connection (OK)".
.... and after that I'm promted to log in with the checkbox "Trusted
connection" checked.
If I uncheck "Trusted connection" and login with my username and password
then I can use the application.
My question is: How can I get SQL-server to trust the windows login?
I have also seen that when I try to add a new user (Security) to SQL-server
from the Active Directory I can find my own AD/Username but I can't add
myself as a new user to SQL-server.
/Kent J.
| |
| John Bell 2006-02-09, 7:23 am |
| Hi
If you are unchecking the trusted connection, this sounds like you are using
a SQL login. SQL Authentication may be enabled on your local installation and
not on the remote server.
Also check that the machines are on the same domain and that you have been
granted a login to the remote SQL server.
John
"Kent Johnson" wrote:
> Hi all,
>
> I have an MS-Access application that connects to a database via a DNS-Less
> script.
> I have installed SQL-server on my local PC running Win2003Server which has
> the same setup as my production server.
> This works fine and I suppose this is because the server is "trusted".
>
> But when I do the same on the production server I get the message:
> "Login failed for user (null). Reason: not associated with a trusted SQL
> server connection (OK)".
>
> .... and after that I'm promted to log in with the checkbox "Trusted
> connection" checked.
> If I uncheck "Trusted connection" and login with my username and password
> then I can use the application.
>
> My question is: How can I get SQL-server to trust the windows login?
>
> I have also seen that when I try to add a new user (Security) to SQL-server
> from the Active Directory I can find my own AD/Username but I can't add
> myself as a new user to SQL-server.
>
> /Kent J.
>
>
>
>
>
>
>
| |
| Kent Johnson 2006-02-09, 1:23 pm |
| OK!
How can I set up a trusted SQL-server connection?
I have all rights on the server as a system admin.
/Kent J.
"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
news:57A9AD98-F450-49C5-B76F- 148B9D955513@microso
ft.com...
> Hi
>
> If you are unchecking the trusted connection, this sounds like you are
using
> a SQL login. SQL Authentication may be enabled on your local installation
and[color=darkred]
> not on the remote server.
>
> Also check that the machines are on the same domain and that you have been
> granted a login to the remote SQL server.
>
> John
>
> "Kent Johnson" wrote:
>
DNS-Less[color=darkred]
has[color=darkred]
password[color=darkr
ed]
SQL- server[color=darkred
]
| |
| John Bell 2006-02-09, 1:23 pm |
| Hi Kent
You can't, what you should check is that the server is on the same domain or
the domains that they are on have a trust relationship between them. The
windows account or a group to which the account belongs should be granted
rights to login to the SQL Server. To check this in Enterprise manager look
at logins on the security branch of Enterprise manager's tree view. You may
also want to check this by starting up Query Analyser and using the Windows
Authentication option when the remote server is specified.
If you have to use SQL logins then make sure that you have SQL Server
authentication as well as Windows Authentication, if you are in Enterprise
Manager, right click on the server in the tree view and choose properties,
then select the security tab and you will see what it is set to.
John
"Kent Johnson" wrote:
> OK!
> How can I set up a trusted SQL-server connection?
> I have all rights on the server as a system admin.
>
> /Kent J.
>
>
> "John Bell" < jbellnewsposts@hotma
il.com> wrote in message
> news:57A9AD98-F450-49C5-B76F- 148B9D955513@microso
ft.com...
> using
> and
> DNS-Less
> has
> password
> SQL-server
>
>
>
| |
| Kent Johnson 2006-02-09, 8:23 pm |
| Thanks for your reply!
Trusted SQL-connection seems out of reach.
But what about the file DSN-file configuration?
Below is from DSN help:
"...or if Connect to SQL Server to obtain default settings for the
additional configuration options is not selected."
The checkbox for the additional configuration is disabled so that I can't
uncheck it.
How and where can I change the 'default settings for the additional
configuration options' so that I can avoid the errormessage: 'Login failed
for user (null). Reason: not associated with a trusted SQL' and the user can
login right away.
/Kent J.
"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
news:9CEE990F-723D-4E36-A890- 547488072ED8@microso
ft.com...
> Hi Kent
>
> You can't, what you should check is that the server is on the same domain
or
> the domains that they are on have a trust relationship between them. The
> windows account or a group to which the account belongs should be granted
> rights to login to the SQL Server. To check this in Enterprise manager
look
> at logins on the security branch of Enterprise manager's tree view. You
may
> also want to check this by starting up Query Analyser and using the
Windows[color=darkre
d]
> Authentication option when the remote server is specified.
>
> If you have to use SQL logins then make sure that you have SQL Server
> authentication as well as Windows Authentication, if you are in Enterprise
> Manager, right click on the server in the tree view and choose properties,
> then select the security tab and you will see what it is set to.
>
> John
>
> "Kent Johnson" wrote:
>
installation[color=d
arkred]
been[color=darkred]
which[color=darkred]
"trusted".[color=darkred]
SQL[color=darkred]
add[color=darkred]
| |
| John Bell 2006-02-10, 3:23 am |
| Hi
I seems that you don't have permissions to change the DSN. You may want to
look at using a DNS-less connection see http://www.connectionstrings.com/ or
http://www.carlprothman.net/Default.aspx?tabid=81
John
"Kent Johnson" wrote:
> Thanks for your reply!
> Trusted SQL-connection seems out of reach.
>
> But what about the file DSN-file configuration?
> Below is from DSN help:
> "...or if Connect to SQL Server to obtain default settings for the
> additional configuration options is not selected."
> The checkbox for the additional configuration is disabled so that I can't
> uncheck it.
>
> How and where can I change the 'default settings for the additional
> configuration options' so that I can avoid the errormessage: 'Login failed
> for user (null). Reason: not associated with a trusted SQL' and the user can
> login right away.
>
> /Kent J.
>
> "John Bell" < jbellnewsposts@hotma
il.com> wrote in message
> news:9CEE990F-723D-4E36-A890- 547488072ED8@microso
ft.com...
> or
> look
> may
> Windows
> installation
> been
> which
> "trusted".
> SQL
> add
>
>
>
| |
| Kent Johnson 2006-02-10, 8:23 pm |
| OK!
Like this..?
Dim oConn As Object
Set oConn = server.CreateObject("ADODB.Connection")
oConn.Provider = "sqloledb"
oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Data Source=MyServer;" & _
"Initial Catalog=MyDb"
Set rs = server.CreateObject("ADODB.Recordset")
"John Bell" < jbellnewsposts@hotma
il.com> wrote in message
news:57257C35-86C0-4B93-9166- 4F3F7A3EDD03@microso
ft.com...
> Hi
>
> I seems that you don't have permissions to change the DSN. You may want to
> look at using a DNS-less connection see http://www.connectionstrings.com/
or[color=darkred]
> http://www.carlprothman.net/Default.aspx?tabid=81
>
> John
>
> "Kent Johnson" wrote:
>
can't[color=darkred]
failed[color=darkred
]
can[color=darkred]
domain[color=darkred
]
The[color=darkred]
granted[color=darkre
d]
You[color=darkred]
Enterprise[color=dar
kred]
properties,[color=da
rkred]
are[color=darkred]
have[color=darkred]
a[color=darkred]
message:[color=darkr
ed]
trusted[color=darkre
d]
" Trusted[color=darkre
d]
login?[color=darkred]
can't[color=darkred]
| |
| John Bell 2006-02-10, 8:23 pm |
| Hi Kent
You will get a password box to fill in with your example:
Using specific SQL Server login or Trusted (windows) connections check out:
http://www.carlprothman.net/Default...
erForSQLServer
John
"Kent Johnson" wrote:
> OK!
> Like this..?
>
> Dim oConn As Object
> Set oConn = server.CreateObject("ADODB.Connection")
>
> oConn.Provider = "sqloledb"
> oConn.Properties("Prompt") = adPromptAlways
> oConn.Open "Data Source=MyServer;" & _
> "Initial Catalog=MyDb"
> Set rs = server.CreateObject("ADODB.Recordset")
>
>
> "John Bell" < jbellnewsposts@hotma
il.com> wrote in message
> news:57257C35-86C0-4B93-9166- 4F3F7A3EDD03@microso
ft.com...
> or
> can't
> failed
> can
> domain
> The
> granted
> You
> Enterprise
> properties,
> are
> have
> a
> message:
> trusted
> "Trusted
> login?
> can't
>
>
>
|
|
|
|