Archives of the TeradataForum
Message Posted: Tue, 07 Dec 2010 @ 09:59:32 GMT
Subj: | | Re: Cloning SYSDBA user |
|
From: | | Maccha Narayana Rao Naidu |
HI
The Best way to do that is you can generate a dynamic query which will list all the user and database privilege for SYSDBA and then grant it to
a new Role may be called as VACATION_ADMIN_ROLE...:-) and then you can grant that role and revoke it any time. Also by checking the result of
dynamic query you will also get a chance to validate what privileges you are providing to the new DBA.
Sample (NOT TESTED) Dynamic query is as below you can edit it as suitable
select 'grant '|| trim(b.ARDESC)||' on '||trim(a.databasename)||'_31' || '
to '||a.rolename||' ;' (title '')
from dbc.allrolerights a
inner join sysdba.AR_DECODE /* Table which decode access right */ b
on a.accessright = b.accessright
inner join dbc.roles c
on a.rolename = c.rolename
where (a.databasename='SYSDBA'
or a.databasename in (select child from dbc.children where
parent='SYSDBA')
)
Thanks
N.Maccha
|