Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentes Révision précédente | |||
unixodbc [Le 10/06/2019, 10:58] grigouille [H2] |
unixodbc [Le 11/06/2019, 06:03] (Version actuelle) Fabux Rapide Mise en forme |
||
---|---|---|---|
Ligne 11: | Ligne 11: | ||
Pour installer ce logiciel, il suffit d'[[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>unixodbc|unixodbc]]**. Vérifier l'installation : | Pour installer ce logiciel, il suffit d'[[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>unixodbc|unixodbc]]**. Vérifier l'installation : | ||
- | <code bash>$ odbcinst -j | + | <code bash>odbcinst -j</code> |
+ | <code bash> | ||
unixODBC 2.3.4 | unixODBC 2.3.4 | ||
DRIVERS............: /etc/odbcinst.ini | DRIVERS............: /etc/odbcinst.ini | ||
Ligne 21: | Ligne 22: | ||
SQLSETPOSIROW Size.: 8 | SQLSETPOSIROW Size.: 8 | ||
</code> | </code> | ||
- | |||
- | |||
===== Configuration ===== | ===== Configuration ===== | ||
====SQLite3==== | ====SQLite3==== | ||
[[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>libsqliteodbc|libsqliteodbc]]**. Ceci crée deux entrées dans ''odbcinst.ini'' : | [[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>libsqliteodbc|libsqliteodbc]]**. Ceci crée deux entrées dans ''odbcinst.ini'' : | ||
+ | <code bash>cat /etc/odbcinst.ini</code> | ||
<code bash> | <code bash> | ||
- | $ cat /etc/odbcinst.ini | ||
[SQLite] | [SQLite] | ||
Description=SQLite ODBC Driver | Description=SQLite ODBC Driver | ||
Ligne 40: | Ligne 39: | ||
Setup=libsqlite3odbc.so | Setup=libsqlite3odbc.so | ||
UsageCount=1 | UsageCount=1 | ||
- | |||
- | $ | ||
</code> | </code> | ||
Vérification <code bash> | Vérification <code bash> | ||
- | $ odbcinst -q -d | grep SQLite | + | odbcinst -q -d | grep SQLite </code> |
+ | <code bash> | ||
[SQLite] | [SQLite] | ||
[SQLite3] | [SQLite3] | ||
- | $ | ||
</code> | </code> | ||
Pour tester, il faut configurer le fichier odbc.ini : | Pour tester, il faut configurer le fichier odbc.ini : | ||
+ | <code bash>cat ~/.odbc.ini </code> | ||
<code bash> | <code bash> | ||
- | $ cat ~/.odbc.ini | ||
[test] | [test] | ||
Driver=SQLite3 | Driver=SQLite3 | ||
Ligne 61: | Ligne 58: | ||
Tester : | Tester : | ||
+ | <code>isql test</code> | ||
<code> | <code> | ||
- | $ isql test | ||
+---------------------------------------+ | +---------------------------------------+ | ||
| Connected! | | | Connected! | | ||
Ligne 87: | Ligne 84: | ||
====PostgreSQL==== | ====PostgreSQL==== | ||
[[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>odbc-postgresql|odbc-postgresql]]**. Ceci crée deux entrées dans ''odbcinst.ini'' : | [[:tutoriel:comment_installer_un_paquet|installer le paquet]] **[[apt>odbc-postgresql|odbc-postgresql]]**. Ceci crée deux entrées dans ''odbcinst.ini'' : | ||
+ | <code bash>cat /etc/odbcinst.ini </code> | ||
<code bash> | <code bash> | ||
- | $ cat /etc/odbcinst.ini | ||
[PostgreSQL ANSI] | [PostgreSQL ANSI] | ||
Description=PostgreSQL ODBC driver (ANSI version) | Description=PostgreSQL ODBC driver (ANSI version) | ||
Ligne 104: | Ligne 101: | ||
CommLog=1 | CommLog=1 | ||
UsageCount=1 | UsageCount=1 | ||
- | |||
- | $ | ||
</code> | </code> | ||
- | Vérification <code bash> | + | Vérification <code bash>odbcinst -q -d | grep PostgreSQL</code> |
- | $ odbcinst -q -d | grep PostgreSQL | + | <code bash> |
[PostgreSQL ANSI] | [PostgreSQL ANSI] | ||
[PostgreSQL Unicode] | [PostgreSQL Unicode] | ||
Ligne 118: | Ligne 113: | ||
[[http://www.h2database.com/html/advanced.html#odbc_driver|H2 ODBC driver]] | [[http://www.h2database.com/html/advanced.html#odbc_driver|H2 ODBC driver]] | ||
- | |||
- | |||
- | |||
- | |||
- | |||
===== Désinstallation ===== | ===== Désinstallation ===== | ||
Ligne 133: | Ligne 123: | ||
* **(en)** [[http://www.ch-werner.de/sqliteodbc|SQLite ODBC Driver]] | * **(en)** [[http://www.ch-werner.de/sqliteodbc|SQLite ODBC Driver]] | ||
* **(en)** [[https://odbc.postgresql.org|psqlODBC - PostgreSQL ODBC drive]] | * **(en)** [[https://odbc.postgresql.org|psqlODBC - PostgreSQL ODBC drive]] | ||
- | + | ||
- | + | ||
---- | ---- | ||
- | + | ||
//Contributeurs principaux : [[utilisateurs:grigouille|grigouille]].// | //Contributeurs principaux : [[utilisateurs:grigouille|grigouille]].// | ||
//Basé sur [[https://blog.sleeplessbeastie.eu/2017/07/31/how-to-configure-unixodbc/|How to configure unixODBC]] par MILOSZ GALAZKA.// | //Basé sur [[https://blog.sleeplessbeastie.eu/2017/07/31/how-to-configure-unixodbc/|How to configure unixODBC]] par MILOSZ GALAZKA.// |