Home > SQL > Get user and role on MSSQL 2008

Get user and role on MSSQL 2008


select NAMA,PASS,p.STATUS,KD_JUR,su.uid,sm.memberuid,sm.groupuid,sg.name from pmb_x p
join sys.sysusers su on p.NAMA=su.name
join sys.sysmembers sm on su.uid=sm.memberuid
join sys.sysusers sg on sm.groupuid=sg.gid
order by su.uid
Categories: SQL Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: