Error

Moderator: NorbertKrupa

Post Reply
ncbshiva
Newbie
Newbie
Posts: 4
Joined: Wed Jun 26, 2013 7:11 am

Error

Post by ncbshiva » Wed Aug 14, 2013 5:54 am

Hi ,

I am getting below error while below query in order to connect to mySQL database.I have made ODBC configurations as per document.

Query:COPY sample.test123 WITH SOURCE ODBCSource() PARSER ODBCLoader(connect='DSN=Connect', query='SELECT * FROM test.student;');

Error:[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect


Please help me.......

id10t
GURU
GURU
Posts: 732
Joined: Mon Apr 16, 2012 2:44 pm

Re: Error

Post by id10t » Wed Aug 14, 2013 9:09 am

Hi!

You have a problem with connection to MySQL. Did you check that you can connect to MySQL?
What is output of (can you connect?):

Code: Select all

isql -v Connect
PS:
The 'connect' argument to ODBCLoader can be any valid ODBC connect string. It is common to configure /etc/odbc.ini and /etc/odbcinst.ini with all the necessary information, then simply reference the DSN listing in /etc/odbc.ini in each query. For help configuring these files, or for more information on valid 'connect' strings, please see the documentation that came with the ODBC driver for the remote database product that you are connecting to, as the format of the string is specified by the driver.

WARNING: The ODBC Loader CAN CRASH VERTICA if not used with THREAD-SAFE ODBC drivers! Please see your driver's documentation to see if it is thread-safe by default or can be configured to operate in a thread-safe mode.
...
MYSQL: The MySQL ODBC driver comes in both a thread-safe and thread-unsafe build and configuration. The thread-unsafe version is KNOWN TO CRASH VERTICA if used in multiple COPY statements concurrently! (Vertica is, after all, highly multithreaded.) And distributions aren't consistently careful to package thread-safe defaults. So if you're connecting to MySQL, be very careful to set up a thread-safe configuration.

ncbshiva
Newbie
Newbie
Posts: 4
Joined: Wed Jun 26, 2013 7:11 am

Re: Error

Post by ncbshiva » Tue Aug 20, 2013 1:53 pm

Hi

I am able to connect to isql

[root@INBAAMPC02675 ~]# isql -v myodbc5
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select * from test.student;
+------------+----------------------------------------------+
| ID | NAME |
+------------+----------------------------------------------+
| 1 | NAZIM |
| 2 | Shiva |
| 3 | Kavya |
| 4 | New Student |
| 5 | New Student 1 |
+------------+----------------------------------------------+

but when trying to run below copy command i am getting following error

Query:COPY sample.test123 WITH SOURCE ODBCSource() PARSER ODBCLoader(connect='DSN=myodbc5',query='select * from test.student;');

Error:server closed the connection unexpectedly
This probably means the server terminated abnormally
before or while processing the request.
The connection to the server was lost. Attempting reset: Failed.


Please help me to solve this..........

Post Reply

Return to “Vertica Community Edition”