 |
Blog
|
|
|

|
|
 |
Blog |
 |
| -->
 |
Posts Tagged ‘SQL Server 2008 R2’
Wednesday, April 25th, 2012
SQL Server comes with a wide array of tools for monitoring your environment. There are logs and traces that provide information when errors occur, but these are often used passively to react to events that have already occurred. There’s PerfMon, and Profiler, and loads of Dynamic Management Views to check. But where to look?
As database administrators (DBA), we need to monitor our environments proactively and create solutions as issues arise. In this white paper, we will look at a couple technologies – event notifications and extended events – that can help you achieve these goals. With these two features, we’ll look at the error log and deadlocks, and demonstrate how you can get relevant information delivered as it occurs. We’ll also look at ways that run-time errors can be captured and used to help reduce the amount of time required to investigate issues.
This white paper, written by SQL Server MVP Jason Strate (blog | twitter), is a free download but does require a registration.
And, as always, I enjoy your feedback. Thanks!
-Kev
Follow me on Twitter!
Tags: Best Practices, DBA, Internals, Monitoring, SQL Server 2008 R2 Posted in Administration, Challenges, Cool Technologies, Databases, On-Line Resources, Performance, SQL Server, SQLMag, Tips & Tricks | No Comments »
Thursday, December 8th, 2011
One of the things that drives me crazy as I’m getting older is that my brain is losing the capacity to differentiate version numbers. As I speak travel around speaking with customers and at conferences, I find my self saying things like “I can’t recall if this problem was fixed in SQL Server 2000 or 2005. But you don’t have to worry about that any more.” Or things like “That feature was added in SQL Server 2008 R2, eh, or was that version 6.5. DOH!” followed by a loud slapping sound as I whap my palm into my forehead.
The Internet doesn’t forget either. Recommendations that were once helpful, if not outright essential, now are neutral or even downright bad. So now, whenever I put together new presentations, I always spend a lot of time in research, reassessing my knowledge on the topic. (That doesn’t mean that I’ll extemporaneously say it wrong, because I speak in an off-the-cuff and rapid style. But at least my notes are usually correct).
Case In Point
Take backup and recovery (B&R), for example. I’ve been writing about and performing B&R for years. I’m even part of the team that builds the most popular B&R tool in the SQL Server space. It’s an extremely important part of what I do. And yet, even after spending a couple days re-researching topics (yet again), I still manage to get a few of the more specific details wrong because of changes over the years in the feature set. How so?
During an Expert’s Perspective webcast last week (and available on-demand) covering the top backup and recovery mistakes on Microsoft SQL Server, I mis-explained the details concerning how SQL Server performs a differential backup. A very clever SC on our team who was also attending the webcast pointed out to me after the session that I’d described differentials working at an 8k page-level when, in fact, they work at the extend-level (that’s a block of eight 8k pages). #FACEPALM!
When describing the differential backup I said that a bit was flipped on each page header and SQL Server would only back up those pages. Instead, whenever a page is changed a bit is recorded on the differential change map (1bit per extent), the backup process then queries these map pages and backs up those extents that have been marked as changed.

