Comments posted to this topic are about the item Get SQL Server Login Information
It doesnt run??
For some reason, when I copy and paste from the SQLServerCentral code boxes, I get unprintable (and unacceptable) characters in place of leading spaces on many lines. I just paste the code into Notepad, select one of the unprintable characters (they show up as little rectangles in Notepad), and replace all with spaces. Works perfectly.
Can help us with a script that can run as a Monthly Job & the output or result shows ALL Logins [Windows & SQL] information (i.e. each login's server role and any associated database role - manier times database roles are multiple for each login) that can be emailed automatically to a bunch of email addresses ?
Yes you can create a SSIS package for your requirements. use Execute task run the Get Login Script and then Script Task to send emails. after creating package create a SQL job to run it weekly/monthly.
Some useful links:
Comments posted to this topic are about the item <A HREF="/scripts/SQL+Server+Logins/88081/">Get SQL Server Login Information</A>
thanks it really helped
This is awesome except for one thing....
It seems that databases with a dash "-" in the name are being truncated. The name is selected in to @dbname but when it is inserted in to @sql it doesn't have the whole name in there. I made a very small change that fixes the issue. The db name should be bracketed. The edit is as follows:
select @sql = 'use ' + @dbname + ' ' + 'exec sp_helprolemember'
select @sql = 'use [' + @dbname + '] ' + 'exec sp_helprolemember'
GREAT code otherwise and thank you very much!
Many thanks 🙂
/* Below is the well written topic to generate SQL Server Logins with hex passwords
Thanks for the script.
Viewing 9 posts - 1 through 8 (of 8 total)