Teradata Database using notes (1)--teradata installation

Source: Internet
Author: User
Tags driver manager table name

Operating system: Windows 7 a Teradata installation 1.1 Teradata Installation

Source: https://www.w3cschool.cn/teradata/teradata_installation.html

The Teradata website provides the installed Teradata Database VMware virtual machine files. Download run Teradata database, first need to install VMWare Workstation player.

VMWare Workstation Download Address: https://my.vmware.com/web/vmware/downloads

Teradata Database VM version (64-bit) Download address: Http://downloads.teradata.com/download/database/teradata-express-for-vmware-player

Step 1: After the installation is complete VMware, open the VMware client and select "Open Virtual Machine". Browse for the extracted Teradata VMware folder and select the file with the. vmdk extension.

Step 2: Click "Play Virtual Machine" to start the virtual machine.

Step 3: After successful startup, enter the user name as root, username and password are "root".

Step 4: Virtual machine system interface as shown in the figure below, double click on "Gnome Terminal" or right-click and select "Open in Terminal" to open the shell.

Step 5: In the shell, enter the command "/ETC/INIT.D/TPA start" + ENTER to start the Teradata server.
1.2 Teradata Basic notes data types supported by 1.2.1


SQL command Classification in 1.2.2 Teradata

Like the standard Ansi-sql, Teradata's SQL commands fall into the following categories:

Source: http://www.w3school.com.cn/sql/index.asp

(1) Data definition language (ddl,data definition Language)

SQL statements function
CREATE Define new tables, views, macros, indexes, triggers, and stored procedures
DROP Delete tables, views, macros, indexes, triggers, and stored procedures
Alter Table structure and the adjustment of protection mechanism


/* Example 1 *
/CREATE table name
(
column name 1 data type, column name 2 data type,
column name 3 data type,
...
)

/* Example 2 */
DROP table name;
DROP database name;
/* Delete Only the data in the table */
TRUNCATE table name/

* Example 3 */
ALTER table table_name ADD column_name datatype;
ALTER TABLE table_name DROP COLUMN column_name;
ALTER TABLE TABLE_NAME ALTER COLUMN COLUMN_NAME datatype;

(2) Data manipulation language (Dml,data manipulation Language)

SQL statements function
SELECT Perform relational query operations (selection, projection, joins, merges, intersections, etc.)
INSERT Insert a new record into the table
UPDATE To modify the values of a record in a table
DELETE Delete the records specified in the table


/* Example 1 *
/INSERT into table name values (value 1, value 2,....);
INSERT into table_name (column 1, column 2,...) Values (value 1, value 2,....)

/* Example 2 */
UPDATE table name SET column name = new value WHERE column name = value;

/* Example 3 */
DELETE from table name WHERE column name = value;

(3) Data Control statements (Dcl,data controls Language)

SQL statements function
GRANT Grant a user permission for a certain type of privilege
REVOKE Remove a user's permissions
GIVE Transfer User ownership relationships


/* Example 1: Assign the Testbase SELECT permission to testuser and transitive permissions */
Grant Select on Testbase to testuser with GRANT option;

/* Example 2: Remove TestUser SELECT permission to Testbase */
 Revoke select on Testbase from TestUser;

/* Example 3: Transfer ownership of the current user to Testbase to TestUser */
Two database client 2.1 Start Bteq

The Bteq utility is used to interactively submit SQL queries.

Step 1: Enter the command "Ifconfig" and note the IP address of VMWare.

Step 2: Enter the command "Bteq" and run the Bteq.

Step 3: Enter the command "logon 192.168.11.104/dbc;" +enter, enter "DBC" + Enter at Password and log in to Bteq.

Step 4: Enter "exit;" +enter, Exit Bteq. 2.2 Launch Teradata Studio Express

Teradata Studio Express is the desktop client program that Teradata provides in the system.
Step 1: Double-click the Teradata Studio Express System desktop icon.

Step 2: After the program starts, enter the password "DBC", login the program. 2.3 connecting Teradata via Dbvisualize

Step 1: Double-click to open the installed dbvisualize.

Step 2: Select "Tools", "Driver Manager" in the menu bar. In the pop-up window, select "Driver", "Create Driver".

Step 3: Enter the relevant information in the appropriate location on the right side of the window, as shown in the following illustration:

Step 4: Create a new Teradata connection.
RELATED Links:

Teradata Database using notes (1) –teradata installation
Teradata Use Notes (2) – Database operations

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.