<?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>Buck Woody : Development, Administration</title><link>http://sqlblog.com/blogs/buck_woody/archive/tags/Development/Administration/default.aspx</link><description>Tags: Development, Administration</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>PowerShell PowerPack Download</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/04/07/powershell-powerpack-download.aspx</link><pubDate>Wed, 07 Apr 2010 13:30:20 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:24123</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/24123.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=24123</wfw:commentRss><description>&lt;p&gt;I read &lt;a href="http://redmondmag.com/articles/2010/04/01/pack-some-power-in-your-shell.aspx" target="_blank"&gt;Jeffery Hicks’ article in this month’s Redmond Magazine&lt;/a&gt; on a new add-in for Windows PowerShell 2.0. It’s called the PowerShell Pack and it has a some great new features that I plan to put into place on my production systems as soon as I finished learning and testing them.&lt;/p&gt;  &lt;p&gt;You can &lt;a href="http://code.msdn.microsoft.com/PowerShellPack" target="_blank"&gt;download the pack here if you have PowerShell 2.0&lt;/a&gt;. I’m having a lot of fun with it, and I’ll blog about what I’m learning here in the near future, but you should check it out. The only issue I have with it right now is that you have to load a module and then use get-help to find out what it does, because I haven’t found a lot of other documentation so far.&lt;/p&gt;  &lt;p&gt;The most interesting modules for me are the ones that can run a command elevated (in &lt;strong&gt;PSUserTools&lt;/strong&gt;), the task scheduling commands (in &lt;strong&gt;TaskScheduler&lt;/strong&gt;) and the file system checks and tools (in &lt;strong&gt;FileSystem&lt;/strong&gt;). There’s also a way to create simple Graphical User Interface panels (in ). I plan to string all these together to install a management set of tools on my SQL Server Express Instances, giving the user “task buttons” to backup or restore a database, add or delete users and so on. Yes, I’ll be careful, and yes, I’ll make sure the user is allowed to do that.&lt;/p&gt;  &lt;p&gt;For now, I’m testing the download, but I thought I would share what I’m up to. If you have PowerShell 2.0 and you download the pack, let me know how you use it.&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;" class="MsoNormal"&gt;&lt;font face="Calibri"&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-size:11.0pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;b&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;           &lt;p&gt;&lt;/p&gt;         &lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;span style="color:maroon;font-size:10pt;mso-bidi-font-family:calibri;mso-ansi-language:en;"&gt;&lt;font face="Calibri"&gt;Never trust any script, including those that you find here, until you understand exactly what it does and how it will act on your systems. Always check the script on a test system or Virtual Machine, not a production system. Yes, there are always multiple ways to do things, and this script may not work in every situation, for everything. It’s just a script, people. All scripts on this site are performed by a professional stunt driver on a closed course. Your mileage may vary. Void where prohibited. Offer good for a limited time only. Keep out of reach of small children. Do not operate heavy machinery while using this script. If you experience blurry vision, indigestion or diarrhea during the operation of this script, see a physician immediately.&lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=24123" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Web/default.aspx">Web</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Downloads/default.aspx">Downloads</category></item><item><title>Using linked servers, OPENROWSET and OPENQUERY</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/03/16/using-linked-servers-openrowset-and-openquery.aspx</link><pubDate>Tue, 16 Mar 2010 12:41:33 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:23448</guid><dc:creator>BuckWoody</dc:creator><slash:comments>5</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/23448.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=23448</wfw:commentRss><description>&lt;p&gt;SQL Server has a few mechanisms to reach out to another server (even another server type) and query data from within a Transact-SQL statement. Among them are a set of stored credentials and information (called a &lt;a href="http://msdn.microsoft.com/en-us/library/ms190479.aspx" target="_blank"&gt;Linked Server&lt;/a&gt;), a statement that uses a linked server called called &lt;a href="http://msdn.microsoft.com/en-us/library/ms188427.aspx" target="_blank"&gt;OPENQUERY&lt;/a&gt;, another called &lt;a href="http://msdn.microsoft.com/en-us/library/ms190312.aspx" target="_blank"&gt;OPENROWSET&lt;/a&gt;, and one called &lt;a href="http://msdn.microsoft.com/en-us/library/ms179856.aspx" target="_blank"&gt;OPENDATASOURCE&lt;/a&gt;. This post isn’t about those particular functions or statements – hit the links for more if you’re new to those topics.&lt;/p&gt;  &lt;p&gt;I’m actually more concerned about where I see these used than the particular method. In many cases, a Linked server isn’t another Relational Database Management System (RDMBS) like Oracle or DB2 (which is possible with a linked server), but another SQL Server. My concern is that linked servers are the new Data Transformation Services (DTS) from SQL Server 2000 – something that was designed for one purpose but which is being morphed into something much more.&lt;/p&gt;  &lt;p&gt;In the case of DTS, most of us turned that feature into a full-fledged job system. What was designed as a simple data import and export system has been pressed into service doing logic, routing and timing. And of course we all know how painful it was to move off of a complex DTS system onto SQL Server Integration Services.&lt;/p&gt;  &lt;p&gt;In the case of linked servers, what should be used as a method of running a simple query or two on another server where you have occasional connection or need a quick import of a small data set is morphing into a full federation strategy. In some cases I’ve seen a complex web of linked servers, and when credentials, names or anything else changes there are huge problems.&lt;/p&gt;  &lt;p&gt;Now don’t get me wrong – linked servers and &lt;a href="http://msdn.microsoft.com/en-us/library/ms188721.aspx" target="_blank"&gt;other forms of distributing queries&lt;/a&gt; is a fantastic set of tools that we have to move data around. I’m just saying that when you start having lots of workarounds and when things get really complicated, you might want to step back a little and ask if there’s a better way. Are you able to tolerate some latency? Perhaps you’re &lt;a href="http://msdn.microsoft.com/en-us/library/ms345108(SQL.90).aspx" target="_blank"&gt;able to use Service Broker&lt;/a&gt;. Would you like to be platform-independent on the data source? &lt;a href="http://www.c-sharpcorner.com/UploadFile/mikegriffin/middle_tier12232005054629AM/middle_tier.aspx" target="_blank"&gt;Perhaps a middle-tier might make more sense&lt;/a&gt;, abstracting the queries there and sending them to the proper server. Designed properly, I’ve seen these systems scale further and be more resilient than loading up on linked servers.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=23448" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category></item><item><title>Lessons from Volunteering</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/02/23/lessons-from-volunteering.aspx</link><pubDate>Tue, 23 Feb 2010 14:31:01 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22577</guid><dc:creator>BuckWoody</dc:creator><slash:comments>2</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/22577.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=22577</wfw:commentRss><description>&lt;p&gt;Saturday I volunteered at a work-day at our church. Our building is one of the first buildings built in this area of Washington, so it’s a beautiful old structure, which of course means there’s lots of maintenance.&lt;/p&gt;  &lt;p&gt;I’m fairly decent with tools, I’ve done some woodworking in my day, and I’ve even rebuilt a car or two. But working on a structure this old requires some special skills, skills that I don’t (or didn’t) have. And as I re-glazed a stained-glass window into an ancient window opening, I was not only humbled, I thought about how the entire project was handled and how I could learn about being a better DBA. I decided to share those lessons I learned here.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Not everybody knows what you do     &lt;br /&gt;&lt;/strong&gt;This seems obvious – but I’m so often on the “knowing” end of a project that it’s easy to forget. Several of the other people at the workday knew what went where, how things worked, and what to do to take something out or put it back in. Even with my construction skills, I felt a little overwhelmed. Happily, the people that were there were VERY gracious and helped me do what I could. The nice thing is that they did not talk down to me or treat me like an idiot – they found out what I did know, and then mapped that to what I could do. They helped me learn, and by doing that I became useful to them.     &lt;br /&gt;This is also true in our career field. Are you having trouble between developers and data professionals? Buy a pizza, have a lunch and each team should take a turn at learning what the other knows, and what they would like them to know.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;If you’re good at something, lead     &lt;br /&gt;&lt;/strong&gt;One of the people at the workday was an older gentleman who was amazing in his knowledge. He’s a contractor, who’s dad trained him in construction starting at 5 years old! And in fact, his dad (and him) actually helped build this church. He’s an amazing guy. But he was running from task to task, doing all of the “hard” things. So I pulled him aside, and told him that we couldn’t do what he could do – but we were all willing hands and heads. I explained that if he would be willing, he could lead us. I asked him to group us into skillsets, and then come help each of us as needed. He agreed, and soon we were all productive.    &lt;br /&gt;You should do the same. If your kid’s school needs a “teacher for a day”, step up. Teach the kids what you know about databases. You’ll be surprised! Don’t be afraid to take a leadership role where you are.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Break things down into simple tasks     &lt;br /&gt;&lt;/strong&gt;To do the two things above, you need to plan a little. The gentleman that helped us at first gave us things like “re-glaze that window.” After we stared at him blankly, he broke down the work into the steps of heating the old glaze with a torch, gently removing the old glaze, replacing the section of glass, and re-applying the glaze, all the while showing us the little parts of those tasks that keep the glass from shattering.     &lt;br /&gt;One of the easiest things to do when you’re a technical professional is to “glaze over” all of the little steps into a large one. You’ll need to learn to break things down into the simplest components, or at least the simple components that are needed for your workers.&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;I hope these tips are useful – I’ve been applying them each day.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=22577" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Help/default.aspx">Help</category></item><item><title>Know Your Product Specifications</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/13/know-your-product-specifications.aspx</link><pubDate>Wed, 13 Jan 2010 14:57:01 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21010</guid><dc:creator>BuckWoody</dc:creator><slash:comments>1</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/21010.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=21010</wfw:commentRss><description>&lt;p&gt;As the Data Professional in your organization, the rest of the org looks to you to ensure that the system can handle what the business requires. To do that, you need to know two things: what the business requires, and what SQL Server can do.&lt;/p&gt;  &lt;p&gt;But of course there’s a bit more to it than that. Knowing the business side of the requirements – well, I teach an entire course on that. But knowing what SQL Server can do is something you can find out on your own.&lt;/p&gt;  &lt;p&gt;SQL Server comes in &lt;em&gt;versions&lt;/em&gt;, which are released based on date, and &lt;em&gt;editions&lt;/em&gt;, which are based on features and capabilities. It’s that last part that I want to focus on today.&lt;/p&gt;  &lt;p&gt;As Microsoft SQL Server matures, you’re going to see even more separation between what each edition of SQL Server can do and where it should be used. In the past, most folks have only focused on three editions – Express (the “free” one), Standard, and Enterprise. The rule of thumb was that if Standard was good enough at the moment, put it in. And it is true (and a good thing) that you can upgrade from one edition to another fairly easily.&lt;/p&gt;  &lt;p&gt;But as time goes on, we should spend a little more time understanding what each edition does, what it’s features and capabilities are, and where and when we should put them in. As I study this information, I’ll throw in my 2 cents and you can as well based on what you see. One thing I’ve found so far is that once I have the business requirements, there’s a mix of what I can write in code and what might already be included in a different edition. It’s important to look long and hard at that choice – writing a feature on my own is certainly cheaper in the short term than moving to a “higher” edition, but in some cases it makes sense to let Microsoft handle that lifting.&lt;/p&gt;  &lt;p&gt;These links are ones that you should bookmark and take a peek at periodically. They are the “header” links for more information on those features and capabilities:&lt;/p&gt;  &lt;p&gt;SQL Server 2008: &lt;a href="http://msdn.microsoft.com/en-us/library/ms143287.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143287.aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;SQL Server 2008 R2: &lt;a href="http://msdn.microsoft.com/en-us/library/ms143287(SQL.105).aspx"&gt;http://msdn.microsoft.com/en-us/library/ms143287(SQL.105).aspx&lt;/a&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;In addition, you might start learning a little more about SQL Azure. I’ll talk more about that later.&lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=21010" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Developer/default.aspx">Developer</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Microsoft/default.aspx">Microsoft</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Design/default.aspx">Design</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server/default.aspx">SQL Server</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2008/default.aspx">SQL Server 2008</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Career/default.aspx">Career</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Planning/default.aspx">Planning</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Azure/default.aspx">SQL Azure</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Microsoft+Update/default.aspx">Microsoft Update</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Link+Lists/default.aspx">Link Lists</category></item><item><title>SQL Server Best Practices: Protect CmdExec</title><link>http://sqlblog.com/blogs/buck_woody/archive/2009/12/03/sql-server-best-practices-protect-cmdexec.aspx</link><pubDate>Thu, 03 Dec 2009 15:49:34 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19482</guid><dc:creator>BuckWoody</dc:creator><slash:comments>0</slash:comments><comments>http://sqlblog.com/blogs/buck_woody/comments/19482.aspx</comments><wfw:commentRss>http://sqlblog.com/blogs/buck_woody/commentrss.aspx?PostID=19482</wfw:commentRss><description>&lt;p&gt;In SQL Server, there are times that you need to do things in the operating system, and to allow that there is a feature called CmdExec. This is not always a good thing –whenever you leave the confines of SQL Server and go out to the operating system, you can cause issues, not the least of which are security-related.&lt;/p&gt;  &lt;p&gt;This best practice is primarily aimed at SQL Server 2000 – in SQL Server 2005 and higher, you’ll have these as job step types in SQL Server Agent (or ActiveX). What you should to do is ensure that only the sysadmins role can run CmdExec job steps.&lt;/p&gt;  &lt;p&gt;In SQL Server 2005 and higher, you should use other methods to work with the operating system, such as SQL CLR or PowerShell to handle that with better safety and security. &lt;/p&gt;&lt;img src="http://sqlblog.com/aggbug.aspx?PostID=19482" width="1" height="1"&gt;</description><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Development/default.aspx">Development</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Tips/default.aspx">Tips</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/DBA/default.aspx">DBA</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Administration/default.aspx">Administration</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Documentation/default.aspx">Documentation</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/SQL+Server+2000/default.aspx">SQL Server 2000</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/Best+Practices/default.aspx">Best Practices</category><category domain="http://sqlblog.com/blogs/buck_woody/archive/tags/PowerShell/default.aspx">PowerShell</category></item></channel></rss>