Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Fri, 30 Mar 2001 @ 13:05:10 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: ClearPeakDisk and PeakSpoolSpace
 
From:   Rudel Simard

I created 2 macros :

CLEARPEAK: generate the DML for initialisation to 0 peaks of current user

     REPLACE MACRO SYSDBA.ClearPeak
     AS  ( ECHO '.SET SEPARATOR 0';
           ECHO '.SET FOLDLINE ON 1,2';
           SELECT ' UPDATE DBC.DataBaseSpace ' (TITLE ''),
                  'SET PeakPermSpace = 0, PeakSpoolSpace = 0, PeakTempSpace = 0 ' (TITLE ''),
                  'WHERE DataBaseSpace.databaseid = '''(TITLE ''),
                   Dbase.databaseid (TITLE ''),
                   '''XB;' (TITLE '')
           FROM    DBC.Dbase
           WHERE   DBase.databasename = USER;
           ECHO '.SET SEPARATOR 1';
           ECHO '.SET FOLDLINE OFF';);

CLEARPEAKUSER: generate the DML for initialisation to 0 peaks of user in parameter

     REPLACE MACRO SYSDBA.ClearPeakUser (p_user  CHAR(30))
     AS  ( ECHO '.SET SEPARATOR 0';
           ECHO '.SET FOLDLINE ON 1,2';
           SELECT ' UPDATE DBC.DataBaseSpace ' (TITLE ''),
                  'SET PeakPermSpace = 0, PeakSpoolSpace = 0, PeakTempSpace = 0 ' (TITLE ''),
                  'WHERE DataBaseSpace.databaseid = '''(TITLE ''),
                   Dbase.databaseid (TITLE ''),
                   '''XB;' (TITLE '')
           FROM    DBC.Dbase
           WHERE   DBase.databasename = :p_user;
           ECHO '.SET SEPARATOR 1';
           ECHO '.SET FOLDLINE OFF';);

Hope this help,

Rudel Simard
Régie de l'assurance-maladie du Québec
DBA de l'environnement informationnel



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 27 Dec 2016