I have an Excel tool that I use that connects to Teradata and brings back database information to the spreadsheet. This has been working just fine with the following connection string:-
' Create the Connection object
Set Conn = New ADODB.Connection
strConn = "PROVIDER=MSDASQL;DRIVER={Teradata};DBCName="& systm & ";User ID="& UID & ";Password="& pswd & ";"
' Assign the connection string and provider, then open the Connection
Conn.ConnectionString = strConn
Conn.Provider = "teradata"
Conn.Open strConn
However, when I recently upgraded my TTU drivers to TD15 then it stopped working and I started getting the following error:
Runtime error '-2147217843 (80040e4d)':
[Teradata][Teradata ODBC Driver] Not enough information to log on
I tried changing the connection string to accept the additional information that TD15 is looking for and then I get an error in the VB code saying that there are too many parameters.
Anyone had this problem and know how to fix it?
Connecting to TD15 from Visual Basic
Connecting MS Access to Teradata to view BLOB
I'm attempting to connect MS Accses to a Teradata table with the intention of viewing an object in a BLOB field I have stored there.
I'm connecting Access to Teradata through a System DSN connction using Teradata driver 15.10.00.00.
My method was to link the table in Access to Teradata through this connection.
When I'm in Access I can see the rest of the fields of the table, however I cannot open the file. I get the following error:
"A problem occurred while Microsoft Access was communicating with the OLE server or ActiveX Control.
Close the OLE server and restart it outside Microsoft Access. THen try the original operation again in Microsoft Access."
I'm at a loss of where to go from here, any help would be appreciated!
Using SQL Assistant to connect to MS Access database
I'm interested in using SQL Assistant to connect to two different databsaes.
My steps are as follows:
1) Using the connect icon => Connect to Teradata
2) run Teradata SQL
2) Using the disconnect icon => Disconnect from Teradata
3) Using the connect icon => Connect to MS Access database
4) run Access sql.
I'd like to script the process. Is there a command line procedure that I can call to connect to the databases instead of using the icons (interface)?
Oracle has CONNECT DATABASE command, I figure teradata has to have the same thing or some kind of connection object that can be used. Any know off hand?
Thanks,
Wrong result set when iterating through a TYPE_SCROLL_INSENSITIVE jdbc TDResultSet
I'm querying a large table with 99 columns of different types and expect to get a resultset of 3000 records. If I use a TYPE_SCROLL_INSENSITIVE ResultSet and iterate through it calling the next() method inside a while loop, It seems that after the second fetch to the database, the result set gets corrupted. In particular, I get blocks of records duplicated between consecutive fecthes, they seem to incorrectly overlap to the previous block.
Practically speaking, when iteration reaches the 1004th record, I get the 135th record instead of the correct one. The 1005th record is actually the 136th and so on. Then at record 1020th I find a duplicate of the 162th record (skipping 11 records), at record 1038th there is another hole of 11 records. This keeps going on and at the 2009th record there is a jump back to the 388th record.
I'm not performing any suspicious operation while iterating through the result set, I just invoke the getObject() method to get all row values and store them in a list of Object arrays.
I had to avoid this issue using a TYPE_FORWARD_ONLY ResultSet.
This behaviour was detected with:
- JDBC drivers versions 14.10 and 15.10
- database version 13.10 and 14.10
Please, can anyone confirm this is an unexpected behaviour of the Teradata JDBC driver?
Thanks!
BR,
Simone
first time ...to install JDBC Driver 15.10
It is the first time that I am trying to install JDBC Driver 15.10... How to setup the correct path installation of these drivers ( terajdbc4.jar , tdgssconfig.jar ) in a WIn7 (64bit)
I don't have the option to access what it is said in the followinf link
http://www.info.teradata.com/htmlpubs/DB_TTU_15_10/index.html#page/TTU_Install/B035_3122_035K/AccessingListsInstalledFiles_rh_suse_s390x_aix_opt_sparc_win.html#ww3_14_10_1
Thanks in advance...
Problems using SET QUERY_BAND from ODBC
I am having problems using the SET QUERY_BAND via ODBC. I need to use it followed by a SELECT statement in a production context. I am not at liberty to change the SQL code nor post the actual code, but I have created a very basic equivalent to illustrate the problem.
If I use the following code
SET QUERY_BAND='pattern=PR%;' UPDATE FOR SESSION;
SELECT COUNT(*) FROM DBC.TABLESV
WHERE TABLENAME LIKE GETQUERYBANDVALUE(0, 'pattern');
then it works fine in Teradata SQL Assistant, but chokes in ODBC with the message "Only an ET or null statement is legal after a DDL Statement". OK, fine, whatever, I then changed the code to the following
BEGIN TRANSACTION;
SET QUERY_BAND='pattern=PR%;' FOR TRANSACTION;
SELECT COUNT(*) FROM DBC.TABLESV
WHERE TABLENAME LIKE GETQUERYBANDVALUE(0, 'pattern');
END TRANSACTION;
Again, works fine in Teradata SQL Assistant but when using it via ODBC I get the message "SET QUERY_BAND for TRANSACTION must be the first statement in a multi-statement request". Which is baffling me. Is anyone able to help me out here?
JDBC connection timeout
The error message is attached below. The main issue is that I have existing code that's working locally (surprise!) but when deployed to a different machine, I'm getting these connection timeouts. Ping is good from the same client, but I acknowledge that firewall settings may be an issue, still. Does anyone here have any thoughts about what may be at issue? The actual connection code used can be produced, but I don't have it in front of me. Mainly, I'm trying to get at any driver-configurable factors that people may be aware of that will lead to inconsistent behavior across machines like this.
2015-10-13.22:17:28.333 TERAJDBC4 ERROR [main] com.teradata.jdbc.jdk6.JDK6_SQL_Connection@3cd1f1c8 Connection to XXXXXXX.DOMAIN.COM Tue Oct 13 22:17:28 UTC 2015 socket orig=XXXXXXX.DOMAIN.COM cid=ef9296d sess=0 java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1217)
ERROR: Unable to obtain Jdbc connection from DataSource (jdbc:teradata://XXXXXX.DOMAIN.COM/database=XXX,LOGMECH=TD2,DBS_PORT=1025) for user 'USERNAME': [Teradata JDBC Driver] [TeraJDBC 15.10.00.07] [Error 1277] [SQLState 08S01] Login timeout for Connection to XXXXXX.DOMAIN.COM Tue Oct 13 22:17:28 UTC 2015 socket orig=XXXXXXX.DOMAIN.COM cid=ef9296d sess=0 java.net.SocketTimeoutException: connect timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345) at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) at java.net.Socket.connect(Socket.java:589) at com.teradata.jdbc.jdbc_4.io.TDNetworkIOIF$ConnectThread.run(TDNetworkIOIF.java:1217)
Error while connecting to Teradata
When i am trying to connect to Teradata database, an error is popped up saying:
ODBC Error: Socket 60 error, No response received.
ODBC driver decimal culture format issue
Hello:
I'm using the Teradata ODBC driver 15.00.00.01 and testing Norwegian decimal localization in an application. I created a table with a column with data type decimal(7,2). I inserted 120 and 1000. When they come back from the data reader they come back as 12000 and 100000 so everything looks like it is getting multiplied by 100. The Teradata .NET driver does not display this behavior and I also tested this with a DB2 ODBC driver and the data was returned from the ODBC Data Reader as expected.
My main culture is English (United States). This occurs when I change date, time and numbers to Norwegian:
1. Go to Control Panel
2. Under "Clock Language and Region" click on the "Change date, time or number formats" link.
3. From the Format drop down select "Norwegian, Bokmal (Norway)" format.
4. Click "OK" to confirm changes.
Here is the table I created.
database <database_name>;
CREATE TABLE test
(col1 decimal(7,2))
PRIMARY INDEX (col1);
INSERT INTO test values(120); --This returned as 12000D in the odbc data reader. Formatted column is displayed as 12 000,00 instead of 120,00.
INSERT INTO test values(1000); --This is returned as 100000D in the odbc data reader. Formatted column is displayed as 100 000,00 instead of 1 000,00.
select * from test;
Thank you!
Functions doesn't work with the ODBC connection
Hello everyone,
I have lately install an ODBC connection on a new server that we have set up.
I connect to the database through Qlikview (a datavisualisation tool), it works well except when I want to use a teradata function.
For example:
I get a syntax error. I've tried with several functions and always get a syntax error... Of course, I have checked the SQL query was ok and it is !
Do you have any ideas ?
Records lost while using TPUMP with MQ
Hi,
I have a TPUMP process that reads from MQ using the below parameters:
0006 .BEGIN LOAD
ERRLIMIT 5000
ERRORTABLE xyz
CHECKPOINT 5
SESSIONS 60
TENACITY 1
latency 0 notimerprocess
SERIALIZE ON
PACK 60;
I encountered an issue wherein the queue manager went down and TPUMP failed with the below erros:
**** 15:32:17 UTY4015 Access module error '34' received during 'read' operation
on record number '1056766': 'Teradata Websphere MQ AMOD/PIDMMain(!ERROR!):
Reason code = 2009. Function MQGET failed.'
**** 15:33:25 UTY4014 Access module error '34' received during 'close'
operation: 'Teradata Websphere MQ AMOD/CloseAll(!ERROR!): MQCLOSE failed.
QName = S20.EPOS_TRANLOG.STHDBT. Reason code = 2009.'
I have a reconciliation flow through which I was able to find out that there were several records that were missed when compared to the source. It means that even though I have a CHECKPOINT of 5 minutes, the data was lost.
Have you encountered this issue before and is there a way to avoid it?
Thanks,
Raunak
adodb connection error - Not enough information to log on
I can connect to a Teradata db instance using a DSN entry. When I reference that same DSN entry in an adodb connection string the .Open command generates the error "Not enough information to log on"
Dim conn As New ADODB.Connection
conn.ConnectionString = "DSN=TDFADS_SYS"
conn.Open
Debug.Print Err.Description ' returns: [Teradata][ODBC Teradata Driver] Not enough information to log on
I've also created a connection string that bypasses the DSN (references ODBC directly) but the error is still generated.
conn.ConnectionString = "DRIVER=Teradata;UID=;AUTHENTICATION=;USEINTEGRATEDSECURITY=Y;DBCNAME=tdfadscop1.gsm1900.org"' not enough info
conn.Open
Debug.Print Err.Description ' returns: [Teradata][ODBC Teradata Driver] Not enough information to log on
The DSN entry is defined to use integrated security. I believe adodb isn't passing this information on to the db instance which then causes the connection to fail.
Does anyone have an example of an vba adodb connection string that works with Integrated Security?
Thanks in advance.
Cannot connect to database using Linux Teradata client 15.10
Hi, I have a Linux machine with Teradata client 14.10 which works nicely with the database.
On another Linux machine where client 15.10 is installed, I cannot connect to the same database using the same connection string.
The error I get is "STATE=632, CODE=0, MSG=523 630", which, unfortunately, is not too helpful.
What could be the problem?
./tdxodbc -C "DRIVER=Teradata;SERVER=teradata141;UID=dbc;PWD=dbc;DBCNAME=MSTEST"
Connecting with SQLDriverConnect("DRIVER=Teradata;SERVER=teradata141;UID=dbc;PWD=*;DBCNAME=MSTEST")...
adhoc: (SQL Diagnostics) STATE=632, CODE=0, MSG=523 630
ODBC connection closed.
Thanks
Teradata odbc connection and tmp space
I'm trying to understand if there's a setting in Teradata that controls the tmp space when a Teradata connection is configured using Teradata.
JDBC4 - RAR7115: Unable to set ClientInfo for connection
Keep getting this INFO Level Log in my Glassfish Application Server.
Some research show me that this behavior is related to a method called getClientInfoProperties() when this method is not fully implemented.
Since it's a JDBC4 functionality and the lastest version of jdbc driver (15.10.00.09) is (or should be) jdbc4 complaint, I'm wondering if this method is fully implemented.
Thanks
Teradata ODBC Teradata Driver Not enough information to log on - Python/SQL Assistant ODBC
Hi,
I'm geting "Not enough information to log on" error message when trying to connect using the Teradata Python module, pypyodbc or SQL Assistant ODBC.
Using Teradata Python:
session = udaExec.connect(method="odbc", system=***,username=***, password=***);
*** - hide the real values.
Using pypyodbc:
('DSN=***;UID=***;pwd=***;autocommit=True)
The strange thing is that I can connect through Excel using ODBC...
THe connection string there is:
('DSN=***;UID=***;pwd=;)
Any idea what Ielse could try?
Thanks,
DDKing
Super fast way to IMPORT using Dot Net
I read about a super fast way to IMPORT using Dot Net.
http://bit.do/tera14
Q: Will this be incorporated into Teradata SQL Assistant?
Thanks for any leads. I really appreciate it!
Jim
.Net Provider DateTime-Timestamp Data Type
I need to query a teradata table by referencing a column that is of type Timestamp(6). I'm not successful at getting the right format so far. What do I need to set the Size, Precision, and Scale values to for this to work. (By size, precision, and scale I mean these parameter values in Visual Studio's Dataset Editor)
Teradata ODBC Driver for Linux does not work with Mono
I've been playing with Teradata ODBC Driver for Linux x64 version 15.10. I have installed it and successfully able to connect via tdxodbc64 tool. But unfortunatelly, I wasn't able to connect via a very simple Mono application (Mono runtime 3.12.1).
This is explained here: http://www.info.teradata.com/htmlpubs/DB_TTU_15_10/index.html#page/Connectivity/B035_2509_035K/2509ch08.10.39.html
In short, an application must tell the driver it is UTF-16 by setting an ODBC environment attribute right before attempting connection. On mono, this is a problem because such ODBC API calls are handled internally in the OdbcConnection.Open method and there is no way to set that environment attribute externally.
The obvious way to fix that would be to override OdbcConnection.Open method, but it is not possible as the class is sealed. So we are forced to implement some sort of hack in order to be able to connect. Isn't there an alternative way of doing that? Isn't it possible to set the UTF-16 attribute via connection string property or in the odbcinst.ini file? How can I request this change/fix/feature?
Thanks!
PS: we were able to use ODBC drivers for SQL Server, DB2, Sybase without issues in Mono.
Connecting to a VM from a completely separate host
Hello,
Apologies in advance if this question is dumb or obvious. I've searched the web as best I can and cannot seem to solve this issue - Which at first I thought was simple.
Onto my problem: The title basically says it all. I have a TD Express VM (ran on VMware Player) on a Windows 2008 R2 server acting only as a host for the TD Express. There are a number of us with our own PCs and we each independantly want to connect to the TD Express database - But how?
On the Windows Server Command Prompt, I can use 'ipconfig' and see the IP of the VMware Machine is 192.168.xxx.xxx. If I try and do 'ping 192.168.xxx.xxx', it works as it should! That's great.. But this IP is local to the windows machine of course, and thus cannot be reached via our separate PCs.
As said I've looked online, but the only thing I seem to keep finding is that the TD Express VM can only be access via the PC that is hosting said VM... Is that true? I don't see it being true at all but I cannot find an answer otherwise :(
Thank you for any help in advance, I will try and respond asap if someone needs more info about my Machine.
Regards.