<?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 'SQL Server 2008' and 'DBA'</title><link>http://sqlblog.com/search/SearchResults.aspx?o=DateDescending&amp;tag=SQL+Server+2008,DBA&amp;orTags=0</link><description>Search results matching tags 'SQL Server 2008' and 'DBA'</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.1)</generator><item><title>Start a SQL Server Agent Job using the SQL Server PowerShell Provider</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/02/10/start-a-sql-server-agent-job-using-the-sql-server-powershell-provider.aspx</link><pubDate>Wed, 10 Feb 2010 13:13:45 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:22096</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;Whew!&amp;#160; That’s a mouthfull. Anyway, I thought I would share part of a script I wrote today to help automate (more) from PowerShell. This assumes a few things: that you’re doing this from the SQL Server 2008 PowerShell provider (not just good old regular PowerShell) and that you change the HAL9000 and SQL2K8 parts with your server name and your Instance name. Oh, and the Jobs I start are called “Test” and then something else. That’s the Test* part. You can use a specific name and drop the * or use your own naming convention.&lt;/p&gt;  &lt;p&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&gt;&lt;strong&gt;Script Disclaimer, for people who need to be told this sort of thing: &lt;/strong&gt;            &lt;p&gt;&lt;/p&gt;         &lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="margin:0in 0in 0pt;" class="MsoNormal"&gt;&lt;i style="mso-bidi-font-style:normal;"&gt;&lt;font size="2"&gt;&lt;font face="Calibri"&gt;&lt;font color="#800000"&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. 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;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;font color="#ff0000"&gt;# Start a Job named Test in the SQL Server 2008 PowrShell Provider&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;&lt;font color="#0000ff"&gt;DIR SQLSERVER:\SQL\HAL9000\SQL2K8\JobServer\Jobs\Test* | % {$_.Start()}&lt;/font&gt;&lt;/p&gt;</description></item><item><title>FILESTREAM: Storing Binary Objects in a database – or not</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/28/filestream-storing-binary-objects-in-a-database-or-not.aspx</link><pubDate>Thu, 28 Jan 2010 14:47:16 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:21562</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;Many shops need to store binary large objects (sometimes called BLOBS) in a database. There are really only two ways to do this: store in them in a table structure in the database itself using a binary data type, or store them in the operating system in a file folder somewhere and point to the file using a text field in a table.&lt;/p&gt;  &lt;p&gt;Both of these approaches have issues. Relational Databases aren’t really designed to hold that much data in a single field – not ours, not anybody’s. And pointing to a file is risky, since the file might change, it isn’t under database control for security and backups and so on.&lt;/p&gt;  &lt;p&gt;Enter FILESTREAM. In SQL Server 2008 we introduced a feature that actually combines the two approaches into one. Using FILESTREAM, you enter the data into a “column”, but in fact SQL Server stores the data on the hard drive. It’s lightning fast, doesn’t lose the “pointers” to the files, and keeps the whole thing under database control. You can secure it with the same permissions as the database, and it gets picked up in backups and so on. &lt;/p&gt;  &lt;p&gt;It does have some limitations and caveats, so be sure and check out the reference data in the following link. And then try it yourself – pretty easy to set up and manage.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://technet.microsoft.com/en-us/library/bb933993.aspx"&gt;http://technet.microsoft.com/en-us/library/bb933993.aspx&lt;/a&gt;&lt;/p&gt;</description></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><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;</description></item><item><title>Spit it out already!</title><link>http://sqlblog.com/blogs/buck_woody/archive/2010/01/06/spit-it-out-already.aspx</link><pubDate>Wed, 06 Jan 2010 14:11:11 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:20617</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;You’ve probably seen that commercial where the chewing-gum company van stalks the guy who has been chewing the same piece of gum too long, and they attack him and make him chew another piece.&lt;/p&gt;  &lt;p&gt;I feel like that with SQL Server 2000. Almost every shop I go into has at least one primary application running on SQL Server 2000. Now, don’t get me wrong – SQL Server 2000 is a fine piece of software engineering. From over TEN YEARS AGO. In “software time”,&amp;#160; that’s like a thousand years or something. &lt;/p&gt;  &lt;p&gt;While it was great for its day, the newer versions are faster, more secure, and more robust. And every time it doesn’t get upgraded, SQL Server is perceived as “not as fast/strong/etc” as other platforms (which &lt;em&gt;are&lt;/em&gt; upgraded, of course).&lt;/p&gt;  &lt;p&gt;Now, I’m not suggesting that anyone upgrade for upgrade’s sake. We all have work to do, and the last thing we need to do is change out a platform when there’s no need. &lt;/p&gt;  &lt;p&gt;But there is a need. SQL Server 2000 isn’t in mainline support any more. That means it can be attacked easier and so on. And it doesn’t scale like the new offerings, nor does it have any of the new features the latest versions have. &lt;/p&gt;  &lt;p&gt;“Oh”, you might say, “I don’t use those features anyway.” Well of course you don’t – you can’t if you still have SQL Server 2000! How do you know the ways you could help your organization if you don’t experiment with the new stuff?&lt;/p&gt;  &lt;p&gt;But it isn’t the DBA I would chase down and steal gum from. It’s the &lt;em&gt;vendors&lt;/em&gt;. &lt;/p&gt;  &lt;p&gt;Every time I raise my eyebrows when I hear about the SQL Server 2000 installs, the DBA shrugs and says “The vendor won’t certify SQL Server X, so we have to stay at SQL Server 2000 or 2005.” And I say, that’s just &lt;em&gt;lazy&lt;/em&gt;. Unless the vendor codes specifically for deprecated features, a simple test run during their software development should allow them to move forward. I’m not saying that’s an easy task, but certainly they’ve tested their software releases once in the last ten years, no? If not, doesn’t that make you nervous?&lt;/p&gt;  &lt;p&gt;Anyhoo, spit out the SQL Server 2000. Or I might have to fire up the company van.&lt;/p&gt;</description></item><item><title>After the Upgrade, it runs differently…</title><link>http://sqlblog.com/blogs/buck_woody/archive/2009/12/01/after-the-upgrade-it-runs-differently.aspx</link><pubDate>Tue, 01 Dec 2009 16:06:55 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:19385</guid><dc:creator>BuckWoody</dc:creator><description>&lt;p&gt;I got a question yesterday in the mail that I thought I would just answer here in a broad context. While I can’t troubleshoot or do performance tuning from a distance, there are some interesting concepts and suggestions this e-mail brings up:&lt;/p&gt;  &lt;p&gt;&lt;font color="#800000" size="1"&gt;“I have recently seen a change from SQL Server from 2005 to 2008 in where it handles CASE statements differently. Previously we saw a tremendous improvement in performance by using CASE statements instead of OR statements. However when one of our client upgraded to 2008 they began to notice unusually long runtimes with a few of these queries (orders of magnitude larger runtimes). Swapping it to an OR statement allows it to run in 0.075 seconds... so my question to you is do you know of any changes to the exectution engine that would account for this and what is your recommendation?”&lt;/font&gt;&lt;/p&gt;  &lt;p&gt;It’s a great question. Basically it boils down to “I changed versions, now something acts differently.” Before we talk about what might be the issue, let’s talk about some things you should do after you upgrade from one version of SQL Server to another.&lt;/p&gt;  &lt;p&gt;First, open the database properties and change the compatibility level to 10.0, unless you know you shouldn’t. Next, update your statistics – all of them. Third, ensure you have all of the proper service packs applied to the operating system and SQL Server. And finally, check the code you have for deprecated statements, or for places where you could optimize the code to use new statements or formats. There are other steps to follow, but these basics will help.&lt;/p&gt;  &lt;p&gt;Now, with all of that done, let’s move on to things that work differently. First, you need to find out what the&amp;#160; code is doing – and the primary way to do that is to examine the Query Execution Plan. There are a lot of resources to teach you how to do that, but the general idea is that you turn that plan on (in the Query menu), run the query, look at the graphical plan and check three items: the overall plan, the icons that show the highest percentage of use, and the thickest arrows. Evaluating this on the “before” system and the “after” system, and that will show you what changed.&lt;/p&gt;  &lt;p&gt;Maybe.&lt;/p&gt;  &lt;p&gt;The point is, the query might take exactly the same path, but a different component may show stress because you might have a different box or configuration. Perhaps the drive layouts changed (or should), you have more memory (or better access to it) and so on. In that case, you simply follow standard performance tuning methodologies to locate what’s waiting, and what is showing pressure.&lt;/p&gt;  &lt;p&gt;Now to the question at hand – does SQL Server (any version) handle a CASE statement differently than an OR statement? Well, once again, the execution plan will show you that answer, but the CASE statement is used for a different purpose than an OR statement – without having all of the code it’s difficult to say which to use in a given situation. The best thing to do is to evaluate the documentation on each and decide which fits the situation best.&lt;/p&gt;  &lt;p&gt;CASE: &lt;a title="http://msdn.microsoft.com/en-us/library/ms181765.aspx" href="http://msdn.microsoft.com/en-us/library/ms181765.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms181765.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;OR: &lt;a title="http://msdn.microsoft.com/en-us/library/ms188361.aspx" href="http://msdn.microsoft.com/en-us/library/ms188361.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms188361.aspx&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;Did we make changes to CASE or OR? Not directly – but each change to the product may have orthogonal implications, which is where I point you back to the steps I mentioned for the “after upgrade” process.&lt;/p&gt;</description></item><item><title>New Features Announced In SQL Server 2008</title><link>http://sqlblog.com/blogs/andy_leonard/archive/2008/03/13/new-features-announced-in-sql-server-2008.aspx</link><pubDate>Thu, 13 Mar 2008 10:23:00 GMT</pubDate><guid isPermaLink="false">21093a07-8b3d-42db-8cbf-3350fcbf5496:5563</guid><dc:creator>andyleonard</dc:creator><description>&lt;P&gt;&lt;A class="" href="http://blogs.msdn.com/buckwoody/" target=_blank&gt;Buck Woody&lt;/A&gt;, Microsoft SQL Server Program Manager, recently posted a list of enhancements in the works for SQL Server 2008 RTM in the SQL Server MVP newsgroup. The usual suspects were included in the list: Policy-Based Management (formerly DMF), Resource Governor, Multi-Server Query, PowerShell, and IntelliSense - but there are also some interesting additions that I'd not heard about until reading his post.&lt;/P&gt;
&lt;P&gt;The big addition: Activity Monitor, described in the post thus:&lt;/P&gt;
&lt;P class=MsoNormal style="MARGIN:0in 0in 0pt;LINE-HEIGHT:normal;"&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;mso-bidi-font-size:11.0pt;mso-ascii-font-family:Calibri;mso-fareast-font-family:'Times New Roman';mso-hansi-font-family:Calibri;mso-bidi-font-family:'Times New Roman';"&gt;&lt;FONT face=Calibri&gt;&lt;EM&gt;The new Activity Monitor was written from the ground up with the perspective of the DBA needing to chase down a performance problem in real time. Modeled after the new Windows Resource Monitor, DBAs can quickly see the active sessions, wait states, file I/O, and long running queries in a command console like UI.&lt;/EM&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;SPAN style="FONT-SIZE:9pt;COLOR:black;mso-bidi-font-size:11.0pt;mso-ascii-font-family:Calibri;mso-fareast-font-family:'Times New Roman';mso-hansi-font-family:Calibri;mso-bidi-font-family:'Times New Roman';"&gt;&lt;FONT face=Calibri&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/FONT&gt;&lt;/SPAN&gt;
&lt;P&gt;I'm excited! I currently lug around a collection of scripts (... that I keep promising to add to an application one day) to check hither and yon for performance gotchas. &lt;/P&gt;
&lt;P&gt;Another addition: Database Diagram / Table Designer Safety Additions which add safety checks "for operations that&amp;nbsp;that would drop an object or cause&amp;nbsp;data loss." &lt;/P&gt;
&lt;P&gt;You will also be able to launch Profiler "from&amp;nbsp;a Query Editor Results window to the SPID of the query." This sounds &lt;EM&gt;very&lt;/EM&gt; interesting.&amp;nbsp;If I'm reading this right&amp;nbsp;I'll be able to execute sp_who2, obtain the SPID of a long-running query, right-click (or something) and start a Profiler trace pre-configured to capture activity of this SPID. You can also launch the SPID-centric&amp;nbsp;Profiler from Activity Monitor.&amp;nbsp;I will be using that a lot!&lt;/P&gt;
&lt;P&gt;New right-click options in the Query Results Window will allow users to "select a range of rows in the Results Grid and copy the headings as well. Also, you can select individual cells and copy them with headers if you wish." This sounds like the copy functionality we have in SSIS Grid Data Viewers. I can tell you from expereience this is handy feature. It's very useful to be able to copy a few multi-selected rows - including row headers (especially when you're working with a couple hundred columns!) - and paste them into Excel for analysis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;A new "Info Bar" provides pre-validated navigation cues in many screens.&lt;/P&gt;
&lt;P&gt;The Open Table feature limits the number of rows returned. Has this ever happened to you? You&amp;nbsp;right-click a table in SSMS and select Open Table only to hog server resources&amp;nbsp;just so you could take a peek at the data? It's happened to me...&amp;nbsp;(Thank you, thank you, thank you!)&lt;/P&gt;
&lt;P&gt;There are also a few changes to ShowPlan - mostly related to XML / graphics interchange. I remember seeing some of this in early SQL Server 2005 pre-releases but I believe it was cut from the 2005 RTM. Nice to see these options - they're great for documenting issues.&lt;/P&gt;
&lt;P&gt;Performance Studio will contain a host of performance tuning reports - another exciting feature! The whole&amp;nbsp;Data Collection database&amp;nbsp;has me stoked - have you seen this feature in CTP6? It's pretty cool.&lt;/P&gt;
&lt;P&gt;Last but not least, the team has decided to include - drum roll please -&amp;nbsp;the T-SQL debugger in SSMS!&lt;/P&gt;
&lt;P&gt;I can hardly wait to see these in action, and it's very cool of the SQL Server Team to give us visibility into these planned features along with permission to blog about them (thanks Buck!).&lt;/P&gt;
&lt;P&gt;:{&amp;gt; Andy&lt;/P&gt;</description></item></channel></rss>