Purpose
Changes the state of all tables in the specified database from Active to Out-of-Service.
Syntax
DATABASE HALT{<database> [ON tdpid[,tdpid]]} [REASON 'reason'];
Parameters
- database
- Name of database holding tables currently in Unity Data Dictionary.
- tdpid
- Unique identifier (TDPID) of a Teradata Database system.
- reason
- Reason why the objects on the database need to change.
Usage Considerations
If a system is not specified when running this command, it sets ALL tables in the database to Out-of-Service on all systems, which is not usually correct. Specify a system to make the tables Out-of-Service on one system.
When running this command, Unity holds any new transactions/statements until all inflight transactions close for the object. The RecoveryCheckpointTimeout parameter determines the wait time. If in-flight transactions are not closed within the time limit, the operation aborts, an error displays, and the state returns to the state prior to the attempt.
Example
The following example shows how to halt a Teradata Database system.
unityadmin> database halt dbtest on db1; Operation Number : 541 Operation Name : Halt database User : admin User Name : Main Administration User Start Time : 01/21 08:50:32 Systems: [1] db1 Updates: 01/21 08:50:32 [-] Info: Requesting mgmt X lock on 'dbtest.dblvl1' 01/21 08:50:32 [-] Info: Mgmt X lock on 'dbtest.dblvl1' granted 01/21 08:50:32 [-] Info: Requesting mgmt X lock on 'dbtest.dblvl2' 01/21 08:50:32 [-] Info: Mgmt X lock on 'dbtest.dblvl2' granted 01/21 08:50:32 [-] Info: Requesting mgmt X lock on 'dbtest.dblvl3' 01/21 08:50:32 [-] Info: Mgmt X lock on 'dbtest.dblvl3' granted 01/21 08:50:32 [-] Info: Successfully halted table 'dbtest.dblvl1' on 1 systems 01/21 08:50:32 [-] Info: Successfully halted table 'dbtest.dblvl2' on 1 systems 01/21 08:50:32 [-] Info: Successfully halted table 'dbtest.dblvl3' on 1 systems 01/21 08:50:32 [-] Info: Successfully halted table 'dbtest.dblvl4' on 1 systems 01/21 08:50:32 [-] Info: Successfully halted table 'dbtest.dblvl5' on 1 systems 01/21 08:50:32 [-] Info: Operation finished 01/21 08:50:32 [-] Info: Releasing mgmt X lock on 'dbtest.dblvl1' 01/21 08:50:32 [-] Info: Releasing mgmt X lock on 'dbtest.dblvl2' 01/21 08:50:32 [-] Info: Releasing mgmt X lock on 'dbtest.dblvl3' 01/21 08:50:32 [-] Info: Releasing mgmt X lock on 'dbtest.dblvl4' 01/21 08:50:32 [-] Info: Releasing mgmt X lock on 'dbtest.dblvl5' Status : Finished (1) Finish Time : 01/21 08:50:32 Systems: [1] db1 - Finished (1)