The Research Reveals
The cool revelation here is not that I can admit my mistakes. The take-away from this blog post are all the great articles I read writing my latest slide deck. These blogs and articles were so good that I needed to spread the word. Add these to your must read list:
Virtual Log Files must be tamed!
Backup and Recovery Myth Busting
Other Good Sources
And just in case you need a refreshing in the basics of SQL Server backup and recovery, check these out:
Tags: Backup & Recovery, DBA, Quest Software, SQL Server 2008 R2, Video Posted in Administration, Challenges, Databases, On-Line Resources, Presentations, SQL Server, SQLMag, SQLServerPedia Syndication, Tips & Tricks, Video | 1 Comment »
Monday, October 31st, 2011
When you’re developing new Transact-SQL code or modifying some existing code, do you just launch directly into programming?
I know that I did just that, for years. It wasn’t until I was trying to performance tune some existing code that I realized I hadn’t actually taken caching of data and execution plans into account. So all those modified stored procedures that I was so proud of might not actually be faster than the first generation of procedures because I hadn’t checked to ensure that I was testing cached programs against uncached programs (and, by extension, the data used by those programs). That’s easy enough to fix with a test harness. Test harness were originally an actual, physical harness used by engineers to clamp down parts of an electrical or mechanical device they were prototyping. Ours is no different. It locks down all of the assumptions about our code (like my early, false assumption that I didn’t need to clear the caches) and adds a metric or two for good measure – literally – so we can better measure what’s happening in that code.
Here’s what my test harness looks like:
/* Transact-SQL test harness by Kevin Kline, http://KevinEKline.com, Twitter at kekline */
/* Flush dirty pages from the buffer to the database files. */
CHECKPOINT;
/* Flush the data cache and procedure cache, respectively. For DEV environments only! */
DBCC DROPCLEANBUFFERS;
DBCC FREEPROCCACHE;
/* Enable statistics tracking for IO and timings. Remember, SET commands remain enabled during a session until disabled. */
SET STATISTICS IO ON;
SET STATISTICS TIME ON;
-- Whatever SQL code you'd like to process goes below.
SELECT SalesOrderID
FROM Sales.SalesOrderHeader H
WHERE CustomerID = 344
GO
SET STATISTICS IO OFF;
SET STATISTICS TIME OFF;
/* Textual Execution Plans, if desired.
SET SHOWPLAN_TEXT ON;
SET SHOWPLAN_TEXT OFF;
*/
I also like to include the execution plans a lot of the time. You might wonder why I don’t save the execution plans for the GUI in SSMS? Well, I’m a big advocate of scripting in general because I like to automate activities. By pulling the execution plans using scripts, I can use SQLCMD to schedule a large number of query executions during the evening and have the results ready for analysis when I come back into the office in the morning. Workin’ smarter, not harder, Baby!
So how does this test harness work for you? Do you use other elements in yours? If so, share your experiences here!
Thanks,
-Kevin
-Follow me on Twitter
Tags: DBA, Developer, Performance, SQL Server 2008 R2, Tools & Scripts, Transact-SQL Programming, Troubleshooting Posted in Databases, On-Line Resources, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks, Tool Time, Transact-SQL Programming | No Comments »
Friday, October 21st, 2011
I’d recently experienced a situation where I was getting repeated login failures to a SQL Server where I knew that I had the correct user name and password. Each time, I’d get error 18456 in response.
“Login failed for user ‘<user_name>’. (Microsoft SQL Server, Error: 18456)”.
The challenge when troubleshooting this error message is that you may have a problem with SQL Server or you may have a problem with Active Directory or Kerberos, if you’re using one of those authentication technologies.
A False Trail
When times are good, and you’re able to make a connection, you can always query sys.dm_exec_connections, to see how you’re connecting, for example, using NTLM rather than Kerberos. But that doesn’t help us when we can’t connect to the server at all.
In other situations, your problem might be caused by duplicate SPMs in Active Directory. MVP Russell Fields documented a nice solution for ridding Active Directory of duplicate SPNs here. Microsoft Support also mentions some troubleshooting steps forauthentication problems here. Ok, that helps. But it’s not my solution.
MVPs to the Rescue
Fortunately, my MVP buddies Edwin Sarmiento (blog | twitter) of Canada and Bitemo Erik Gergely (blog) of Hungaria had already discussed and solved the problem for me!
Something Erik pointed out, but hadn’t occurred to me at first, is that if you’re getting this SQL Server error message then you’ve actually reached the server and probably aren’t having a full disconnect error. The second thing that Erik pointed out is the importance of the state element of this error message. A lot of the time, you can simply ignore the
state element of an error message. But not this time. As it turns out, state is the key to solving the problem. For example, a state of 18 indicates that the password must be changed.
Microsoft provides a pretty good description of the states of error 18456 here, but it leaves out a few things. (You’ll get more useful info if you read all of the comments too). But
again, Erik comes to the rescue by providing a complete and concise list of error 18456 states here.
Microsoft Improves the Documentation
Even better for all troubleshooting situation involving state information, Microsoft has now added state descriptions for errors in Books Online, including error 18456. When you look in your SQL Server error log, you see the state of the error and be able to make an accurate deduction about the nature of the error!
Hope this helps,
-Kev
-Follow me on Twitter
Tags: MVP, SQL Server 2008 R2, Troubleshooting Posted in Administration, Challenges, Databases, On-Line Resources, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks | No Comments »
Monday, August 8th, 2011
Back when my day-to-day duties included database administration work and enterprise architecture, I became rather obsessed with the idea of operational excellence. I read everything I could on the topic. I made a list of favorites, which became somewhat shabby over time, as I dog-eared important pages and scribbled notes in the margins. (Perhaps that list of favorites might, in and of itself, make a good blog post). Fast-forward a decade and I’m still mightily interested in operational excellence for IT organizations. It’s just that so much good material is available for free on the web.
Here’s a run-down of several useful documents and downloads to improve overall operation performance for those of you in a Microsoft-centric IT organization:
Microsoft Operations Framework
Microsoft Operations Framework (MOF) version 4.0 guide is practical guidance for IT organizations. With the release of version 4.0, MOF now reflects a single, comprehensive IT service lifecycle—it helps IT professionals connect service management principles to everyday IT tasks and activities and ensures alignment between IT and the business.
Infrastructure Planning and Design
The Infrastructure Planning and Design (IPD) guides are the next version of Windows Server System Reference Architecture. The guides in this series help clarify and streamline design processes for Microsoft infrastructure technologies, with each guide addressing a unique infrastructure technology or scenario.
Microsoft Baseline Security Analyzer 2.2 (for IT Professionals)
The Microsoft Baseline Security Analyzer provides a streamlined method to identify missing security updates and common security misconfigurations. MBSA 2.2 is a minor upgrade correct minor issues and add optional catalog support.
Security Compliance Manager
The Microsoft Security Compliance Manager provides centralized security baseline management features, a baseline portfolio, customization capabilities, and security baseline export flexibility to accelerate your organization’s ability to efficiently manage the security and compliance process for the most widely used Microsoft technologies.
Tags: Architecture, Best Practices, Compliance, DBA, Enterprise Architecture, Management, Operations, Performance, Security, SQL Server 2008 R2, Tools, Troubleshooting Posted in Administration, Architecture, Compliance, Cool Technologies, Hardware, On-Line Resources, Security, SQL Server, SQLMag, SQLServerPedia Syndication, Strategies, TCD blog post, Tips & Tricks, Virtualization | No Comments »
Friday, August 5th, 2011
A little over a month ago, I wrote an article (Is There Such a Thing as Easy ETL) about expressor software and their desktop ETL application, expressor Studio. I wrote about how it seemed much easier than the native ETL tools in SQL Server when I was reading up on the tool, but that the “proof would be in the pudding” so to speak when I actually tried it out loading some free (and incredibly useful) data from the US federal data clearinghouse, Data.Gov.
If you’d rather not read my entire previous article – quick recap, expressor Studio uses “semantic types” to manage and abstract mappings between sources and targets. In essence, these types are used for describing data in terms that humans can understand—instead of describing data in terms that computers can understand. The idea of semantic abstraction is quite intriguing and it gave me an excuse to use data from data.gov to build a quick demo. You can download the complete data set I used from the following location: International Statistics. (Note: I have this dream that I’m going to someday download all of this free statistical data sets, build a bunch of amazing and high-value analytics, and make a mint. If, instead, YOU do all of those things, then please pay to send at least one of my seven kids to college in repayment for the inspiration. I’m not kidding. I have SEVEN kids. God help me).
The federal government, to their credit, has made great progress in making data available. However, there is a big difference between accessing data and understanding data. When I first looked at one of the data files I downloaded, I figured it was going to take me years to decrypt the field names. Luckily, I did notice an Excel file with field names and descriptions. Seriously, there are single letter field names in these files where the field name “G” has a description of “Age group indicator” (Oh Wow). See the figure below.

