This site uses cookies to deliver our services. By using this site, you acknowledge that you have read and understand our Cookie and Privacy policy. Your use of Kontext website is subject to this policy. Allow Cookies and Dismiss

Connect to Teradata Virtual Machine Guest from Windows Host

5697 views 16 comments last modified about 4 years ago Raymond

In this page

In my previous posts about Querying Teradata and SQL Server, I logged into the virtual machine graphic interface to manage the database. However, I constantly found it is resource intensive as there is only 4GB memory in my laptop. Instead, I will use text mode to start the virtual machine and connect through SQL Assistant in Windows master machine.

Prerequisites

Install Virtual Machine

Install Teradata Express 15.0.0.8 by Using VMware Player 6.0 in Windows

Follow the above post to setup your Teradata virtual machine if you have not done that.

Install Windows Client Tools and Utilities

Download and install ‘Teradata Tools and Utilities - Windows Installation Package’:

http://downloads.teradata.com/download/tools/teradata-tools-and-utilities-windows-installation-package

This includes SQL Assistant, load & unload utilities, database management, administration and drivers, and much more to be used to connect to your Teradata Express database instance.

image

Change the startup mode

If you want to startup SUSE Linux without GUI, find file ‘/etc/inittab’ and  you will see this line
id:5:initdefault

Change the value 5 to 3 ; after you change it, the  line will look like this
id:3:initdefault:

When you reboot, the default is the text startup mode.

image

Configure the VM Settings

You can now only allocate the smaller size memory to your virtual machine. In my case, I allocated 1536 MB.

image

For network connections, you can choose NAT.

image

After configuration, start the VM.

Input root Password

Input the default password ‘root’ if you have not changed it.

image

Check IP Addresses

When starting with level 3, you should be able to see the IP address of the VM:

image

Alternatively, use IP ADDR command to check you IP:

image

In my case, the IP assigned by the virtual DHCP is 192.168.121.128.

Make sure you can ping the VM successfully in the host.

image

Check Teradata status

Use command ‘pdestate –a’ to check the status of Teradata services. Ensure the status is running (PDE state is RUN/STARTED).

Running the command multiple times, you can notice the status change:

  • PDE state is START/STARTTPA
  • PDE state is START/STARTED
  • DBS state is 1/1 DBS Startup – Initializing DBS Vprocs
  • DBS state is 1/1 DBS Startup – Initializing DBS Configuration
  • DBS state is 1/5 Logons are enabled – The system is quiescent
  • ..
  • DBS state is is 4 Logons are enabled – Users are logged on

Sometimes I found the service cannot be started because of insufficient memory allocated. If that is the case, allocate more memory to your VM.

Connect in Windows host

Open Teradata SQL Assistant in Windows host machine.

image

Choose Teradata.Net as the driver.

Input the following parameters:

Server: 192.168.121.128 (IP address of the virtual machine)

User: dbc

Password: dbc

image

Click OK to connect. Once it is done, you can view the objects in DBC database.

image

Error about login

If you encountered the following error, it is probably because the service is not started yet.

---------------------------
Teradata SQL Assistant
---------------------------
[115025] Could not resolve Data Source=192.168.121.128 to an available node after 1 attempts.

