db.connect(1)

NAME
db.connect - Connect to the database through DBMI.

SYNOPSIS
db.connect
db.connect help
db.connect [-p] [driver=string] [database=string] [schema=string] [group=string]

  Flags:

-p  print current connection parameters and exit

  Parameters:

driver=string
    driver name: Options: dbf,pg,ogr

database=string
    Database name:

schema=string
    Database schema. Don't use this option if schemas are not supported by driver/database server.

group=string
    Default group of database users to which select privilege is granted.

DESCRIPTION
db.connect allows the user to set parameters for connection to database. These parameters are then taken by modules as default values and user do not need enter parameters each time. Values are stored in user file.

OPTIONS
Typing db.connect -p displays current connection parameters.

EXAMPLE
DBF:
db.connect driver=dbf database='$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/'
db.connect -p

ODBC (may require the use of db.login):

db.connect driver=odbc database=gtest
db.login user=myname pass=secret db.connect -p

PostgreSQL (may require the use of db.login):
db.connect driver=pg database="host=myserver.itc.it,dbname=mydb"
db.login user=myname pass=secret db.tables -p

SEE ALSO
db.columns, db.drivers, db.login, db.tables, GRASS SQL interface

AUTHOR
Radim Blazek, ITC-Irst, Trento, Italy

Last changed: $Date: 2004/12/08 13:45:39 $

Help Index