SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Classes
About Us
Login / Register
Subscribe RSS Feed 

Download a free trial of SQL Backup now

Enumerate SQL Server Databases using SMO

As a DBA it's common to need to loop through all databases on a server to apply a change or check a setting - perhaps making sure that auto shrink is not on. Lots of ways to do the loop, but one way is to use SQL Management Objects (SMO) and you may find it to be a surprisingly elegant approach. Watch this short video to learn the basics of the loop, see Tim's profile for a ton of other content on SMO.

Duration:
3 mins 24 secs
Skill Level:
200
Rating:
4.27 out of 5
Publish Date:
September 09, 2008
Enumerate SQL Server Databases using SMO Watch Video Now  Watch it later!
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Tim Mitchell
Tim Mitchell is a Microsoft SQL Server database developer, business intelligence consultant, writer, and speaker. He has been working professionally with SQL Server for over six years, and holds the MCTS and MCDBA certifications from Microsoft as well as a Bachelor's degree in computer science from Texas A&M University - Commerce.

References



Comments
Jay on 6/30/2009
Broken link to code http://www.jumpstarttv.com/references/smo/Enumerate_SQL_Server_Databases_using_SMO.zip

dun on 6/30/2009
Did you need to use a foreach for databases? Why not use the same databinding method for databases as you did with the servers?

Gerry Doan on 6/30/2009
nice - succinct and useful exposition.

Ahmad Elayyan on 7/1/2009
very good

Dan on 7/1/2009
Very Cool!

Jamshid Nouri on 7/1/2009
great video

Chris Rock on 7/1/2009
The link to the code is fixed.

Dipak Saha on 7/2/2009
Great topic.



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions