Birmingham, AL and Dallas, TX User Group Presentation

Filed under: Administration, I'm a Newbie, Reporting Services — Jason Hall at 10:02 pm on Tuesday, August 19, 2008

I am presenting to the Birmingham, AL and Dallas, TX SQL Server User Groups this week and wanted to post some collateral to accompany my presentation.  The topic was centered around how to use SQL Server Reporting Services as a DBA’s tool.  I have blogged on the topic before and you can view an abstract and link to download slides and examples below.  I’d love to hear your feedback!!

http://sqlserverpedia.com/blog/im-a-newbie/sql-server-reporting-services-a-dbas-tool/

Kevin Kline vblog - Where to get good SQL Server information

Filed under: Uncategorized — KKline at 12:39 pm on Friday, August 15, 2008

Hello all - here’s my latest vblog entry where I discuss the online resources that I use when trying to research various SQL Server topics.  I hope you find these resources as helpful as I do!

Thanks,

Kevin

Monitoring drive space with xp_fixeddrives

Filed under: Administration, Hardware Considerations — Brent Ozar at 7:59 pm on Thursday, August 14, 2008

At tonight’s Detroit SQL Server User Group meeting, a question came up about monitoring free drive space without enabling xp_cmdshell.  If you need that, here’s an article on monitoring drive space with xp_fixeddrives.

Is it a bad thing to have a transactional backup in the middle of a full backup?

Filed under: Administration, Backup and Restore, I'm a Newbie — KKline at 3:53 pm on Thursday, August 14, 2008

Here’s the actual question in its entirety:

We are trying to implement log shipping… We implement a transactional backup hourly. If our nightly full backup takes 1 hour and 45 minutes, what is our recovery process? Is it a bad thing to have a transactional backup in the middle of a full backup? 

 

Now, your question, whether you realize it or not, is pretty involved and has three major elements.  First, you want to know about implementing log shipping.  Second, you want to know about the recovery process considering your current backup process of hourly transaction log dumps and nightly full database dumps.  And finally, you want to know if a transaction log backup can cause problems if it occurs while a database backup is already processing. 

 

FULL DISCLOSURE - I’ll go ahead and say now that I’m going to include verbiage around a Quest product in this response - not a blatant advert, but I will be mentioning one of our products.

 

So, to your first question – remember that log shipping is a high-availability technique used to speed recovery of a database should you ever have a crash.  You don’t say which version of SQL Server you’re running.  But I assume that you must be running on SQL Server 2000, otherwise you would have mentioned other (and better, IMO) alternatives such as database mirroring.  Assuming you’re on SQL2000, then log shipping is not a big deal to implement and is widely discussed elsewhere on the internet, such as Microsoft’s TechNet (www.microsoft.com/technet/prodtechnol/sql/2000/maintain/logship1.mspx) and MSDN (msdn.microsoft.com/en-us/library/ms187103.aspx).  I won’t rehash an elementary concept of SQL Server when others have already done an excellent job of telling you how to implement it.  Since you might still be in the planning stages of your high-availability solution, here are two caveats that are often overlooked by newbies.  One, don’t forget that the database that is the target of log shipping is going to be in recovery mode all the time until it becomes the primary database.  You pretty much cannot use it unless the source database fails.  Two, log shipping works great with LiteSpeed.  So, if you’re a Quest Software customer using LiteSpeed, then you can enjoy all the benefits of speed, reduced disk consumption, and encryption that LiteSpeed offers.

 

To your second question, your current backup process, in which you backup the transaction logs every hour and the database nightly, is pretty sound.  Keep in mind that you could potentially lose up to 59 minutes of data with any given database failure.  If 59 minutes does not represent a significant amount of work on the database in question, then great!  However, I rarely had a production database where I was comfortable making users re-key up to 59 minutes of work.  Fifteen minute intervals for a transaction log dump were more in my range of comfort.  Additionally, consider that most applications do NOT have users working around the clock.  Because of that very natural business cycle, you can often lessen or even completely discontinue transaction log backups during the wee hours.  For example, you might run the transaction log backups every 15 minutes from 6:00 AM EST to 8:00 PM EST every day, since you have few if any users after that time.  Alternately, you might run the log dumps ever 15 minutes from 6:00 AM to 8:00 PM EST, run them hourly from 8:00 – 10:00 PM EST, and then only do one more full database backup until the next morning.  Frequent log backups are important also because that’s the primary means by which you keep the transaction log from growing too large.

 

