Query equivalent to SQL 2008

  • Hello,

    I have following query which is in SQL 200.

    I would like to use in SQL 2008. Though it will use in SQL 2008 due to backward compatibility but it is deprecated feature.

    Please let me know the equivalent query in SQL 2008 using latest system view:

    SELECT *

    FROM sysusers u,

    sysusers g,

    sysmembers m

    WHERE g.uid = m.groupuid

    AND g.issqlrole = 1

    AND u.uid = m.memberuid

    Thanks in advance.

    Thanks

  • I believe the DMVs you need are sys.database_principals and sys.role_members

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply