DATABASE RECOVER Command | unityadmin | Teradata Unity - DATABASE RECOVER - Continuous Availability - Teradata Unity

Teradata® Unity™ User Guide

Product
Continuous Availability
Teradata Unity
Release Number
17.00
Published
September 2020
Language
English (United States)
Last Update
2020-09-15
dita:mapPath
fmz1594836948704.ditamap
dita:ditavalPath
qqk1595871525984.ditaval
dita:id
B035-2520
Product Category
Analytical Ecosystem

Purpose

Changes the state of all tables in the specified database from Interrupted, Read-only or Out-of-service to Active.

Syntax

DATABASE RECOVER {<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

This command sets the state of all tables Read-only or Out-of-service in the specified database and systems to Restore. If the table cannot recover successfully due to a transient error, then the table remains in Interrupted state, which raises an alert.

After resolving the error, retry the recovery. If Unity cannot successfully recover the table due to data consistency issues, then the table enters Unrecoverable state. The command operation replays the Recovery Log to bring the Teradata Database server or table from Out of Service, Interrupted, or Read Only state to Active state without requiring manual intervention to restore the data. If the recovery operation is unsuccessful, the Teradata Database system or table becomes Interrupted or Unrecoverable based on the error returned.

Running this operation on a Teradata Database system places each table in that Teradata Database system from Out of Service or Interrupted into Restore state. When attempted at the system level, the system completes recovery within a short period while tables on the system continue recovery at an individual level. As each table completes recovery successfully, it becomes ACTIVE and accessible for client transactions.

Example

The following example shows how to recover a Teradata Database system with TDPID.
unityadmin> database recover dbtest on db1;
Operation Number : 543
Operation Name   : Recover database
User             : admin
User Name        : Main Administration User
Start Time       : 01/21 08:53:20
Systems:
    [1] db1
Updates:
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl1
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl2
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl3
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl4
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl5
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl6
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl7
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl8
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl9
    01/21 08:53:20 [-] Info: Recovering table dbtest.dblvl10
    01/21 08:53:20 [-] Info: Successfully started recovery for table on 1 systems
    01/21 08:53:20 [-] Info: Operation finished
Status      : Finished (1)
Finish Time : 01/21 08:53:20
Systems:
    [1] db1 - Finished (1)