<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://sqlblog.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Search results matching tags 'Speaking', 'SMO', and 'SQL Server 2008'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=Speaking,SMO,SQL+Server+2008&amp;orTags=0</link><description>Search results matching tags 'Speaking', 'SMO', and 'SQL Server 2008'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>PASS PowerShell/SQL Server PreCon</title><link>http://sqlblog.com/blogs/allen_white/archive/2010/08/19/pass-powershell-sql-server-precon.aspx</link><pubDate>Thu, 19 Aug 2010 19:17:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:28067</guid><dc:creator>AllenMWhite</dc:creator><description>&lt;p&gt;PowerShell is an amazing tool to help you automate your administrative processes.  There are a lot of books and online sources to help you learn PowerShell, but how do you learn how to use it with SQL Server?  Simple, just sign up for my PASS PreCon session.  Here's the outline:&lt;/p&gt;
&lt;p&gt;&lt;a&gt;Use PowerShell to Get the Most out of SQL Server&lt;/a&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Module 1: Introduction to PowerShell&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Cmdlets&lt;/li&gt;
	&lt;li&gt;Aliases&lt;/li&gt;
	&lt;li&gt;The Pipeline&lt;/li&gt;
	&lt;li&gt;Variables&lt;/li&gt;
	&lt;li&gt;Objects&lt;/li&gt;
	&lt;li&gt;Control Flow&lt;/li&gt;
	&lt;li&gt;Functions&lt;/li&gt;
	&lt;li&gt;Modules&lt;/li&gt;
	&lt;li&gt;Error Handling&lt;/li&gt;
	&lt;li&gt;Command-line Arguments&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 2: Introduction to SMO&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Introduction to the SMO Library&lt;/li&gt;
	&lt;li&gt;SQLPS.exe - The SQL Server Mini-Shell&lt;/li&gt;
	&lt;li&gt;The SMO Object Model&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 3: Backup and Recovery&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Backup&lt;/li&gt;
	&lt;li&gt;Restore&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 4: Automating &amp;amp; Maintaining Databases&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Automating Index Maintenance&lt;/li&gt;
	&lt;li&gt;Automating DBCC&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 5: Importing, Exporting and Transforming Data&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;ADO.NET&lt;/li&gt;
	&lt;li&gt;Invoke-SQLCMD&lt;/li&gt;
	&lt;li&gt;Importing and Exporting using CSV Files&lt;/li&gt;
	&lt;li&gt;Importing and Exporting using XML Files&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 6: Manipulating Database Objects&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Creating and Deleting Schemas&lt;/li&gt;
	&lt;li&gt;Creating, Modifying and Deleting Tables&lt;/li&gt;
	&lt;li&gt;Creating, Modifying and Deleting Triggers&lt;/li&gt;
	&lt;li&gt;Creating, Modifying and Deleting Indexes&lt;/li&gt;
	&lt;li&gt;Creating, Modifying and Deleting Views&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 7: Managing the Enterprise&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Registering Servers&lt;/li&gt;
	&lt;li&gt;Creating a Central Management Server&lt;/li&gt;
	&lt;li&gt;Connecting to a Central Management Server&lt;/li&gt;
	&lt;li&gt;Running Scripts Against Multiple Servers&lt;/li&gt;
	&lt;li&gt;Defining Policies for Policy-Based Management&lt;/li&gt;
	&lt;li&gt;Evaluating Policies for Policy-Based Management&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 8: Profiling and Monitoring SQL Server&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Gathering WMI Information&lt;/li&gt;
	&lt;li&gt;Gathering Performance Counters&lt;/li&gt;
	&lt;li&gt;Setting up a Server Side Trace&lt;/li&gt;
	&lt;li&gt;Monitor Log Growth&lt;/li&gt;
	&lt;/ul&gt;
&lt;li&gt;Module 9: Configuring and Tuning SQL Server&lt;/li&gt;
	&lt;ul&gt;
	&lt;li&gt;Setting Configuration Options&lt;/li&gt;
	&lt;li&gt;Setting Windows Mode or Mixed Mode&lt;/li&gt;
	&lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;As you can see, we're going to spend the first part of the day learning the basics of PowerShell, but the focus is on how you can manage your own environment using this powerful language, so you can spend your time solving problems instead of the constant point-and-click drudgery of typical DBA tasks.&lt;/p&gt;
&lt;p&gt;The all-day session is reasonably priced, and you'll come away with scripts to help you put this tool into use right away.  Check out the session details at &lt;a href="http://sqlpass.eventpoint.com/topic/details/DBA232P" title="SQLPass.org" target="_blank"&gt;Use PowerShell to Get the Most out of SQL Server&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;See you there!&lt;/p&gt;
&lt;p&gt;Allen&lt;/p&gt;</description></item><item><title>PASS Demonstration Errors</title><link>http://sqlblog.com/blogs/allen_white/archive/2008/11/24/pass-demonstration-errors.aspx</link><pubDate>Mon, 24 Nov 2008 16:37:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:10073</guid><dc:creator>AllenMWhite</dc:creator><description>&lt;p&gt;Errors occur.  (I'm sure that's someone's corollary to Stuff Happens.)  Errors occur, and that's why we write error handling code in our applications.&lt;/p&gt;
&lt;p&gt;My least favorite time for the occurrance of errors is when I'm doing demos, and that's what happened in a presentation I did at PASS last week.  I try to test everything before giving the demos, but every so often something slips through the cracks, and that happened.  :-(&lt;/p&gt;
&lt;p&gt;Two things that I'd blogged about here (&lt;a href="http://sqlblog.com/blogs/allen_white/archive/2007/10/19/sql-2008-smo-doing-a-little-rearranging.aspx"&gt;SQL 2008 SMO - Doing a Little Rearranging&lt;/a&gt;) came back and bit me, because I'd forgotten about them.  In a nutshell, the Backup/Restore objects have been moved to Microsoft.SqlServer.SmoExtended.dll and the WMI objects have been moved to Microsoft.SqlServer.SqlWmiManagement.dll.  The appropriate DLL has to be loaded in the PowerShell script before the objects contained in those DLLs can be referenced.&lt;/p&gt;
&lt;p&gt;If you download my demo scripts from the PASS website, know that they're configured to be run from a workstation where SQL Server 2008 tools have been installed.  They'll work against SQL Server 2000, 2005 and 2008.  If you want to use them from a workstation with SQL Server 2005 tools, then delete the lines reference the aforementioned DLLs and they'll run fine.&lt;/p&gt;
&lt;p&gt;One other problem occurred with my createdb.ps1 script, which is a condition that's occurred since I started working with SMO from PowerShell.  In the Server object there's a collection called Settings.  In that collection are properties for DefaultData and DefaultLog.  These properties are very convenient for finding where your data and log files are supposed to go when you're adding files to databases.&lt;/p&gt;
&lt;p&gt;For some reason, these properties are set to null, or an empty string, when the server is installed.  The only way I've found to set them to their proper values is to use the Server Properties dialog in Management Studio, go to the Database Settings page and change them to something very different than what's there, then go back and set them back again.  Once that's done the properties return the correct values in PowerShell and the createdb.ps1 script I use in my demos works just fine.&lt;/p&gt;
&lt;p&gt;I've updated the slides and demos available for download from the PASS site, so grab those updated files and good luck with your testing.&lt;/p&gt;
&lt;p&gt;Allen&lt;/p&gt;</description></item></channel></rss>