Archive for the ‘Administration’ Category

‘Backup Completed’ is NOT an Error Message

Friday, May 18th, 2012

If you’re like me, you like for things to be semantically reliable.  Huh?

Said another way, I like for things to mean what they say and say what they mean.  Here are a few examples of I get annoyed by failed sematics – when a footpath is used almost entirely by cyclists, when an escalator is merely stairs, or when a restroom has a huge crowd and long lines.  (No rest to be had in that room).

So you can bet that I get a little prickly when the “Error Log” is used to post messages that something completed successfully.  Really?  I came here to this error log looking for, wait for it, … errors!  My biggest annoyance here in the SQL Server sphere is that SQL Server has been posting messages in the error log every time a backup completes successfully for, like, three hundred years or something.  I can remember at least five years ago that Microsoft storage PM Kevin Farlee blogging about it.  And Kevin has been working on SQL Server for, like, three hundred years too.

I recommend that you set your SQL Server to use the startup traceflag DBCC TRACEON (3226) to disable backup success message.  Read all about it on Microsoft’s webpage describing this and many other trace flags for SQL Server.

In addition, be sure to look at Benjamin Nevarez’s post on cool, undocumented trace flags.  He still hasn’t told me the secret trace flag that sends a sock to the Microsoft developer whenever the feature s/he developed causes an end-user to scream in frustration.

And don’t overlook golden-oldies posts, like Andrew Kelly’s blog chalked full of example T-SQL programs to demonstrate this scenario.  I think this blog post was also written, like, three hundred years ago – way before computers were invented.  Very prescient of Andy!

Enjoy,

-Kev

-Follow me on Twitter

 

 

New White Paper: SQL Server Extended Events and Notifications

Wednesday, April 25th, 2012

Download the new white paper: How to Use SQL Server’s Extended Events and Notifications to Proactively Resolve Performance Issues

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!

The Expert’s Conference (TEC) – For AD, SharePoint, Exchange, PowerShell and Other Admins

Monday, March 19th, 2012

What is TEC?

The Expert’s Conference (TEC) is a multi-day event featuring five co-located Microsoft educational conferences at the San Diego Marriott Marquis & Marina April 29-May 2.  It’s pretty – see!

The event includes advanced 400-level training on Microsoft Directory & Identity (including Active Directory), Exchange Server, SharePoint, Virtualization (Microsoft Hyper-V) & Workspace Management, and PowerShell Deep Dives.  There are lots of great activities for Quest and Microsoft customers and partners.  In addition, there’s a Quest Software Day, with User Groups sessions; Focus Groups to steer product direction; and Executive Briefings.

In the registration section, be sure to mention my name when it asks “How did you hear about TEC?”  If I get enough people to sign on, they’ll let me off of the chain and give me fresh bread and water instead of the old moldy stuff they usually slide under the cell door.

Click on the pretty picture below to get more info!

New on SQLMag Tool Time Blog – Update to FineBuild

Monday, January 9th, 2012

Recall back in January 2011 that I profiled the cool tool, FineBuild for SQL Server, which helps you configure and quickly deploy installations of SQL Server.  Not only does FineBuild help you install a new SQL Server using the settings and configuration options you desire, it goes a few steps further by ensuring that any additional programs, tools, and utilities are also installed.

Ed Vassie, the creator of FineBuild, has revised and improved the tools since I last wrote about it.  Ed has naturally added a number of bug fixes and documentation improvements. Several new features… [READ MORE]

Must-Have Resources – SQL Server Backup & Recovery

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:

Simplifying CSV Data Loads

Thursday, October 27th, 2011

Data files containing comma separated values, or CSV, are some of the most common data formats used for data representation and storage outside the database.  When it comes to loading CSV data into the database, many options exist, however, few make it as simple as CSVexpress, powered by expressor software.  I recently visited www.csvexpress.com to check out just how simple it could get.   In short, CSVexpress offers a repeatable and quick way to load any CSV file into SQL Server (or any other database).   For those whose data quality is not as pristine as it should be, CSVexpress also offers a wide variety of built-in functionality to repair the data issues.   These are in addition to the data transformation components available out of the box, but let’s not get ahead of ourselves.
The first thing I notice when I visit CSVexpress is that there are some video tutorials available on the main page.  I found it pretty straightforward to load a CSV file into the database without watching the tutorials beforehand.  However, by watching the tutorials I was able to learn more about some neat features and functions that I had not previously noticed.  

For my test, I grabbed a simple CSV data file containing the following data:
City,User_ID,Name,Street_Address,Status
“Dallas”,47,”Janet Fuller”,”445 Upland Pl.”,”Trial”
“Lyon”,38,”Andrew Heiniger”,”347 College Av.”,”Active”
“Dallas”,43,”Susanne Smith”,”2 Upland Pl.”,”Active”
“Berne”,22,”Bill Ott”,”250 – 20th Ave.”,”Active”
“Boston”,32,”Michael Ott”,”339 College Av.”,”Trial”
“New York”,41,”Bill King”,”546 College Av.”,”Deleted”
“Oslo”,45,”Janet May”,”396 Seventh Av.”,”Active”
As you can see from the diagram below, the import of the data to create a schema was not difficult at all:
Once the schema is configured, I can create the following simple data flow to move data from my CSV input file to my target table in SQL Server:


While there are other tools available for performing similar tasks, CSVexpress makes it very simple and intuitive.  However, as I mentioned earlier, where it starts getting really interesting is when you need to pre-process and clean-up the data prior to loading it.   Whether it involves enriching the data from external data sources or web services, or identifying and repairing bad data, CSVexpress maintains a simple interface for all of that.  
The best part – it’s all free of charge.  The version you can download from www.csvexpress.com is expressor’s free Community Edition.  expressor also offers a licensed Desktop and Standard Edition with even more advanced features, which are available for a 30-day trial.   As a matter of fact, at the end of November, expressor will be introducing Salesforce support into their commercial editions and CSVexpress will feature a 30-day trial version.  You will be able to load Salesforce just as easily as if loading to SQL Server, or download your Salesforce contact, lead, and opportunity data and transform it before generating the right CSV output file (or files) that meets your daily, weekly, and monthly Excel reporting and analysis needs.  Now that’s easy!

Troubleshooting Repeated Login Failures on SQL Server

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

New on “Database Trends & Applications”

Tuesday, August 16th, 2011

In last month’s column, “2012 Might Really Be the End of the World as We Know It,” I described a number of major developments in the IT industry that are likely to disrupt the life of database professionals everywhere.  I categorize those four disruptors – virtualization, cloud computing, solid state drives (SSD), and advanced multi-core CPUs – into two broad groups.  I’m going to continue an analysis of these disruptive technologies in inverse order.  Today, let’s discuss SSDs.

[READ MORE ON DATABASE TRENDS & APPLICATIONS ]

Microsoft Document Watch for Operational Excellence

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.

ETL Demo with Data From Data.Gov

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!