It’s stuff like this that reminds me why we have data quality and master data management tools. Ok, back to expressor Studio. I quickly mapped a couple of files into expressor Studio using their “Read File” operator. It was fairly simple and easy to use. My data included files with country area information, population, and gender information by year. Once I mapped these files I quickly wanted to shed the default cryptic, nay, nonsensical names. I could have just renamed the fields when I initially mapped them into the system but that would mean I would have to manage the names in three separate locations. Bah! It made more sense to create a common semantic type and reuse it across all three files.

There are two flavors of semantic types within expressor Studio to handle your mappings, atomic types or composite types. An atomic type is simply a single field name whereas a composite type is a combination of one more atomic types. Since the data files had many common fields, I decided to create a core set of atomic types that I could then roll up into composite types based on the files I was mapping. This kept the mappings simple and easy to understand and most importantly the whole exercise took about 5 minutes. Once the types were created I simply mapped the cryptic names from the files to the business friendly names in my semantic type. (I can’t even begin to imagine how long this would’ve taken to build using native tools, but certainly not 5 minutes).

Now I was ready to move my data. I took the data from three files and combined them into one master dataset. From there, my international statistics from Data.Gov were pumped right into my waiting SQL Server database. Note that I could’ve used Excel or just about any other database as my target instead of SQL Server.
Now, you might be saying to yourself “That looks easy because you read all the help files first.” Actually, no. In fact, some of my buddies like to lovingly tell me to “RTFM” from time to time. It’s not that it offends my masculinity to read a manual. I just usually like to have a go first and then, if needed, go back to the manual. In fact, all I really used was this 5-minute demo video that in noticed when I was downloading the tool.
If you’re tackling ETL and you want it fast and easy, then you might want to check out their website, www.expressor-software.com, to learn more about the expressor company and products.
Enjoy!
-Kev
P.S. Follow me on Twitter!
Tags: Data Cleansing, Data Quality, DBA, ETL, Master Data Management, SQL Server 2008 R2 Posted in Administration, Cool Technologies, Databases, On-Line Resources, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks | No Comments »
Wednesday, August 3rd, 2011
Check out the new white paper “Key Methods for Managing Complex DB Environments” at Quest.com. Heterogeneous database management hassles used to be much less common than today. When I first started at Quest nearly ten years ago, I’d put forward that on 15-20% of my big customers regularly managed more than one major database platform. (That doesn’t mean they didn’t have more than one, rather secondary platforms were either unmanaged or considered entirely unimportant). Today, I’d put forward that 70-80% of my big customers support at least two major database platforms. Often, they support three or more.
This white paper addresses methods for successfully managing today’s complex heterogeneous database infrastructures. Topics discussed include: balancing key business metrics, understanding challenges to the DBA, and managing multiple database platforms (i.e. Oracle, SQL Server, DB2, Sybase) simultaneously.
Enjoy,
-Kev
P.S. Follow me on Twitter!
Tags: DB2, DBA, Oracle, SQL Server 2008 R2, Sybase Posted in Administration, Challenges, Databases, SQL Server, Tips & Tricks, Trends | No Comments »
Tuesday, August 2nd, 2011
EPIC FAIL! This was supposed to go out last week. But I didn’t schedule it properly, so I’d just like to point out that there are lots of other great webcasts to watch at the Pragmatic Works webcast URL below. Plus, my session will be available via streaming by the end of the week. And thanks the the 1600 folks who registered!
-=-=-=-
Come join me on Tuesday, August 2, 2011 11:00 AM – 12:00 PM EDT for a free webcast covering the internals and architecture of Microsoft SQL Server. It’s not everyday that a dry topic like this is presented in a fun and easy to understand format, so get in while the gettin’ is good. :^)
Registration is free, thanks to the fine folks at Pragmatic Works.
REGISTER HERE
And don’t forget to check out all of Pragmatic Works’ other free webcasts. It’s great stuff and it’s FREE!
Enjoy,
-Kev
Follow me on Twitter
Tags: Best Practices, DBA, Developer, Internals, Monitoring, Performance, SQL Server 2008 R2 Posted in Administration, Databases, Presentations, SQL Server, SQLMag, SQLServerPedia Syndication | No Comments »
Wednesday, July 20th, 2011

