Skip to content

How to start Teradata database?

First check Teradata state and it should be Down/Hardstopped

Login to Teradata host (any node) and run below command:

# pdestate -a
PDE state: DOWN/HARDSTOP

Issue below command to start Teradata

# /etc/init.d/tpa start
Teradata Database Initiator service is starting…
Teradata Database Initiator service started successfully.

Wait until state is Run/Started. This is when Teradata database is ready for connections.

# pdestate -a
PDE state is RUN/STARTED.
DBS state is 4: Logons are enabled – Users are logged on

How to enable spool level compression in Teradata?

By default when teradata writes data into the spool (as part of some query) it is uncompressed as long as we dont have row level compression on the base tables. If row level compression is on then only those rows are written compressed on the spool as others are not. Because of thisyou may frequently see your queries running out of spool when creating huge temp tables.

Below are the steps as how you can enable data compression in spool for all the temp tables. Definitely this will have little overhead because of one additional step that teradat have to do.

To make this changes follow below steps:

1) Login to teradata host

2) Connect to dbscontrol utility by running “dbscontrol” command

# dbscontrol

_______
| | |
| ___ __ ____ | ____ __|__ ____
| / |/ \ ____| ____| ____| | ____|
| — | / | / | / | | / |
| \___ | \____| \____| \____| |__ \____|

Release 15.00.01.03 Version 15.00.01.03
DBSControl Utility (Dec 99)

The current DBS Control GDO has been read.

Enter a command, HELP, or QUIT:

3) Run command “display compress” or “d compress” and look for row number 3

Enter a command, HELP, or QUIT:
display compress

DBS Control Record – Compression (Block Level) Fields:

…..
3. CompressSpoolDBs = NEVER (ALWAYS, NEVER, IFNOTCACHED)
…..

4) Now to change this parameter to ALWAYS run command “modify compress 3=ALWAYS”

Enter a command, HELP, or QUIT:
modify compress 3=ALWAYS

The CompressSpoolDBs field has been modified to IFNOTCACHED
NOTE: This change will become effective after the DBS Control Record
has been written.

5) Run “write” command to save this setting. Teradata restart is not required.

Enter a command, HELP, or QUIT:
write

Locking the DBS Control GDO…
Updating the DBS Control GDO…

6) Run command “display compress” or “d compress” and look for row number 3. You will see its changed.

Enter a command, HELP, or QUIT:
display compress

DBS Control Record – Compression (Block Level) Fields:

…..
3. CompressSpoolDBs = ALWAYS (ALWAYS, NEVER, IFNOTCACHED)
…..