grass-odbc (1) - Linux Manuals
Communication between GRASS and ODBC database for attribute management:| GRASS module | | ODBC Interface | | RDBMS
| GRASS | DBMI driver | unixODBC | ODBC driver | PostgreSQL
| Oracle
| ...
Supported SQL commands
All SQL commands supported by ODBC.Operators available in conditions
All SQL operators supported by ODBC.EXAMPLE
In this example we copy the dbf file of a SHAPE map into ODBC, then connect GRASS to the ODBC DBMS. Usually the table will be already present in the DBMS.-
-
Configure ODBC driver for selected database (manually or with 'ODBCConfig').
ODBC drivers are defined in /etc/odbcinst.ini. Here is example:
[PostgreSQL]
Description = ODBC for PostgreSQL
Driver = /usr/lib/libodbcpsql.so
Setup = /usr/lib/libodbcpsqlS.so
FileUsage = 1
Create DSN (data source name). The DSN is used as database name in db.* modules. Then DSN must be defined in $HOME/.odbc.ini (for this user only) or in /etc/odbc.ini for (for all users) [watch out for the database name which appears twice and also for the PostgreSQL protocol version]. Omit blanks at the beginning of lines:
[grass6test]
Description = PostgreSQL
Driver = PostgreSQL
Trace = No
TraceFile =
Database = grass6test
Servername = localhost
UserName = neteler
Password =
Port = 5432
Protocol = 8.0
ReadOnly = No
RowVersioning =
-
Configure ODBC driver for selected database (manually or with 'ODBCConfig').
ODBC drivers are defined in /etc/odbcinst.ini. Here is example: