February 25, 2012 at 11:37 am
Comments posted to this topic are about the item Get SQL Server Login Information
February 27, 2012 at 4:46 am
It doesnt run??
February 27, 2012 at 8:47 am
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.
Jim
February 28, 2012 at 7:06 am
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 ?
Thank you.
March 6, 2012 at 12:37 am
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:
http://msdn.microsoft.com/en-us/library/bb522537.aspx
http://www.codeproject.com/Articles/14401/How-to-Schedule-and-Run-a-SSIS-package-DTS-Job-in
http://www.simple-talk.com/sql/ssis/adding-the-script-task-to-your-ssis-packages/
June 25, 2012 at 5:14 pm
Mahmood.BilalB (2/25/2012)
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
July 2, 2012 at 12:12 pm
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:
change....
select @sql = 'use ' + @dbname + ' ' + 'exec sp_helprolemember'
to.....
select @sql = 'use [' + @dbname + '] ' + 'exec sp_helprolemember'
GREAT code otherwise and thank you very much!
July 3, 2012 at 5:29 pm
Many thanks 🙂
/* Below is the well written topic to generate SQL Server Logins with hex passwords
http://support.microsoft.com/kb/918992 */
Regards,
Bilal
May 11, 2016 at 7:12 am
Thanks for the script.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply