If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > User's with DDL Privileges

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 01-22-10, 11:14
vineelaregonda vineelaregonda is offline
Registered User
 
Join Date: May 2009
Posts: 43
User's with DDL Privileges

Hi,

I am trying to get the list of non-dba accounts who have DDL privileges on user objects. I wrote the below query but seems some thing wrong.

Please corret the below query.



select distinct ltrim(rtrim(@@servername))+","+a.name+","+object_n ame(b.id)+","+"Non DBAs in $db with DDL privileges" from sysusers a, sysprotects b
where b.action in (select number from master.dbo.spt_values where type='T' and number between 198 and 355)
and a.gid=b.uid
and a.name like "f[0-9][0-9]%" OR name like "c[0-9][0-9]%"
and a.name not in('dba','dbasup','prddba','sa','sybqstcp','c07569 ','c23428','c23618','c23622','f163614','f201197',' f228454','f254567')

Revert me as soon as possible.

Thanks
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On