Remote Desktop Services Component Architecture Poster
Grab your own poster! A visual guide to key Remote Desktop Services technologies in Windows Server 2008R2
Virtually Free
Get the latest update rollup package for the Hyper-V role in Windows Server 2008 R2 and be sure to bookmark the Windows Virtualization Team Blog. Be sure to check out blog World Simplified is a Virtual World. And doncha evah neglect application virtualization, such as the goodness at the App-V Product Team Blog.
Let’s Optimize Some Desktops (Assuming You Have Gone Full Cloud Yet)
Check out The Official Microsoft Desktop Optimization Pack (MDOP) Blog where you can get cool tools like the Diagnostics and Recovery Toolset (DART), currently in its v7 beta release.
We Can Always Perform a Little Better
Have you checked out the Ask the Performance Team blog yet. You should! Then there’s the Microsoft Enterprise Networking Team blog. And if you’re looking for help with the Windows Server Core, be sure to check out the Ask the Core Team blog. Excellent stuff!
As the Tool Time columnist at SQL Server Magazine, I’m always on the lookout for great free tools that get on-going support from their creators. One common experience is finding a nice debugging tool, only to discover that there’s no information on how to interpret the debugger result sets! (SQLIOSim anyone?) That’s why I love the Microsoft Advanced Windows Debugging and Troubleshooting blog. Another must-have on your Favorites list.
Enjoy!
-Kev
Follow me on Twitter
Tags: Best Practices, cloud computing, DBA, Debugging, Developer, Performance, SQL Server 2008 R2, Tools, Troubleshooting, Virtualization, Windows Posted in Administration, Cloud, Cool Technologies, Databases, On-Line Resources, Performance, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post, Tips & Tricks, Tool Time | No Comments »
Friday, July 8th, 2011
I have to confess that I’m incredibly excited about BigData. I haven’t been this excited about new innovations in IT since relational databases first appeared on the scene early in my career. But what is BigData?
Back in those days, I can still feel the echos of adrenaline when I was hired to work on a NASA project that would involve over 100Mb of data. ONE HUNDRED MEGABYTES! Good grief, that was fantastically huge to us on the team. (That database was over 130Mb when I finally moved on to another project). And remember – PC software was installed using 640Kb floppy disks at the time. In fact, my Oracle v5 instance required shuffling through about a dozen floppy disks to get the thing installed on a 286 IBM PC.
BigData today takes on an entirely meaning as database sizes scale into the petabytes. But the emphasis is still the same today as it was back in the 1980′s – turning data into actionable information. However, with BigData, we can achieve amazing new insight from this data and mine for tidbits that would never have seen the light of day with smaller data sets.
The two major themes to remember about big data are 1) the more data you have on a given domain, the more power you have, 2) the better the analysis you can perform on the data, the more power you have. In fact, theme 2 might be the most important thing to consider because lots of data is meaningless unless you can extract knowledge from it. And that’s where better analytical techniques come into play.
Here are some articles about Big Data that you might enjoy:
Let me know what you think. Best regards,
-Kev
Tags: Best Practices, Big Data, Career, cloud computing, DBA, FutureWatch, SQL Server 2008 R2 Posted in Administration, BigData, Challenges, Databases, NoSQL, SQL Server, SQLMag, SQLServerPedia Syndication, TCD blog post | No Comments »
|
|
 |
|
|