Setting up the Teradata Development Environment¶
- Download Teradata Express for the version you would like to test against.
- Extract the archive file with 7zip
If you have VMware Player or Workstation, you can import this virtual machine and use it immediately.
Importing using VirtualBox¶
If you don’t have VMware Player or Workstation, or prefer to use VirtualBox, you can complete the following steps:
Open VirtualBox and create a new virtual machine.
Name the virtual machine, set the type to
Linux
, and version toopenSUSE (64-bit)
. Click “Continue”.Set the virtual machine to a minimum of 4096MB of memory. Click “Continue”.
Select “Do not add a virtual hard disk”, and click “Create”.
A warning will pop up about creating a virtual machine without a hard disk. Click “Continue”.
Select your newly created virtual machine, and open “Settings”.
In the “Storage” tab, select the “Controller: IDE”, and add a hard disk.
For each of the three extracted disk files (with .vmdk file extension), do the following:
- A window will appear, asking if you want to select an existing disk. Click “Choose existing disk”.
- A new window will appear with a list of hard disks. Click “Add”.
- Navigate to the location where you extracted Teradata Express, and select any one of the three disks.
- Click “Open”. The disk file should now appear in the list of “Not Attached” disks.
- Select the disk that you just imported. Click “Choose”.
Once you’ve added all three virtual hard disks, choose the “Network” tab.
Open the Advanced settings, and click on “Port Forwarding”.
Add a new port forward for the database connection
- Click “Add Rule”, it should be an icon including a green plus.
- Name the rule “Teradata JDBC”
- The “Host Port” should be
1025
- The “Guest Port” should be
1025
Optionally, add a port forward for SSH access
- Click “Add Rule”.
- Name the rule “SSH”
- The “Host Port” should be
2222
- The “Guest Port” should be
22
.
Note
You will be able to SSH into the running machine with
ssh root@localhost -p 2222
with passwordroot
.Click OK to exit the port forwarding window, and then click OK to exit the settings window.
Click Start to start your virtual machine (usually takes 2-5 minutes). After your machine becomes operable through the terminal, the database initializes.
You can now proceed with the remainder of the quick start, with the database running in the background.
Set Up Teradata Test Account¶
In your Teradata VM (or over SSH), start BTEQ and log in:
bteq .logon dbc dbc
Your output should resemble:
BTEQ 16.20.00.04 Tue Nov 5 18:03:15 2019 PID: 10393 +---------+---------+---------+---------+---------+---------+---------+---- .logon dbc *** Logon successfully completed. *** Teradata Database Release is 16.20.32.01 *** Teradata Database Version is 16.20.32.01 *** Transaction Semantics are BTET. *** Session Character Set Name is 'ASCII'. *** Total elapsed time was 1 second.
In the BTEQ command prompt, create another user
dev
with passworddev
and give them access to their databasedev
.CREATE USER dev AS PERM = 1000000000 BYTES PASSWORD = dev; GRANT ALL ON dev TO dev;
Your output should resemble:
CREATE USER dev AS PERM = 10000000 BYTES PASSWORD = dev; *** User has been created. *** Total elapsed time was 1 second. GRANT ALL ON dev TO dev; *** Grant accepted. *** Total elapsed time was 1 second.
Quit BTEQ:
.quit
Your output should resemble:
.quit *** You are now logged off from the DBC. *** Exiting BTEQ... *** RC (return code) = 0
Shutting down the Teradata Development Environment¶
When it’s time to shut down, you should stop the database gracefully, and power-off the VM:
Open the VM window, or SSH into the machine. You will need a root prompt to shut off the system.
Stop the database
/etc/init.d/tpa stop
Your output should resemble:
PDE stopped for TPA shutdown
Tip
You don’t have to wait for the database to shut off before continuing.
Shut down the virtual machine
poweroff