Of Interest
Business Intelligence and Analytics
Oracle Training
|
Sybase
»
Administration
»
Security
»
Utilities
Show Users / Logins with Access to the Database
This handy procedure will display users in the current database .. in
addition to aliases defined.
create proc sp_users as
select 'user:' 'Type', t1.suid, t1.name 'dbuser', t2.name
from sysusers t1, master..syslogins t2
where t2.suid=*t1.suid
union
select 'alias:' 'Type', t1.suid, ' ' 'dbuser', t2.name
from sysalternates t1, master..syslogins t2
where t2.suid=*t1.suid
order by 2
return
|
|
|
Get the latest Rocket99 news and tech tips via
|