Ok, using sp_helplogins gets me a lot closer for what I was looking to do. Basically, I've written a front end that needs to check all of the existing dbases on the server to generate a list of what they should 'see.'
Reading through the sp_helplogins stored procedure though, I've noticed that only sysadmins can run this, and the stored procedure creates several temporary tables to store the table before returning the results.
Is there a way to structure this using only the sysdatabases for a dblist, and somehow looping through each database to determine the roles / users who have access?
Don't have the time to look at it in detail now (holiday!!! Sorry!!!) but if you take the SP apart, then guess you could insert the second half of the SP into a temp table and link to sysdatabases so it only returns system DBs then return all the values from the temp table. I'm back in 2 weeks, so if you still have probs, will get back to you then!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.