Site icon Database Tutorials

How To Start and Stop Teradata Database

 

There can be different scenario’s where Teradata database needs to be stopped and started by database administrator or the database restarted automatically. So there are basically two types of restarts:

  1. Scheduled restarts : User may input command to bring the database down for maintenance or software patch upgrades and bring it up and running once activity complete.
  2. Unscheduled restarts : System reboots automatically without user input. This may happen due to different reasons like power failure, hardware failure etc.

In both the cases, database administrator needs to execute commands to check the status of the system and take appropriate actions depending on its current state.

This can be done by using below command:

 

1) If the teradata is already in ruuning state the the following message will be displayed:

PDE state is RUN/STARTED.
DBS state is 5: Logons are enabled – The system is quiescent

2) If the teradata in not in running state than either of the following messages will be dispayed:

a) PDE state is STOP/KILLTASKS – indicates database has been intentionally stopped due to some reason.
b) PDE state is DOWN/HARDSTOP  — indicates system is halted due to some problem instead of controlled shutdown

 

User-initiated/Scheduled restarts

If you want to stop the Teradata database due to some reason like software patch upgrade, then use the below command:

 

Now check its current state to make sure that database is down.

 

Now, once the schedule activity is completed, the Teradata Database needs to be started using below command:

 

Automatic/Unscheduled Restarts

If database is halted due to some problem and current pdestate is DOWN/HARDSTOP. Should you bring back the teradata database up and running, use the below command:

 

If still the pdestate is like DOWN/HARD/KILLTASK than you can troubleshoot the problem by checking the log file by using the following command:

Debug the problem as per the log message and do another tpa start and check the pdestate if it started running.

You will get a below error in the end.

#PdeMain NOT started, PANIC-LOOP-DETECTED.

Please delete file “/var/opt/teradata/tdtemp/PanicLoopDetected“, after resolving the panic issue.

Remove the file PanicLoopDetected using below command:

 

Now start the teradata database again using:

 

The issue will be resolve hopefully.

You can also check the storage using :

You will get message something like.

Unable to open TVSA file /etc/opt/teradata/tdconfig/tvsa_data for reading.
Error getting TVSA system-id from /tvsa_data file. But will continue to verify Pdisks.

All pdisks on this node verified.

If all the nodes on the system are not getting verified then troubleshoot the problem as per the error message generated after verifying pdisks.

 

The various start up level of pdestate you can see after submitting the pdestate -a commands are:

1) #pdestate -a
PDE state is START/RECONCILE.

2) #pdestate -a
PDE state is START/STARTTPA.

3) #pdestate -a
PDE state is RUN/STARTED.
DBS state is 1/5: DBS Startup – Voting for Transaction Recovery

4) #pdestate -a
PDE state is RUN/STARTED.
DBS state is 1/4: DBS Startup – Starting PE Partitions

5) #pdestate -a
PDE state is RUN/STARTED.
DBS state is 5: Logons are enabled – The system is quiescent

 

Tracking Restarts

To check the restart that have occurred in the past:

  1. “tpatrace” command can be used to see information about restarts. For example “#tpatrace 5” show last 5 restart information.
  2.  DBC.Software_Event_LogV view can be used to view past restarts.

Exit mobile version