[R] RODBC: how to set the data-source?

Oliver Bandel oliver at first.in-berlin.de
Sat Aug 29 20:27:34 CEST 2009


Dumblauskas, Jerry <jerry.dumblauskas <at> credit-suisse.com> writes:

> 
> OK
> 
> Is your PostGres server on the same Linux box you are running R on?
> Sample values
> Server          = 169.49.30.69 (localhost host means you are on the same
> box)
> Port            = 2700 (make sure your port is correct)
> 
> Also, I am not seeing your id and password....
> 
> I use the signature
> CONNREAD <- odbcConnect(READDBID, uid = READDBUSER, pwd = READDBPWD,
> believeNRows=FALSE)
> 
> So for you this would be
> channel <- odbcConnect("rtestdb", uid="rtest", pwd="???",
> believeNRows=FALSE)

As I do all stuff locally I have not configures for necessity of login
username/passwd.
So i assume I can omit it. With psql I don't need one.
"???" means my password I assume...

Well, I have configured it, so I maybe need it?
With psql not, but I have set it. I think it will not be checked from the db.

Why did you make uid="rtest"?
rtest is the name of the database.
I use "oliver" as db-login-name.



> 
> The alloc error means you are close...
> 
> Make sure you can connect to your DB outside of R as well....

With psql I can login.
And I need no passwd.
Maybe it's different for the R-connection, instead of starting psql from the
shell? But I don't think so.

Ciao,
   Oliver




More information about the R-help mailing list