10-25-2012
So, is this unixodbc or is AIX running a windows emulator, that we have odbc with DSN's on AIX?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a unix script that gives me the sysdate from the database EDNAMID.WORLD.What i want my script to do the following
1) Establish a database connection
2) if database connection is successfull then echo the message "Connected"
3) put the o/p of the Sql query in a spool file
4) then... (3 Replies)
Discussion started by: ali560045
3 Replies
2. Shell Programming and Scripting
I am writing a script to do some conditional logic based on the results of a connection test. I need to capture the output of netcat, the 3 expected conditions are as follows. I need to capture the output of this command. I could write this to a file, but I would like to do it clearer if possible.... (1 Reply)
Discussion started by: princeboot
1 Replies
3. Shell Programming and Scripting
I want to test if my host can connect to any of the following 10 hosts (192.168.1.0 to 192.168.1.9)
I didnt know which command i should use, so i chose ping. (i wonder if i should use tracepath or sth else)
my code is the following:
#!/bin/bash
clear
firstPart="192.168.1"
maxNum="9"
... (2 Replies)
Discussion started by: shadow_boi
2 Replies
4. Shell Programming and Scripting
Hi,
I am using "ksh" and trying to connect to the Microsoft SQL Server but it gives an error that is:
DB-LIBRARY error:
Unexpected EOF from SQL Server.
Can any one please help me to resolve this issue. And i am using Putty to connect to the Unix server.
Thanks (3 Replies)
Discussion started by: anupdas
3 Replies
5. Shell Programming and Scripting
I "inherited" these scripts which are used to access an Oracle DB on a test envoiroment. Originaly someone from our security team would add an system user and password to the otherwise finished script and encrypt the whole thing. The encrypted file (script.x) would then be scheduled with Control-M.... (7 Replies)
Discussion started by: dani_nonato
7 Replies
6. Shell Programming and Scripting
Hi!
I would like to do a single connection to sqlplus and execute some querys.
Actually I do for every query one connection to database
i.e
echo 'select STATUS from v$instance;
exit' > $SQL_FILE
sqlplus user/pass@sid @$SQL_FILE > $SELECT_RESULT
echo 'select VERSION from v$instance;... (6 Replies)
Discussion started by: guif
6 Replies
7. UNIX for Dummies Questions & Answers
i have about 3500 hosts/devices which i monitor.
i monitor them from one host. we'll call this one host HOSTA. HOSTA has connectivity to all 3500 hosts/devices.
now, i have to create a backup for HOSTA. and the back up is in another state.
how do i get a list of all open ports on HOSTA so... (1 Reply)
Discussion started by: SkySmart
1 Replies
8. UNIX for Dummies Questions & Answers
Hello,
I need to test telnet connections using port number for few hosts.
Could you please help me?
Thanks !! (1 Reply)
Discussion started by: skhichi
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
i have to perform a connection from unix to sql server database, using TCP protocol.
I have all connection parameters (user,pwd,server_name,port,db_name).
How can i perform this connection, by unix console ?
is it available a command similar to this one (for oracle):
sqlplus... (1 Reply)
Discussion started by: nash83
1 Replies
10. HP-UX
Hi all,
Recently, I configured LDAP loadbalancing. So I need to test it from HPUX servers. But I don't know how to to it. I know many ldap connection tools such as ldap browser etc. But it's HPUX 11.31, so please share your practices.
Thanks (1 Reply)
Discussion started by: sembii
1 Replies
LEARN ABOUT DEBIAN
grass-odbc
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)