• I used the examples and figured it out. We start with

    sp_MSForeachdb 'put select statement here' and it works

    It gives a result for each database so since the instance has 26 database including system it will have that many resuts.

    The other trick is that if the select statement you are using has quotation marks you replace them with brackes [...]

    Example would be

    Original Select query:

    SELECT p.name 'User', r.name 'Role'

    FROM sys.database_principals p, sys.database_principals r, sys.database_role_members m

    WHERE p.principal_id = m.member_principal_id

    AND r.principal_id = m.role_principal_id

    AND m.role_principal_id = 16384

    ORDER BY r.name, p.name

    Modified Select Query with the SP:

    sp_MSForeachdb 'SELECT p.name [User], r.name [Role]

    FROM sys.database_principals p, sys.database_principals r, sys.database_role_members m

    WHERE p.principal_id = m.member_principal_id

    AND r.principal_id = m.role_principal_id

    AND m.role_principal_id = 16384

    ORDER BY r.name, p.name'

    Thanks for the help.

    Jeff