|
|
Archives of the TeradataForum
Message Posted: Thu, 23 Sep 2004 @ 18:49:04 GMT
Subj: | | Re: Peakspool reset for one user ? |
|
From: | | Simard Rudel |
We created this macro to update the peakspool for a user.
REPLACE MACRO SYSDBA.ClearPeakUser (p_user CHAR(30))
AS ( ECHO '.SET SEPARATOR 0';
ECHO '.SET FOLDLINE ON 1,2';
UPDATE DBC.Acctg SET CPU = 0, IO = 0 WHERE UserName = :p_user;
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';)
;
Rudel
| |