16.20 - FallBack_DB - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ SystemFE Macros

prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
created_date
March 2019
category
Administration
featnum
B035-1103-162K
REPLACE MACRO SystemFE.FallBack_DB (DBName (Char(30))) AS
(
echo 'set defaults;';
echo 'set format on;';
echo 'set width 82;';
echo 'set NULL as "-";';
echo 'set separator 2;';
echo 'set pagelength 60;';
echo 'set suppress on 1;';
echo 'set heading "&DATE||FallBack Tables In Database &1||&TIME";';
Select    DBC.AllSpace.DataBaseName
          (Title 'DataBase', Format 'X(30)')
        , DBC.AllSpace.TableName        (Title 'Table')
        , Sum(CurrentPerm)  (Title 'Bytes')
From      DBC.AllSpace, DBC.Tables
Where     DBC.AllSpace.Databasename = :DBName
And       DBC.Allspace.Databasename = DBC.Tables.Databasename
And       DBC.Allspace.Tablename    = DBC.Tables.Tablename
And       DBC.Tables.ProtectionType = 'F'
Order By  1,2
Group By  1,2;
echo 'set defaults;';
);