Sponsored Content
Full Discussion: Adding DSN for MySql
Top Forums Shell Programming and Scripting Adding DSN for MySql Post 302754553 by DGPickett on Thursday 10th of January 2013 05:07:05 PM
Old 01-10-2013
Is this unixODBC or windows?
 

5 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

2. Shell Programming and Scripting

Shell script for adding a table in mysql with 10,000 lines ... pls help

Hi , I am new to shell scripting . I need to write a shell script in sql to add 10,000 lines of data in a table . Pls help guys :) ---------- Post updated at 07:08 PM ---------- Previous update was at 03:40 PM ---------- guys please help !!! (3 Replies)
Discussion started by: vinumahalingam
3 Replies

3. UNIX for Dummies Questions & Answers

Test new DSN connection to sql server

I installed an odbc driver and created a DSN to connect to a sql server database on AIX 6. I want to know how to test the DSN from the command line. What syntax or commands do I use? ---------- Post updated at 11:44 AM ---------- Previous update was at 08:26 AM ---------- OK I figured out how... (9 Replies)
Discussion started by: Jdbrown239
9 Replies

4. Shell Programming and Scripting

Copy UNIX File into a DSN with a specific Format

Hi All , I am new to programming and here is what i am trying to achieve , i am taking a list of mounted filesystems (based on the HLQ) , passing it on to a txt file and then copying the file to a DSN .The code i am using : df | grep WAST.*WASCFG.*ZFS | awk '{print $2}' | sort -o log.txt |... (5 Replies)
Discussion started by: AnjanM
5 Replies

5. AIX

I cannot find dsn and TNSNAMES.ora on UNIX

Where can I find dsn and TNSNAMES.ora on UNIX AIX Thanks for contribution (3 Replies)
Discussion started by: digioleg54
3 Replies
grass-odbc(1grass)						Grass User's Manual						grass-odbc(1grass)

NAME
grass-odbc - ODBC driver ODBC driver ODBC driver in GRASS 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 = No ShowSystemTables = No ShowOidColumn = No FakeOidIndex = No ConnSettings = Configuration of an DSN without GUI is described on http://www.unixodbc.org/odbcinst.html, but odbc.ini and .odbc.ini may be created by the 'ODBCConfig' tool. You can easily view your DSN structure by 'DataManager'. Con- figuration with GUI is described on http://www.unixodbc.org/doc/UserManual/ To find out about your PostgreSQL protocol, run: psql -V Now create a new database if not yet existing: db.createdb driver=odbc database=grass6test Now store the table 'mytable.dbf' (here: in current directory) into PostgreSQL through ODBC: db.connect driver=odbc database=grass6test db.copy from_driver=dbf from_database=./ from_table=mytable to_driver=odbc to_database=grass6test to_table=mytable Next link map to attribute table (now the ODBC table is used, not the dbf file): v.db.connect map=mytable.shp table=mytable key=ID database=grass6test driver=odbc v.db.connect -p Finally a test: Here we should see the table columns (if the ODBC connection works): db.tables -p db.columns table=mytable Now the table name 'mytable' should appear. Doesn't work? Check with 'isql ' if the ODBC-PostgreSQL connection is really established. Note that you can also connect mySQL, Oracle etc. through ODBC to GRASS. You can also check the vector map itself concerning a current link to a table: v.db.connect -p mytable.shp which should print the database connection through ODBC to the defined RDBMS. SEE ALSO
db.connect, v.db.connect, unixODBC web site, SQL support in GRASS GIS Last changed: $Date: 2011-02-07 18:59:50 +0100 (Mon, 07 Feb 2011) $ Help Index GRASS 6.4.2 grass-odbc(1grass)
All times are GMT -4. The time now is 04:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy