All Forums Connectivity
premalm 12 posts Joined 09/06
28 Sep 2006
Connect to TeraDatabase using Teradata.Client.Provider

I am trying to connect to TeraDatabase from an ASP.NET 2.0 application using Teradata.Client.Provider. I get the following error : System.DllNotFoundException: Unable to load DLL 'wincli32.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F) at Teradata.Client.Provider.WpSession.CLI.DBCHINI(Int32& returnCode, IntPtr contextArea, CliDbcArea& DbcArea) at Teradata.Client.Provider.WpSession..ctor() at Teradata.Client.Provider.Connection.Open(UtlConnection String connectionString, UInt32 timeout) at Teradata.Client.Provider.ConnectionPool.CreateConnecti on(UInt32 timeout) at Teradata.Client.Provider.ConnectionPool.GetConnectionF romPool(Object owningObject) at Teradata.Client.Provider.ConnectionFactory.GetConnecti on(Object owningObject, UtlConnectionString connStr) at Teradata.Client.Provider.TdConnection.Open() at AppWTeradata._Default.butConnect_Click(Object sender, EventArgs e) in C:\Inetpub\wwwroot\AppWTeradata\AppWTeradata\ Default.aspx.vb:line 33I have installed the latest version of .Net Teradatabase Driver 1.0.0.0. Also I have CLIv2 Interface DLL 4.8.1.2, Teradata GSS version 6.1.0.7 installed on my PC. Here is the code I have used. cString = "Data Source=VSAFESEND;User Id=xxxxx;Password=xxxxxx"cn = New TdConnection(sCString)cn.Open()Any Ideas ? Thank youPr

NetFx 346 posts Joined 09/06
28 Sep 2006

I suspect that the Path is not correct. Therefore CLR cannot find and load CLI (wincli32.dll).I suggest testing CLI installation by running NQuery.exe first.NQuery.exe is usually installed in "C:\Program Files\NCR\NET Data Provider for Teradata\01.00.00.00\Samples\Bin" directory. It is a simple ad-hoc query tool.

premalm 12 posts Joined 09/06
28 Sep 2006

Whe I try to connect to the database using NQuery I get the following error: Unable to load DLL: 'wincli32.dll'. The specified folder could not be found. I have checked the path and it looks right. May be if you could see the attached image files and let me know if the path looks right on my machine.Thanks.Pr

premalm 12 posts Joined 09/06
28 Sep 2006

In case you didn't get the image files they are attached to this email.

NetFx 346 posts Joined 09/06
28 Sep 2006

Could you open a command prompt and display the Path?It should have C:\Program Files\NCR\Teradata Client\Cliv2 in it.Or better yet, Check the path in Start->Control Panel->System->Advanced->"Environment Variables".Common Language Runtime does not read the registry to locate DLLs. It simply uses the Path to find CLI (WinCli32.dll).for example here is my pathC:\>pathPATH=C:\Program Files\Common Files\NCR\AXSMOD;C:\Program Files\NCR\Common Files\Shared ICU Libraries for Teradata\lib;C:\Program Files\NCR\Teradata Client\cliv2\;C:\Program Files\NCR\Teradata Client\Bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\PrivateAssemblies\;C:\Program Files\Common Files\Compuware;CLI is installed in C:\Program Files\NCR\Treadata Client\cliv2\.Hope this helps

premalm 12 posts Joined 09/06
28 Sep 2006

I have wincli32.dll under the path you mentioned (C:\Program Files\NCR\Teradata Client\cliv2).The Path on my machine is as follows: PATH=C:\Program Files\NCR\Teradata Client\cliv2\;C:\Program Files\NCR\Common Files\Shared ICU Libraries for Teradata\lib;C:\blp\API\dde;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;c:\progra~1\orant\bin;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;Let me know what you think. I appreciate all your help.ThanksPr.

NetFx 346 posts Joined 09/06
28 Sep 2006

I think you might have multiple copies of WinCli32.dll.Can you search your hard drive? specifically Windows\System32 directory.WinCli32.dll has a dependency on tdusr32.dll; which is usually in the same directory.A similar error message is generated when WinCli32.dll cannot find and load tdusr32.dll.

premalm 12 posts Joined 09/06
29 Sep 2006

I have only one version of both the files in my machine so that's not the problem. I still don't know what's the problem.

NetFx 346 posts Joined 09/06
29 Sep 2006

TeraSSO.dll is used by ODBC Driver for Teradata and CLI.I noticed that you have ODBC Driver 03.01.00.00. Rename the TeraSSO.dll in Windows\System32 directory to TeraSSo.dll.old.Also, Dependes.exe ships with Visual Studio 2005. Launch Dependes.exe and open WinCli32.dll.It is a very good tool to pinpoint DLL incompatibilities.

NetFx 346 posts Joined 09/06
29 Sep 2006

I also recommend upgrading to TTU8.1 ODBC driver.

premalm 12 posts Joined 09/06
02 Oct 2006

from where do I get this driver ?

NetFx 346 posts Joined 09/06
02 Oct 2006

Is TeraSSO.dll the root cause of this issue?Did you try renaming the file and did it work?You can download TTU8.1 ODBC Driver from http://www.teradata.com/t/page/130536.

premalm 12 posts Joined 09/06
02 Oct 2006

Yes. I have tried renaming TeraSSO.dll in the windows/system32 directory. When I did this I got the following error: TdError: [Call-Level Interface, Version 2][303]Cli2: BADLOGON(303): Invalid Logon StringI have even tried unstalling the entire setup but its not working. Its not even connecting from NQuery application. The only way I was able to connect was using ODBC driver. i.e. using System.Net.Odbc from ASP.NET application but that is not what I want. Any Ideas ?Thank you.Pr

NetFx 346 posts Joined 09/06
02 Oct 2006

Can you post the Connection String?I think there is something wrong with your connection string.

NetFx 346 posts Joined 09/06
02 Oct 2006

Connection String Syntax for .NET Data Provider is: Data Source=mySystemName;User Id=myUserId;Password=myPassword;Refer to the Help file for additional information on the Connection String.

premalm 12 posts Joined 09/06
03 Oct 2006

My Connection String is Data Source=;User Id=;Password="I appreciate all your help. Thanks Pr

NetFx 346 posts Joined 09/06
03 Oct 2006

Are you passing values for Data Source, User ID and Password?Your reply is not clear.

premalm 12 posts Joined 09/06
03 Oct 2006

sorry about that. Yes my connection string is the same as your format. Here it is. Data Source=xxxxxx;User Id=xxxxxxxxxx;Password=xxxxxxxxxI am not even able to connect to Teradata using the NQuery application. ThanksPr

NetFx 346 posts Joined 09/06
03 Oct 2006

I suggest starting out by indicating an invalid system name.That is use this Connection String: Data Source=Foo;User Id=Bar;Password=BG;It should generate the following error:[Call-Level Interface, Version 2][224] MTDP: EM_NOHOST(224): name not in HOSTS file or names database.Next replace Foo with your system name. Data Source=mySystemName;User Id=Bar;Password=BG;It should generate the following error:[Teradata Database][3004]User identification is not authorized.Next replace Bar with your User Id. Data Source=mySystemName;User Id=myUserId;Password=BG;It should generate the following error:[Teradata Database][3003]Invalid password.Also, what Teradata database version are you trying to connect to?

premalm 12 posts Joined 09/06
03 Oct 2006

I did what you told me to do. The first Connection String gave me this error (Data Source=Foo;User Id=Bar;Password=BG): [Call-Level Interface, Version 2][224] MTDP: EM_NOHOST(224): name not in HOSTS file or names database.The second connection string gave me (Data Source=mySystemName;User Id=Bar;Password=BG ;-) TdError: [Call-Level Interface, Version 2][303]Cli2: BADLOGON(303): Invalid Logon StringThe third connection string gave me (Data Source=mySystemName;User Id=myid;Password=BG ;-) this error:TdError: [Call-Level Interface, Version 2][303]Cli2: BADLOGON(303): Invalid Logon StringThanksPr

NetFx 346 posts Joined 09/06
03 Oct 2006

Are you trying to connect to a DEMO database?Or is this a production machine?There is something wrong with your System Name and it must not conform to TDPID rules.Ping the system name and get the IP address; replace the systemName with the IP address.

Fred 1096 posts Joined 08/04
03 Oct 2006

Do you have a DNS / hosts file entry for mySystemNamecop1? How many characters in the actual "mySystemName" part?

NetFx 346 posts Joined 09/06
03 Oct 2006

TDPID (a.k.a. SystemName or DBCName) has to be less than or equal to 8 characters.CLI appends COPn to the TDPID; and resolves the name to an IP Address. n is a number between 1 an X where X is the number of gateways. A single system can have multiple Gateways.For example if the TDPID name is FOO; then CLI starts out by trying to resolve FOOCOP1.If you are connecting to a DEMO database on your system, then I suggest passing either the IP address: Data Source=127.0.0.1;User Id=X;Password=Y;or Modify the HOSTS file in \Windows\System32\Drivers\etc directory and add a line like127.0.0.1 DEMOTDATCOP1and pass DEMOTDAT as the Data Source: Data Source=DemoTdat;User ID=x;Password=Y;Hope this helps

premalm 12 posts Joined 09/06
05 Oct 2006

I did exactly what you told me to do. I am able to connect using the IPAddress but am not able to connect using the DBCName. This is because of some restrictions in the environment I am working in. We wont be able to change the windows hosts file on production. I am not sure whether I will be able to use Teradata .Net Provider because of these restrictions.I think I might have to try to connect to Teradata using OLEDB. Thank you all for responding to my messages. I really appreciate all the help you guys have given. Pr.

NetFx 346 posts Joined 09/06
06 Oct 2006

In production, Domain Name Services is setup with COP entries for Teradata systems. Therefore there is no impact to Windows HOSTS file.I suggest that you contact Global Support Center and work with them to setup your enviroment.Other products like BTEQ, FastLoad, FastExport, Teradata Parallel Transporter, Query Director and others will require the same setup.

johnhrschuster 7 posts Joined 06/04
09 Nov 2006

I also an doing some research on using the NET Data Provider with VS2005. I am having the same issue with "Unable to load DLL 'wincli32.dll': The specified procedure could not be found. (Exception from HRESULT: 0x8007007F)"I have checked to make certain I have only one WinCli32.dll and that the path statement has the Teradata directory in it. I have installed the ODBC 3.5.0.5 driver from Teradata web site and all the associated files (GSS, ICU)I also deleted old version of the TeraSSO.dll file I found in the windows system32 directory. The version I have now is dated 9.28.06 and is 21KB in size. Previous versions were dated 01/13/06.I am still getting the "WinCli32.dll" not found when using the NET Data Provider and now since I deleted TeraSSO.Dll from the windows System32 directory my older existing working application based on Teradata ODBC/Microsoft OLEDB is now failing with a "ERROR [HY001] [NCR][ODBC Teradata Driver] Could not load security DLL".I have an incident filed with NCr but I thought I would come here in case someone else has figured this out. I have a number of students who are all getting pretty much the same thing.

John H Schuster
Teradactlyl

NetFx 346 posts Joined 09/06
09 Nov 2006

Couple of suggestions:a) Try BTEQ first. BTEQ also has dependency on CLI which has a dependency on ICU and TeraGSS. If you can load BTEQ, then "SHOW Versions" will display the CLIV2 and TDICU Versions. b) Search the Visual Studio 2005 Directory for a tool called Depeneds.EXE. It is usually installed in "Program Files\Microsoft Visual Studio 8\Common7\Tools\Bin" directory. Run Depeneds and Select File->Open; navigate to bin directory (C:\Program Files\NCR\Teradata Client\Bin) and select BTEQ.exe. Enable Full Path from View menu. Depends provides lots of information and shows missing dependencies.

NetFx 346 posts Joined 09/06
20 Nov 2006

John,I read your post again. You wrote:"I deleted TeraSSO.Dll from the windows System32 directory my older existing working application based on Teradata ODBC/Microsoft OLEDB is now failing with a "ERROR [HY001] [NCR][ODBC Teradata Driver] Could not load security DLL"."This leads me to believe that your PATH does not correctly point to CLI installation directory. If it did, then ODBC driver should be able to pick up TeraSSO.dll from the CLI installation directory. Also, you have to restart running services to pickup the new path.

You must sign in to leave a comment.