Finally, with your last question, starting a transaction log backup while a full database backup is still running will behave differently on different versions of SQL Server.  For SQL2000, SQL Server doesn’t allow you to run the transaction log backup while the full database backup is running (at least that’s what my fragile memory is telling me).  For SQL2005 and later, transaction log backups and full database backups can run concurrently though the transaction log backup will certainly be slower because of it and the database backup will likely be slower too.  The full database backup will contain all data in the state of the database at the time it completed, while the transaction log backup will contain all of the transactions that have run since the last full database backup OR transaction log backup.  Since the transaction log backup will probably finish before the 90 minute long database backup, you should think of that transaction log backup as the last log backup before the new full database backup starts the transaction log backup process all over again.  Thus, in an emergency restore situation, you could apply the previous day’s full database backup plus all transaction logs up to the time that the transaction log ran concurrently with tonight’s full database backup to get a recovery that included all transactions up to the most recent point in time.  Once the full database backup completes, however, the clock is started over and you would have to start applying transaction log backups that were subsequent to the completion of the full database backup.

 

Hope this helps,

 

-Kevin

DBA Q&A: West Michigan SQL User Group

Filed under: Administration — Brent Ozar at 8:48 am on Thursday, August 14, 2008

At the West Michigan SQL Server User Group last night, I asked a few questions out of curiosity to see what other DBAs thought about some current issues.

Are you having a hard time hiring DBAs? None of the audience was, actually, because they couldn’t get any money to hire new staff.  One DBA in attendance was actively looking for a position and hadn’t been able to find one in the last couple of months, something I’d never heard in Texas or Florida.

Are you installing SQL 2008 for testing in the next 60 days? About 30% of the audience was, and the rest said they didn’t have the time.

Are you using virtualization for any servers (not just SQL?) About 40% were.

Are you using virtualization for SQL Server? No one used it in production, and about 10% used it for development.

What’s the next skill you want to learn? A few attendees said SSIS, and one attendee said he wanted to get better at backup & recovery.  I followed up to ask if anyone was considering PowerShell, and no one was.  (I’m curious to see what kind of adoption PowerShell gets - will it be like CLR in the database?)

Have you read up on HP Polyserve? About 40% of the audience had done some research on HP’s consolidation solutions.  I hadn’t heard of HP Polyserve until a few months ago.  I’m not endorsing it, but everything I’ve read and heard has been pretty interesting.

Is anyone running SQL Server in Windows-only authentication mode? No one was - everyone uses mixed mode authentication.  One attendee said that even if the application said they only needed Windows authentication, he still used mixed mode because they might revise their needs later.  This poll result surprised me because I thought maybe I was the only one stuck in mixed-mode.  Glad to hear I’m not alone!

Proving CPU Pressure - or - What’s a Signal Wait?

Filed under: Internals and Architecture, SQL Server 2005, Tuning and Optimization — Ari Weil at 1:08 pm on Wednesday, August 13, 2008

This is not an entirely new post, I won’t lie. Lately I’ve been asked about signal waits quite a few times, so I wanted to point to a past post. In Scheduler Yields = CPU Pressure…or do they? I discussed signal waits and talked a bit about wait event analysis. Here’s some additional and summary information… Wait event analysis is the practice of looking at SQL Server wait events to determine the cause of specific instance/database/statement/application behavior. Microsoft refers to this as analyzing waits and queues. Basically, the execution model for a session dictates that each session is either running, waiting or sleeping. The queues organize sessions into buckets of running, runnable or suspended. If a session is running, it is actively running and using CPU resources. If a session is runnable, it is waiting for CPU time. If a session is suspended, it is waiting for another physical resource to become available. This is best described using the [fantasy version of a] supermarket analogy where CPU is a cashier, a session is a person in line (in the queue to use the UK vernacular) and a resource is anything from change to preferred shopper cards to coupons:

  • When a customer gets to the cashier, he/she is running (using CPU)
  • Everyone else in line is runnable, waiting for time with the cashier
  • As soon as the customer needs to reach for change, dig for coupons, he/she is immediately moved to the back of the line (put in the suspended queue) and the next customer in line (in the runnable queue) gets to move up to the cashier

Where people get confused is when signal waits come into play. Signal waits are actual waits for CPU time - pure CPU wait measurements. So, if you are analyzing wait events, and are trying to come up with an aggregated time for instance/database/statement/application activity, you need to add up the wait event time AND the signal wait time to get a complete picture. I’ll post more on this topic at a later time to go into more detail. If you have any questions or want more information on specific information, please comment.

Efficiency and Effectiveness On The Job

Filed under: I'm a Newbie, Other, Professional Development — KKline at 3:52 pm on Friday, August 8, 2008

