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:
- 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.
- 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 | # pdestate -a |
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:
1 2 3 4 | #tpareset -x {comments } --- comments show the reason to bring down the database later if someone needs to know the cause for database down. <em>You are about to shutdown the database</em> <em>on the system </em><em>'<systemname>'</em> <em>Do you wish to continue (default: n) [y,n] y</em> |
Now check its current state to make sure that database is down.
1 2 | #pdestate -a PDE state is STOP/KILLTASKS |
Now, once the schedule activity is completed, the Teradata Database needs to be started using below command:
1 2 3 | #/etc/init.d/tpa start <em>Teradata Database Initiator service is starting...</em> <em>Teradata Database Initiator service started successfully.</em> |
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:
1 2 3 4 | # tpareset -f You are about to restart the database on the system '<systemname>' Do you wish to continue (default: n) [y,n] y |
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.
1 | tail /var/log/messages |
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:
1 | rm /var/opt/teradata/tdtemp/PanicLoopDetected |
Now start the teradata database again using:
1 | service tpa start or /etc/init.d/tpa start |
1 2 3 | #pdestate -a PDE state is RUN/STARTED. DBS state is 5: Logons are enabled - The system is quiescent |
The issue will be resolve hopefully.
You can also check the storage using :
1 | #verify_pdisks |
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:
- “tpatrace” command can be used to see information about restarts. For example “
#tpatrace 5
” show last 5 restart information. - DBC.Software_Event_LogV view can be used to view past restarts.
guys do one thing go to the up left corner there is player option click on it then go to manage then go to virtual machine setting and select NAT instead of bridge then press ok .After that open the genome terminal and chk the state if its showing down/hardstop run /etc/init.d/tpa start
This worked! Thank you Sir!