Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 28 Jun 2007 @ 15:11:38 GMT


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


Subj:   Re: Question about Revoke/disable LOGON
 
From:   Hanson, Robert

I use two BTEQ scripts to control the revoke and grant of logons. I run the revoke script prior to any backups or maintenance and run the grant script when the backups or maintenance are complete.

They are as follows:

     .logon tdampfe3/sysdba,xxx

     .os erase prod_revoke.out

     .export report file=prod_revoke.out

     .set titledashes off

     select 'revoke logon on all from '||trim(databasenamei)||';' (title '')
     from dbc.dbase
     where databasenamei not in
     ('dbc','crashdumps','all','default','dbcmanager','sysdba','systemfe','co
     nsole','public')
     and databasenamei not like 'arcuser%'
     and databasename not like 'bardba%'
     and rowtype = 'u'
     order by databasenamei;

     .export reset

     .run file=prod_revoke.out

     .logoff

     .quit

     .logon tdampfe3/sysdba,xxx

     .os erase prod_grant.out

     .export report file=prod_grant.out

     .set titledashes off

     select 'grant logon on all to '||trim(databasenamei)||';' (title '')
     from dbc.dbase
     where databasenamei not in
     ('dbc','crashdumps','all','default','dbcmanager','sysdba','systemfe','co
     nsole','public')
     and databasenamei not like 'arcuser%'
     and databasename not like 'bardba%'
     and rowtype = 'u'
     order by databasenamei;

     .export reset

     .run file=prod_grant.out

     .logoff

     .quit


     
  <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: 15 Jun 2023