db.databases.1grass man page

db.databases — Lists all databases for a given driver and location.

Keywords

database, attribute table, SQL

Synopsis

db.databases
db.databases --help
db.databases [driver=name] [location=name] [--help] [--verbose] [--quiet] [--ui]

Flags

--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters

driver=name
Name of database driver
Options: mesql, pg, dbf, sqlite, odbc, ogr, mysql
Default: sqlite
location=name
Location
Path for SQLite driver, or connection string for PostgreSQL driver

Description

db.databases lists all databases for a given driver and optionally location.

Notes

Currently supported database drivers are SQLite, PostgreSQL, and ODBC.

Default location for SQLite driver is the full path for the current mapset. For PostgreSQL driver it’s empty connection string.

Examples

List SQLite databases in the current mapset:

db.databases driver=sqlite

List SQLite databases in a given directory:

db.databases driver=sqlite location=/opt/sqlite

List PostgreSQL databases from database server running on given port:

db.databases driver=pg location="host=server_name port=5333"

See Also

db.columns, db.describe, db.drivers, db.execute, db.login, db.tables

GRASS SQL interface

Authors

Radim Blazek, ITC-Irst, Trento, Italy
Updated for GRASS 7 by Martin Landa, Czech Technical University in Prague, Czech Republic

Last changed: $Date: 2014-12-07 23:24:06 +0100 (Sun, 07 Dec 2014) $

Main index | Database index | Topics index | Keywords index | Full index

© 2003-2016 GRASS Development Team, GRASS GIS 7.0.4 Reference Manual

Info

GRASS 7.0.4 Grass User's Manual