$darkmode
Elektra 0.11.0
kdb-mountOdbc(1) - Mount an ODBC data source to the key database

kdb mountOdbc <data source name> <user name> <password> <table name> <key column name> <value column name> <meta table name> <mt key column name> <mt metakey column name> <mt metavalue column name> <timeout (s)> <mountpoint>

All columns in the data source that are specified via one of the described arguments, should be of type TEXT, CHAR or VARCHAR. The tables can have additional columns. These are not processed by the ODBC backend, but should support NULL or DEFAULT values.

This command allows a user to persistently mount a new backend that refers to an ODBC data source. The concept is the same as for mounting with the file-based backend. So it is recommended to also read to man page for kdb-mount(1). More about mounting is explained in elektra-mounting(7).

This command modifies system:/elektra/mountpoints. Depending on the location of that part of the KDB, you may need root privileges to execute this command. Use kdb file system:/elektra/mountpoints to find out where exactly it will write to.

There is no special command for unmounting ODBC data sources. You can just use the kdb-umount(1) command the same way as with mountpoints for files.

To mount the sample SQLite data source which is available at /src/plugins/backend_odbc/sampleDb/elektraDB.db:
kdb mountOdbc Selektra "" "" elektraKeys keyName keyValue metaKeys keyName metaKeyName metaKeyValue "" user:/odbcSqlite

To specify all arguments:
kdb mountOdbc Selektra myUser myPassword elektraKeys keyName keyValue metaKeys keyName metaKeyName metaKeyValue 12 user:/odbcSqlite