Check out this latest vblog entry on the topic of efficiency and effectiveness on the job.  I hope that this information helps you in both your career and day to day on the job.

As always, I appreciate your feedback on these vblogs.

Kevin

The basics of snapshots

Filed under: Backup and Restore — Brent Ozar at 10:37 pm on Tuesday, August 5, 2008

“Snapshots” is one of those words that gets tossed around a lot.  In a nutshell, a snapshot is a point-in-time copy of a piece of data.  It might be a single database, it might be a drive, or it might be a SAN array.

There’s (at least) 3 kinds of snapshots:

  • Application-level (in this case, SQL Server, but I like to illustrate snapshots by talking about Word’s change-tracking features.  Those aren’t exactly snapshots, but you get the idea.)
  • Windows-level (Volume Shadow Copy Services, or VSS)
  • SAN-level

The difference between the levels is who’s doing the change tracking, and each level has its own advantages.

With SQL Server 2005’s snapshots, the DBA controls the whole process inside SQL Server Management Studio.  The snapshots appear as read-only databases, which can be really useful.  Say you automate the snapshot process and take a snapshot every morning at 8am, and then present that to your users as DatabaseName_8am.  Presto, if somebody drops an index or deletes records, they can go back to the 8am snapshot without calling the DBA.  Problem is, these snapshots aren’t useful for real backup – meaning, we can’t easily get ‘em off the database server.

With Windows-level snapshots using Volume Shadow Copy, the Windows admin controls the process inside their backup program of choice (Veritas, Microsoft DPM, etc).  Windows takes the snapshot and doesn’t care what’s on the drive.  The Wintel folks automate the process and shuffle the data off to tape.  Problem is, these snapshots aren’t useful for application-level restores, like letting our users query directly into the snapshot to see what changed.

With SAN-level snapshots, the SAN admin controls the process inside the SAN.  They take a snapshot of an entire array and present it to a backup server or shuffle it off to tape.  These combine the best of both worlds, because with solutions like EMC’s or NetApp’s, you can present the snapshot to your database servers or Exchange servers and query the snapshot just like it’s a live database.  One problem is that they cost an arm and a leg, and another issue is that they’re usually SAN-specific - meaning, each of your SANs will have its own snapshot technology, snapshot administration tools, and ways to go about using it.

Each of the snapshot technologies has its own pros and cons, and they’re all useful in different situations.

Which Version of SQL Server am I Running?

Filed under: Administration — KKline at 11:13 am on Tuesday, August 5, 2008

I frequently see questions like this – ”I am getting different version numbers for my SQL Server 2000 instances. All I’m aware of is 8.00.2039 - which is SP4.  These are these values I am getting, e.g. 8.00.2039, 8.00.2040, and 8.00.2148”?

 

Here are two great resources to help you out in the future:

 

http://sqlserverbuilds.blogspot.com/

 

http://sqlserver2000.databases.aspfaq.com/how-do-i-know-which-version-of-sql-server-i-m-running.html

 

Be sure to add them to your Favorites! 

 

Cheers,

 

-Kev

New (and Free) Beta Releases from Quest Software

Filed under: Uncategorized — KKline at 10:47 am on Tuesday, August 5, 2008

I’m not sure what the marketing department is planning over at Quest Software.  But I thought I’d take a moment to tell you about some new, and free, beta releases that are of interest to SQL Server professionals.  I also want to point out that I always want to hear your feedback about any Quest product and will make sure that it gets to the right people in the company so that your feedback can be addressed immediately.

So what’s new?

Toad for SQL Server 4.0 Beta:  This release, the final beta drop for v4.0, features an all-new UI with lots of process improvements.

    http://tech.groups.yahoo.com/group/toad_ss_beta/message/3377

    http://tech.groups.yahoo.com/group/toadss/message/3434

    http://www.toadsoft.com/toadsqlserver/toad_sqlserver_beta.htm

 

Toad for Data Analysis 2.0 Beta: This release includes lots of new enhancements and added features.

 

    http://tech.groups.yahoo.com/group/ToadforDataAnalysis/message/2216

    http://tda.inside.quest.com/thread.jspa?threadID=7206&tstart=0

   http://www.toadsoft.com/watson/beta.html

 

And don’t forget about Quest’s free SQL Server discovery tool that enables you to find SQL Servers anywhere within your enterprise, the SQL Server Discovery Wizard.

  

    www.quest.com/sqldiscovery

 

I look forward to hearing what you think soon!

 

-Kev

 

 

 

 

Next Page »