SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Use SQL-DMO and Excel to Quickly Create Reports for Auditors


Use SQL-DMO and Excel to Quickly Create Reports for Auditors

Author
Message
cmille19
cmille19
SSC Eights!
SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)

Group: General Forum Members
Points: 937 Visits: 725
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/cmiller/usesqldmoandexceltoquicklycreatereportsforauditors.asp



SeekQuel
SeekQuel
SSC-Addicted
SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)SSC-Addicted (470 reputation)

Group: General Forum Members
Points: 470 Visits: 7

Excellent!

First time I see an easy to understand and very useful SQL DMO example.

Congratulations,

Geert





Alastair Browne
Alastair Browne
SSC Rookie
SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)SSC Rookie (25 reputation)

Group: General Forum Members
Points: 25 Visits: 4

Very good concept, but unfortunately as always, I can never get VBA script to work :-(

When I have time, I may try to do the same thing using .NET, C# and Office Interop Libraries.

Alastair


Kevin Jones
Kevin Jones
Grasshopper
Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)Grasshopper (24 reputation)

Group: General Forum Members
Points: 24 Visits: 3

Incredibly powerful! Thank you for the great example. Awesome stuff!

Kevin


ipTomN
ipTomN
SSC Journeyman
SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)SSC Journeyman (90 reputation)

Group: General Forum Members
Points: 90 Visits: 690

Simple and elegant.

This one worked for me straigt from the 'box'.

Tom





John-79567
John-79567
Old Hand
Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)Old Hand (358 reputation)

Group: General Forum Members
Points: 358 Visits: 298
i keep getting a server doesnt exist or access denied error. I triple checked the server name and verified my nt account has SA privs. Maybe im doing something wrong.



andrewkane17
andrewkane17
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1259 Visits: 3263
I am having message server does not exist. Any tips on what I am doing wrong would be appreciated.



cmille19
cmille19
SSC Eights!
SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)SSC Eights! (937 reputation)

Group: General Forum Members
Points: 937 Visits: 725

Have you followed the instructions on the helptab of the worksheet? The config tab contains the following entries in column A, all of which need to be deleted (including List your SQL Server HERE) and replaced with the SQL Server names in you environment:

List your SQL Server HERE
SQLPRD1
SQLPRD2
SQLPRD3

The VBA code loops through the list of server specified in on the config tab column A (Column A is a named Excel Range "Server").





andrewkane17
andrewkane17
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1259 Visits: 3263

DOH!

Thanks cmille19, should have actualy used my brain on this. Working like a charm now.





Omri Bahat-228920
Omri Bahat-228920
SSC-Enthusiastic
SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)SSC-Enthusiastic (102 reputation)

Group: General Forum Members
Points: 102 Visits: 21
The example you provided is great. One comment though- the same goal can be achieved without any development efforts by running simple SQL queries on all databases and servers in parallel and returning aggregated results from all queried databases, by using tools such as SQL Farm Combine.

The SQL-DMO code is good, however it runs serially and it can take quite some time for results to return, especially if you extend the example to return larger result sets, or retrieve data from a large number of databases and servers.

Editor's Note: : Dr. Omri Bahat works for SQLFarms, a software vendor of SQL Server tools.

Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search