Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SQL Server Documentor Expand / Collapse
Author
Message
Posted Tuesday, October 16, 2012 3:38 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 11:08 AM
Points: 316, Visits: 1,117
Comments posted to this topic are about the item SQL Server Documentor


Post #1373554
Posted Monday, November 19, 2012 11:20 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Yesterday @ 10:34 AM
Points: 105, Visits: 948
Rudy,

Thanks for sharing this excellent script. I ran into one small issue and got this error:

Msg 15281, Level 16, State 1, Procedure sysmail_help_status_sp, Line 0
SQL Server blocked access to procedure 'dbo.sysmail_help_status_sp' of component 'Database Mail XPs' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Database Mail XPs' by using sp_configure. For more information about enabling 'Database Mail XPs', see "Surface Area Configuration" in SQL Server Books Online.

This was because Database Mail was not enabled.

I corrected this by adding a simple IF statement around the INSERT statement. So it went from this:

CREATE TABLE #Database_Mail_Details
(Status NVARCHAR(7))
INSERT INTO #Database_Mail_Details (Status)
Exec msdb.dbo.sysmail_help_status_sp

To this:

CREATE TABLE #Database_Mail_Details
(Status NVARCHAR(7))

IF EXISTS(SELECT * FROM master.sys.configurations WHERE configuration_id = 16386 AND value_in_use =1)
BEGIN
INSERT INTO #Database_Mail_Details (Status)
Exec msdb.dbo.sysmail_help_status_sp
END


You also had the the outputs for Section 7 (Last Backup Dates) and section 8 (List of SQL Jobs) reversed.

Thanks again for taking the time to share this script.

Lee
Post #1386514
Posted Monday, November 19, 2012 12:43 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 11:08 AM
Points: 316, Visits: 1,117
Hello Lee,

Thanks for the update. Sorry about that, it not always easy to get real testing for scripts.

Glad you like it :)

Rudy



Post #1386544
Posted Tuesday, November 20, 2012 12:22 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, October 28, 2014 9:20 AM
Points: 164, Visits: 509
Great script. I noticed not all of my databases were showing under --> Database(s) Details <--. The join is using name and several of my databases have logical names that don't match the actual database name.

I changed the join condition to use database_id and filtered out the extra rows by looking only for the primary file.

--> Database(s) Details <--
SELECT...

INTO #Databases_Details
FROM SYS.DATABASES D
INNER JOIN sys.master_files S
ON D.database_id= S.database_id
WHERE s.file_id = 1
Post #1387106
Posted Tuesday, November 27, 2012 12:48 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 11:08 AM
Points: 316, Visits: 1,117
Thanks again to everyone for the improvements

Rudy



Post #1389383
Posted Tuesday, December 11, 2012 2:53 PM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Today @ 7:30 AM
Points: 737, Visits: 5,449
Just gave this a try, and love it!

Did notice one quirk though.
Section 7) Last backup dates and section 8) List of SQL jobs are flip-flopped.
Section 7 claims to be the last backup dates, but instead gives the list of SQL Jobs, and 8) gives the list of Last backup dates.

Jason
Post #1395336
Posted Wednesday, December 12, 2012 6:48 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Tuesday, October 7, 2014 11:08 AM
Points: 316, Visits: 1,117
Hello Everyone,

I have just updated the script to have the 7) and 8) comments reversed. Sorry about that and the delays to get it corrected. The update should be on the site soon.

Thanks,

Rudy



Post #1395644
Posted Tuesday, December 25, 2012 10:22 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Wednesday, September 24, 2014 10:22 AM
Points: 26, Visits: 402
hi
very good script
Post #1400143
Posted Wednesday, January 2, 2013 6:43 PM


Hall of Fame

Hall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of FameHall of Fame

Group: General Forum Members
Last Login: 2 days ago @ 12:24 PM
Points: 3,384, Visits: 2,017
Nice script Rudy. Thanks to Lee and WDolby for their recommended fixes too.
Post #1402141
Posted Thursday, July 11, 2013 11:39 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, March 24, 2014 12:05 PM
Points: 9, Visits: 241
I just now (7/11/13) saw your post "The SQL Doumenter". There are lots of posts that are nice, but this one looks genuinely useful. It looks like you put a lot of work into this. Thank you. -David Shink, Oracle, and lately, SQL Server DBA.
Post #1472724
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse