pssguy
pssguy

Reputation: 3515

MSSQL login authentication problems with ODBC connection and R stats package

I am trying to connect an ODBC source to the R statistical package but having log in problems.

I have set up the ODBC name eplR with an SQL server driver linking to the (local) server using windows NT authentication with the network login ID default. In the set up the data-source test is successful.

When I try and create the connection in R

library(RODBC)
channel <- odbcConnect("eplR")

I get a failed connection

Login failed  for user pssguy-PC/pssguy  - my local computer name

When I connect to the (local) SQL server 2005 via management studio with Windows authentication I get a similar error unless I open management studio with the "run as administrator" option.

In management studio, if I look at the properties of the (local) server, the authentication is set to Windows authentication mode.
The permission to connect SQL grantor is sa and the Grant box is checked. There is also a connect sql permission for pssguy-PC\pssguy with an unchecked box. I check it but on restarting mssql server it has reverted to unchecked.

I had what I thought was an identical setup on another standalone machine and I have no problems connecting in R.

Any help much appreciated

Upvotes: 0

Views: 1167

Answers (1)

Moriarty Snarly
Moriarty Snarly

Reputation: 676

Maybe with odbcConnect() you could try passing the uid and pwd arguments too?

i.e.

odbcConnect("eplR", "**USERNAME**", "**PASSWORd**")

Upvotes: 0

Related Questions