gmanpert
asked on
ODBC DSN setup
I have a postgres database setup on a remote server. The currently working DSN on my windows laptop was set up by someone else. When I run PERL programs on my laptop which query the database (and work fine) the name of the DSN is 'tdsn'. Here is what threw me and what I need help with. On my windows laptop, under
>control panel >administrative tools >Data Sources(ODBC)
There are three tabs - System DSN, User DSN, File DSN.
Originally, there was both a System DSN and a File DSN named 'tdsn', which I thought controlled the access to my Postgresql database. However, I have since deleted both of those entries. Presently, I have no entries under any of the DSN tabs with the name
'tdsn'. I rebooted. However, my PERL programs still work fine to query the Postgres database on the remote computer.
I knew nothing about regedit or the registry, so I did some reading and can now run regedit. In it I checked:
HKEY_LOCAL_MACHINE >software > ODBC ...and I see
> ODBC.INI ...which has all of my local System DSN's I use to connect to other Access database files. Each of which looks like this:
DSN_name > Engines > Jet
I did a search of my entire harddrive for pg_hba.conf and only found one version under c:\cygwin\usr\share\postgr esql
which I suspect has nothing to do with anything.
I could not find a pg_hba.conf file on the main server which is running the postgres database.
I have an icon on my laptop which connects to an Access database which is linked to the Postgres tables. When I click on the properties of that file is shows:
target: \\server\directory1\subdir ectory\acc essdb.mdb
Anyway, I would like to know how to set up an ODBC DSN to access the postgres database on the remote server. Any insights would be appreciated.
-g
>control panel >administrative tools >Data Sources(ODBC)
There are three tabs - System DSN, User DSN, File DSN.
Originally, there was both a System DSN and a File DSN named 'tdsn', which I thought controlled the access to my Postgresql database. However, I have since deleted both of those entries. Presently, I have no entries under any of the DSN tabs with the name
'tdsn'. I rebooted. However, my PERL programs still work fine to query the Postgres database on the remote computer.
I knew nothing about regedit or the registry, so I did some reading and can now run regedit. In it I checked:
HKEY_LOCAL_MACHINE >software > ODBC ...and I see
> ODBC.INI ...which has all of my local System DSN's I use to connect to other Access database files. Each of which looks like this:
DSN_name > Engines > Jet
I did a search of my entire harddrive for pg_hba.conf and only found one version under c:\cygwin\usr\share\postgr
which I suspect has nothing to do with anything.
I could not find a pg_hba.conf file on the main server which is running the postgres database.
I have an icon on my laptop which connects to an Access database which is linked to the Postgres tables. When I click on the properties of that file is shows:
target: \\server\directory1\subdir
Anyway, I would like to know how to set up an ODBC DSN to access the postgres database on the remote server. Any insights would be appreciated.
-g
ASKER
No, I'm not sure... so I'll have to look into how PERl could be running in DSN-less mode.
Still not finding the pg_hba.conf file althought there are about 7 pg_hba.conf.example files.
How would you go about setting up a DSN for PG on a remote computer?
-g
Still not finding the pg_hba.conf file althought there are about 7 pg_hba.conf.example files.
How would you go about setting up a DSN for PG on a remote computer?
-g
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You don't need to create a DSN on the remote computer. The DSN is used ONCE when you link the tables, afterwards, you can just copy the mdb file and it should stay connected. Make sure that pg_hba.conf allows connecting from all computers you are going to be using mdb on and that authentication is set to "password", not "indent".
ASKER
Dude - that totally rocks ! At least that solves one problem.
Mucho thanks.
Mucho thanks.
De nada ;) What's the other one?
2. pg_hba.conf file should be on your server where Postgres is running in /var/lib/pgsql/data