Native Restore From Litespeed Backup

Posted 2/8/2010 at 12:11 PM by Thomas LaRock

More than once I have had the need to recover the native backup file from within the compressed Litespeed backup file. Fortunately Quest provides an extractor utility in order to help with the process. Otherwise, you would be forced to do a restore followed by a native backup. If your database is of a considerable size then the time needed to accomplish that task could be prohibitive; it will always be simpler to do the extraction as opposed to a restore and a backup.

Extraction is very straightforward. First step is to open a command window and navigate to the directory where the utility is located, this is typically the C:\Program Files\Quest Software\LiteSpeed\SQL Server directory.

Next, issue the following command to extract the native backup files.  Yes, files. In fact you will have one file created for each thread that was used when Litespeed was taking the initial database backup. The command is roughly as follows:

extractor.exe -F [path to backup file taken by litepseed] -E [name of file you want to be created]

So, if you had a backup of AdventureWorks saved to C:\AdWks.bak, and you wanted to extract the native dump from that file and create new files in the same directory, you would run the following command:

extractor.exe -F c:\AdWks.bak -E c:\AdWks_ext.bak

This command results in the creation of multiple files. You can configure a path and filename here if you want to have the files stored somewhere other than the current directory.

OK, so what do you do with these files? Well, you restore them, of course, using either T-SQL or SSMS. One common reason for needing to have a native backup is for those rare times when you need to provide a vendor with a copy and that same vendor does not have a copy of Litespeed. And while the extraction utility makes it easy to provide the necessary files, you have no idea who is on the receiving end of the multiple files. I have lost count of the number of vendors I have sent the extracted files to and received an email back that either says “we don’t know what to do with these files” or “can you send us just one file instead?”

Sure, I can do that as well. Or, I could take a minute to teach you how to do it for yourself. Here goes:

Open up SSMS and all you need to do is point to the files. Just add in each file as shown below, and click OK. Then, select your restore point and click OK again. You should be fine, the database restore should be underway at this point. 

Now, if you prefer T-SQL, the equivalent syntax would be:

RESTORE DATABASE [AdventureWorks]
FROM  DISK = N’C:\AdWks_ext.bak2′,
DISK = N’C:\AdWks_ext.bak1′,
DISK = N’C:\AdWks_ext.bak0′
GO

It’s that simple.

Error Handling with the LiteSpeed XP’s

Posted 2/8/2010 at 9:53 AM by Jason Hall

One question that comes up quite a bit pertains to how you can handle errors generated by the LiteSpeed Extended Stored Procedures (XP’s) in your own custom scripts.  Scripting with XP’s is fairly straight forward, because they accept parameters just like any other stored proc, but how they handle errors is a bit different.  Unlike  standard SQL Statements that will populate @@error and can be handled with TRY/CATCH blocks, XP’s simply return an error code.  By capturing the value returned by an XP you can succesfully trap and code around many types of errors.  View the following block of code to show how this is done.  In this example, the drive I am trying to backup to does not exist, therefore the backup fails with error code 50003.

DECLARE @rc INT
EXEC @rc = master.dbo.xp_backup_database
  @DATABASE='master'
  ,@filename ='V:\backup\database.BKP';
SELECT @rc

I know some folks out there have done some pretty cool things scripting with LiteSpeed.  If anyone has any scripts they’d like to share, we’d love to take a look!!

Getting Speakers for User Group Meetings

Posted 2/5/2010 at 8:02 AM by Brent Ozar

I love presenting at user group meetings.  I can’t get enough of it.  If I could do it every day, I would.  I’ve got dozens of presentations I can use, and I’m continuously refining them based on attendee feedback.  I love helping people get more out of their servers and advance their careers.

There’s a few things that limit how often I can present, though.

Travel requires a lot of downtime. When I have to fly to another city, that means at least 4 hours of downtime to get there, and 4 hours to get back.  (Pack, subway, airport security, boarding, flight, taxi, etc.)  That’s a day of downtime, plus the time I spend at the user group, and during those travel windows, I can’t usually be as productive as I would be back in my home office.  If I have to take multiple flights because I can’t get there in one cheap flight from Chicago, my downtime skyrockets.

Travel is expensive. User group meetings are usually in the evenings, so I can’t fly straight back home afterwards.  That means I have to get dinner, a hotel, and breakfast the next morning.  Presenting at a user group costs around $300-$400, and that’s before I get other Quest people involved.  See, if I’m going to take the time and money to present, then Quest probably wants to have a salesperson in the room to handle questions afterwards, and the salesperson costs money too.  Hopefully we’ll make a sale in order to pay for all that expense, but it’s a gamble, and that gamble has to be chosen by the sales staff.  They decide where they want to invest their travel budgets.

Multi-city travel is risky and it sucks. I can mitigate the downtime & expense of travel by stringing together several cities in a row, but that is daaaangerous.  Read through my post on The Glamour of International Travel to see just how wrong it can go.  In one trip, I lost a bag, broke a laptop, and ran out of clean clothes.  All it takes is one delay or goof, and suddenly the whole trip is in jeopardy.  I love you guys, but I abhor going on these multi-hop trips.

Doghouses are uncomfortable. When I was young and single, working for a hotel company, I lived on the road full time.  Those days are over.  I’ve committed to Erika that I won’t average more than one week per month of travel.  For reasons I cannot comprehend, she seems to enjoy my company.  She can’t take off and travel along with me because she’s got a job.  When she takes vacations, we want to go somewhere that I don’t have to work at all.

I could avoid the travel hassles altogether if I could present remotely, but…

User groups don’t like remote presenters. The presentation experience is better when there’s an actual person in the room rather than just a talking head on a projector.  I totally understand where they’re coming from.  User group leaders have been spoiled for the last decade or so when vendors were throwing tons of money at travel, but as companies slowed down their software spending, that makes it harder to justify travel expenses.

User groups don’t have a lot of attendees. Some user groups can bring in 100 people, and that’s awesome, but most of the time it’s closer to 10-30 people.  Regional events like SQLSaturdays and SQLBits can bring in hundreds of people at once.  The more attendees I can reach, the easier it is to justify the travel money.

Help Me Help You

If you want to get out-of-town speakers at your local user group, there’s a few steps you can take to increase your odds of success.

Work with other area user groups. Coordinate schedules with .NET and SharePoint user groups within driving distance.  If you can work together to set up several meetings in a row, one night after another, all within driving distance, there’s a much higher likelihood that we can make it happen.  That opens up the possibility of me and a salesperson doing a one-week road trip and covering several groups in a row.

Schedule a regional event with vendor sessions. Set up a SQLSaturday and get the vendor to sponsor it.  Let the vendor have a lunch session – a meeting room where they can bring in a speaker to talk for an hour about their product.  Some vendors employ people like me and Kevin Kline who can talk about not just SQL Server, but about their products too.

Document your attendee history. Take pictures of your monthly meetings and show butts in seats.  Salespeople get excited when they see pictures of lively attendees.

Work with the vendor’s available speakers. When Kevin and I can’t make it to a particular user group meeting, Quest usually suggests other Quest employees.  We’re not the only ones who work with SQL Server – in a company of 3,500, we have some really SQL-savvy people who do great presentations.  User groups often turn up their nose at these guys because they’re not “famous” – but they’re not famous because they have real jobs.  If you compromise and let some of the other folks speak, then those guys may bring a good report back to the mother ship.  I’ve heard Quest people say, “The ___ user group wants a speaker.  I spoke there a few months ago and they had really good turnout – we should send Kevin or Brent this time.”  It really does work.

Work with the vendor’s salespeople. Find out who your regional salesperson is, and find out what customers they’re working with.  Salespeople want to meet more customers, and if you run a local user group, you have something the salespeople want.  If I was a user group leader, I’d talk to the salesperson and say, “So, at the last user group meeting, we talked about how to do performance monitoring, and I noticed there were a couple of DBAs from a major financial firm that were asking a lot of questions.  I don’t feel comfortable telling you exactly who they were, but maybe you should do a presentation here about monitoring.  Is there anything I can do to help make that happen?”

I wish getting in-person speakers was easier, but in today’s economy, you’ve gotta give a little to get a little.  I want to cover as many user groups and SQLSaturday events as I can in 2010, but to do it, I’ve gotta minimize my travel and maximize the return for Quest.  Being educated about that will improve your odds of getting an in-person speaker.

New Documentation and Training Content for Foglight Performance Analysis for SQL Server

Posted 2/4/2010 at 6:11 PM by Ari Weil

Product documentation and product training are two areas where you (our customers) consistently press us to improve…and we have.

If you navigate to www.quest.com/foglight-performance-analysis-for-sql-server and click on Key Product Documents you’ll be taken to a page that lists all the documents you should need to get you from initial evaluation, to the demo/POC phase, and through implementation and use case training.

Also, a little while back we introduced some new micro workshops so you can get help with things like sizing your environment prior to installation, and with training on using Performance Analysis effectively once it’s installed without breaking the bank. Just navigate to www.quest.com/foglight-performance-analysis-for-sql-server and you’ll see a link to Find out about Technical Training.

Easy, right?  Want more?  We’re happy to help.  Contact your account representative, your favorite Quest SQL Server contact, or participate in one of the forum discussions and ask.

Compressing SharePoint Backups with LiteSpeed FastCompression

Posted 2/4/2010 at 10:35 AM by Brent Ozar

Microsoft SharePoint content databases are notoriously difficult to compress.  Users upload Word documents, Excel spreadsheets, and PowerPoint presentations into the SharePoint sites, and these bulky files go straight into the SQL Server database.  They’re tough to compress, and the files just keep piling up as more users start using the company intranet.

Even worse, us database administrators are told that SharePoint is now mission-critical, and we have to make sure we back it up as fast and as often as possible.  How do we do it?  In this five-minute video, Brent Ozar shows how to use LiteSpeed’s new FastCompression to pull it off.

Get the Flash Player to see the wordTube Media Player.

LiteSpeed for SQL Server – Enable Logging

Posted 2/1/2010 at 3:33 PM by Andy Grant

When an issue occurs during your backup and recovery process such as performance spikes, it is extremely beneficial to get as clear a picture as possible of what activities are occurring in your SQL Server environment.  LiteSpeed for SQL Server offers this clarity by logging these activities for immediate analysis and isolation of any bottlenecks.  This video takes you through the process of enabling logging through the LiteSpeed for SQL Server console and will cover four different areas within the product.

  • Backup Wizard
  • Restore Wizard
  • Maintanance Plans
  • Console Logging

Special thanks to April Bucher on the LiteSpeed QA team for putting this short video together. 

Get the Flash Player to see the wordTube Media Player.

Foglight Performance Analysis for SQL Server – Compare Tool

Posted 1/28/2010 at 2:55 PM by Jason Hall

Sound familiar?

“The SQL Server was performing great yesterday and all of a sudden today the performance is terrible.”

Foglight Performance Analysis has a very powerful feature that allows you compare two different properties of your SQL Server workload.  This scenarios could be:

  • Comparing the performance of a database over two different time ranges. 
  • Comparing the performance of a single stored procedure over two different time ranges.
  • Comparing the performance of database A to database B over the same time range.
  • etc…

Take a look at this short tutorial and see how the feature could help you in your environment!  Any questions, feel free to comment.

Get the Flash Player to see the wordTube Media Player.

We are Sparta!! But there’s no Trojan horse.

Posted 1/22/2010 at 12:46 PM by Ari Weil

We Are Sparta!!If you’ve ever been affected by a virus definition file update that’s flagged an app or a file that you use as a problem, you know how frustrating it can be.  If you haven’t, consider yourself fortunate.  There has just been a virus file definition update that has flagged some code used by our products as problematic.  RSRunner.exe is a file used by our Performance Analysis products, and is a Delphi executable we use to schedule and generate reports.  The file has been used by the client application for over 5 years without issue, but – perhaps because the name is similar to a Trojan called SRunner.exe – the file is being quarantined in some environments.  A similar issue exists with a DLL used by our SQL Optimizer product called synm.dll. We will have a comprehensive statement on this on Monday, once our development teams have completely reviewed the executable and have prepared a full writeup.

Wanna Get a Free Amazon Kindle?

Posted 1/19/2010 at 9:00 AM by Brent Ozar

Of course you do. You’re a geek, and geeks love toys.

Ceci n'est pas une Kindle

Ceci n'est pas une Kindle

As a vendor, it can be hard for us to get your attention.  If we want to deliver a message to you about our company and our products, we have to pay you back somehow.  We have a few choices:

  • We can attach our message to something – like buying ads alongside content that you’re already reading like SQL Server Magazine.  This used to be the biggest way vendors got a message out.
  • We can make the message itself useful to you somehow – like our wiki and blogs at SQLServerPedia.  You probably read those, and hopefully they make you associate Quest Software with quality and SQL Server expertise.
  • We can pay you for your attention – by baiting you with stuff like shirts, posters, and Kindles.  If you’ve ever sat through a vendor presentation for the chance to win something, the vendor was paying you for your attention.

Let’s focus on that last one.  How much does a vendor have to give you to get your complete attention?  In the case of executives like CIOs, it’s a heck of a lot.  Vendors can’t just send a t-shirt to a CIO and get them to sit through a half hour demo.  CIOs make enough money that t-shirts aren’t a big motivator.

For that matter, DBAs even make enough money that t-shirts are less of a motivator these days.  In order to make shirts a successful giveaway, we’re constantly working on different shirts.  SQLServerPedia’s shirts for 2009 included Twitter quotes on the back and promoted Twitter almost as much as they did SQLServerPedia, but it paid off.  Twitter is seen as something hip and cool and new, and people clamored for these t-shirts.  That was a successful giveaway.

But back to our CIOs.  If we want to get their attention for half an hour – heck, even for half a minute – how do we do it?  Well, last year we tried a Kindle promotion.  We sent life-sized Kindle mockups made of plastic to CIOs in packages that looked like real Kindles.  When you get one of these in the mail, it’s pretty exciting – it feels like you’re holding a real Kindle.  The message on the “screen” said:

“How do you do more with less in IT?  Let us give you our read on it. Get a free Kindle2 when you meet with a Quest Expert.”

It worked great!  The placebo Kindle captured the attention of CIOs long enough to get them to read it, and the promise of a real Kindle got them to call us.

We can’t afford to do that kind of promotion for everybody (sorry, DBAs) but we CAN do drawings for Kindles.  Whenever we get a dozen or more people together, we can either give everybody something like a shirt or a USB key, or we can do a drawing for a single high-value prize like a Kindle.  On my own blog, I asked what DBAs wanted to win, and we’ve taken that feedback into account on our future giveaways.

We Want Your Opinion: Driver Survey

Posted 1/18/2010 at 10:59 AM by Brent Ozar

We’re getting ready to do a round of testing of some of our software in combination with popular filter drivers, and I want your help.  If there’s any filter drivers or file drivers you run on your SQL Servers, we want to focus extra testing time on those.

You can help by filling out a one-question survey.  Thanks for your time!