[10061] System.Net.Sockets.SocketException (0x80004005): No connection could be made because the target machine actively refused it 192.168.121.128:1025

   at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult)

   at Teradata.Client.Provider.WpTcpTransport.WaitOnSockets(List`1 sockets, UtlStopwatchWrapper timer, Int32 timeout, Int32 lccTimeout, TdErrorCollection errors)
---------------------------
OK  
---------------------------

Query the Database

If you have been following my tutorial about Querying Teradata and SQL Server, you can now use SQL Assistant in the host system to query the data.

DATABASE    TD_MS_SAMPLE_DB;
SELECT    Emp.EmployeeID,
    Emp.EmployeeName,
    Dept.DepartmentName
    FROM TD_MS_SAMPLE_DB.Employee Emp
    INNER JOIN Department Dept
    ON Dept.DepartmentID = Emp.DepartmentID
    ORDER BY Emp.EmployeeID;

You will get the following result:

image

Start/Stop Service

If your VM accidently stopped, you can restart it using the following command.

/etc/init.d/tpa start

Read the official article for more details:

http://www.info.teradata.com/HTMLPubs/DB_TTU_14_00/index.html#page/Database_Management/B035_1093_111A/ch11.030.01.html 

PDE state is DOWN/HARDSTOP

The PDE state in my VM stays at DOWN/HARDSTOP though I restarted the TPA service several times.

Look into the log and then I found out the reason.

/less /var/log/messages

image

The culprit was found out:

PdeMain NOT started, PANIC-LOOP-DETECTED. Please delete file “/var/opt/teradata/tdtemp/PanicLoopDetected”, after resolving the panic issue.

I used the command ‘rm /var/opt/teradata/tdtemp/PanicLoopDetected’. The issue was then fixed.

image

Love GUI more?

You can change back to GUI mode. Input YaST command.

Select ‘System Services (Runlevel)’

image

Change the default runlevel after booting back to 5.image

Definitely, you can also directly modify the file ‘/etc/inittab’ as we did previously.

Related pages

Useful DBC (Data Base Computer) System Views in Teradata

185 views   0 comments last modified about 3 months ago

This page summarize some of the commonly used views in Teradata. Conventions In all the views in the following sections, X views are also available though they only return rows that contain information on objects that the requesting database user owns, created, granted privilige on,...

View detail

Install Teradata Express 15.0.0.8 by Using VMware Player 6.0 in Windows

12414 views   23 comments last modified about 5 years ago

In this article, I am going to introduce how to install Teradata Express in virtual machines in Windows. Download software 1) Download VMware Player for Windows 32-bit and 64-bit from the following link (version 6.0): ...

View detail

Connect to Teradata database through Python

1616 views   0 comments last modified about 8 months ago

Teradata published an official Python module which can be used in DevOps projects. More details can be found at the following GitHub site: https://github.com/Teradata/PyTd Install Teradata module ...

View detail

Teradata Tutorials Summary - October 2017

238 views   0 comments last modified about 11 months ago

This post summarizes the tutorials I created in the past about Teradata. It is trying to help you gain the basic SQL skills with Teradata especially if you are a new beginner or you just move from SQL Server or Oracle. It also includes some guides about setting up your own Teradata server (latest Teradata Express version TDExpress16.10.00.03_Sles11_40GB.7z).

View detail

Setup Teradata in Microsoft Azure

215 views   0 comments last modified about 11 months ago

This page provides the steps to create a Teradata database in Microsoft cloud computing platform Azure.

View detail

Teradata SQL Tricks for SQL Server/Oracle Developers

615 views   0 comments last modified about 11 months ago

For many SQL Server or Oracle developers, you may encounter some inconveniences when writing SQL queries. For example, how to select from dummy table or local defined variables. This page summarize the equivalents in Teradata SQL.

View detail

Add comment

Please login first to add comments.  Log in New user?  Register

Comments (16)

FN Re:Connect to Teradata Virtual Machine Guest from Windows Host

Far*** about 2 years ago

Great article. Thanks a lot
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 2 years ago

@Rtyu Default account for database admin: User: dbc Password: dbc

Rt*** about 2 years ago

How to connect as admin ?
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Rt*** about 2 years ago

How to connect as admin ?
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 3 years ago

@Joe hi Joe, I am glad that your problem is resolved. Last night I upgraded VMware Player to version 12 as the previous one didn't work well in my Windows 10 machine. The NAT connection mode is always working. However I could not get the bridged network mode work even I can see one IP is allocated to the virtual machine from router. DHCP was already setup previously for my virtual adapters. Yes, you are right. VM0 is also not shown in my network adapter list though I can see vm1 and 8 which are used for the other two types of connection mode respectively. So my issue is a little bit different from yours. I will also let you know once I fix it.

Jo*** about 3 years ago

@Raymond Hey, Raymond thanks for all your help, but I fixed the problem. Within the Teradata Express VM, I opened YaST2 and used the network setup method. I then edited my VMware Single Port adapter. This enabled the DHCP. If you choose the automatic address setup (via DHCP) it should configure and give you a new IP address. I then was able to use this IP address to connect to my VM on the host. Now bteq and SQLA can logon to the VM database. I also found that VMnet0 is your bridged connection, however, my host isn't showing a VMnet0 at all... I wonder if this is an issue. So I'm investigating this further. I'm still unable to connect to the internet, but as long as I can connect to my VM, it'll suffice.
J Re:Connect to Teradata Virtual Machine Guest from Windows Host

Jo*** about 3 years ago

@Raymond Hey, Raymond thanks for all your help, but I fixed the problem. Within the Teradata Express VM, I opened YaST2 and used the network setup method. I then edited my VMware Single Port adapter. This enabled the DHCP. If you choose the automatic address setup (via DHCP) it should configure and give you a new IP address. I then was able to use this IP address to connect to my VM on the host. Now bteq and SQLA can logon to the VM database. I also found that VMnet0 is your bridged connection, however, my host isn't showing a VMnet0 at all... I wonder if this is an issue. So I'm investigating this further. I'm still unable to connect to the internet, but as long as I can connect to my VM, it'll suffice.

Ra*** about 3 years ago

@Joe The status shows your service is running correctly. If your can ping your VM that means it is probably something to do with the port number the service is using. For example, the firewall may be blocking traffic from/to the default port number 1025. Could you please double-check your firewall settings? The example was using NAT. Could you please try whether NAT works? If it works, then the problem is most likely to do with the port number. As I am not an expert in network, you may have to look into VM official documentations to find out details about it. I will also try the bridged network in my laptop to see whether it will work when I get home.
J Re:Connect to Teradata Virtual Machine Guest from Windows Host

Jo*** about 3 years ago

@Raymond Yes, I have tried it in NAT mode, and I still get that error about login in SQLA. I can connect on my VM and pingit on my WindowsOS. Right now my firewall is off, how can I check if the port is being blocked? Please also let me know if your bridged connection worked. Thanks

Ra*** about 3 years ago

@Joe The status shows your service is running correctly. If your can ping your VM that means it is probably something to do with the port number the service is using. For example, the firewall may be blocking traffic from/to the default port number 1025. Could you please double-check your firewall settings? The example was using NAT. Could you please try whether NAT works? If it works, then the problem is most likely to do with the port number. As I am not an expert in network, you may have to look into VM official documentations to find out details about it. I will also try the bridged network in my laptop to see whether it will work when I get home.
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 3 years ago

@Joe The status shows your service is running correctly. If your can ping your VM that means it is probably something to do with the port number the service is using. For example, the firewall may be blocking traffic from/to the default port number 1025. Could you please double-check your firewall settings? The example was using NAT. Could you please try whether NAT works? If it works, then the problem is most likely to do with the port number. As I am not an expert in network, you may have to look into VM official documentations to find out details about it. I will also try the bridged network in my laptop to see whether it will work when I get home.

Jo*** about 3 years ago

@Raymond Yes, I have tried that multiple times, but I still get PDE:RUN/STARTED and that DBS is 5: Logons are enabled. Like I said, on the Windows server I can ping my IP, but when I try to connect in BETQ or in SQLA I get errors.
J Re:Connect to Teradata Virtual Machine Guest from Windows Host

Jo*** about 3 years ago

@Raymond Yes, I have tried that multiple times, but I still get PDE:RUN/STARTED and that DBS is 5: Logons are enabled. Like I said, on the Windows server I can ping my IP, but when I try to connect in BETQ or in SQLA I get errors.

Ra*** about 3 years ago

@Joe Can you try the following command to start your service in VM? /etc/init.d/tpa start Could you please also parse the status of Teradata service if it cannot be started successfully? The command you can use to check service status is: pdestate –a
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 3 years ago

@Joe Can you try the following command to start your service in VM? /etc/init.d/tpa start Could you please also parse the status of Teradata service if it cannot be started successfully? The command you can use to check service status is: pdestate –a

Jo*** about 3 years ago

My windows OS can ping the IP for the VM. However, when I try to connect in windows through SQLA I can not get it to ping, and I get the login error... I realize you say that it is because the service has not started yet, but what does that mean? how can I establish the connection? I am also on a bridged connection.
J Re:Connect to Teradata Virtual Machine Guest from Windows Host

Jo*** about 3 years ago

My windows OS can ping the IP for the VM. However, when I try to connect in windows through SQLA I can not get it to ping, and I get the login error... I realize you say that it is because the service has not started yet, but what does that mean? how can I establish the connection? I am also on a bridged connection.
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 3 years ago

@Mihir I have not used Administrator Client but I assume you can use the same connection properties as you will use in SQL Assistant or Teradata Studio. Since .NET provider is working, the ODBC driver should also work. Cheers, Raymond

Mi*** about 3 years ago

Connected to Teradata Administrator As well, by Installing .NET Provider. Thank you!
M Re:Connect to Teradata Virtual Machine Guest from Windows Host

Mi*** about 3 years ago

Connected to Teradata Administrator As well, by Installing .NET Provider. Thank you!
M Re:Connect to Teradata Virtual Machine Guest from Windows Host

Mi*** about 3 years ago

Thanks a lot for this article.! Very much Helpful. but how to connect Teradata Administrator ? ODBC/.NET option not provided in Teradata administrator
R Re:Connect to Teradata Virtual Machine Guest from Windows Host

Ra*** about 3 years ago

@Unknown I am glad it helped you. I met those issues previously and found nothing useful to fix. So I then looked into a number of articles in Teradata and then finally fixed it and decided to summarize those details in my blog.

Un*** about 3 years ago

I have been stuck on making the odbc connection work from few days with Teradata VM and when i was just about to give up I finally found your post and finally it worked. Sigh....!! Thank you so much.
U Re:Connect to Teradata Virtual Machine Guest from Windows Host

Un*** about 3 years ago

I have been stuck on making the odbc connection work from few days with Teradata VM and when i was just about to give up I finally found your post and finally it worked. Sigh....!! Thank you so much.
U Re:Connect to Teradata Virtual Machine Guest from Windows Host

Un*** about 3 years ago

you are a savior. Most useful information no where to found.