开发者

MSSQL login authentication problems with ODBC connection and R stats package

开发者 https://www.devze.com 2023-03-10 09:55 出处:网络
I am trying to connect an ODBC source to the R statistical package but having log in problems. I have set up开发者_如何学Python the ODBC name eplR with an SQL server driver linking to the (local) ser

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

I have set up开发者_如何学Python 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


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

i.e.

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

精彩评论

暂无评论...
验证码 换一张
取 消