|
|
Archives of the TeradataForum
Message Posted: Fri, 30 Mar 2001 @ 13:05:10 GMT
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
| |