• Skip to main content
  • Skip to primary sidebar

DallasDBAs.com

SQL Server Database Consulting

  • Services
  • Pocket DBA®
  • Blog
  • Testimonials
  • Contact
  • About

Kevin3NF

POLL: What is most important to you?

December 8, 2020 by Kevin3NF Leave a Comment

I’m running a poll on both LinkedIN and Twitter asking the same question.  Adding it here to see how the responses vary with each audience:

What aspect of your "main" database(s) is the MOST important to your organization?

  • Reliability (100%, 1 Votes)
  • Security (0%, 0 Votes)
  • High Availability/DR (0%, 0 Votes)
  • Performance (0%, 0 Votes)

Total Voters: 1

Loading ... Loading ...

Thanks for responding. Feel free to comment in the comment section!

Kevin3NF

Filed Under: Uncategorized

Virtual Log Files

November 24, 2020 by Kevin3NF Leave a Comment

Today’s post is a guest article from a friend of Dallas DBAs, writer, and fantastic DBA Jules Behrens (B|L)

One common performance issue that is not well known that should still be on your radar as a DBA is a high number of VLFs.

Virtual Log Files are the files SQL Server uses to do the actual work in a SQL log file (MyDatabase_log.LDF). It allocates new VLFs every time the log file grows. Perhaps you’ve already spotted the problem – if the log file is set to grow by a tiny increment, then if your the file ever grows very large, you may end up with thousands of tiny little VLFs, and this can slow down your performance at the database level. Think of it like a room (the log file) filled with boxes (the VLFs). If you just have a few boxes, it is more efficient to figure out where something (a piece of data in the log file) is, than if you have thousands of tiny boxes. (Analogy courtesy of @SQLDork)

It is especially evident there is an issue with VLFs when SQL Server takes a long time to recover from a restart. Other symptoms may be slowness with autogrowth, log shipping, replication, and general transactional slowness. Anything that touches the log file, in other words.

The best solution is prevention – set your log file to be big enough to handle its transaction load to begin with, and set it to have a sensible growth rate in proportion to its size, and you’ll never see this come up. But sometimes we inherit issues where best practices were not followed, and a high number of VLFs is certainly something to check when doing a health assessment on an unfamiliar environment.

Find your VLF counts

The built-in DMV sys.dm_db_log_info is specifically for finding information about the log file, and command DBCC LOGINFO (deprecated) will return a lot of useful information about VLFs as well. There is an excellent script for pulling the count of VLFs that uses DBCC LOGINFO from Kev Riley, on Microsoft Tech Net:

https://gallery.technet.microsoft.com/scriptcenter/SQL-Script-to-list-VLF-e6315249

There is also a great script by Steve Rezhener on SQLSolutionsGroup.com that utilizes the view:

https://sqlsolutionsgroup.com/capture-sql-server-vlf-information-using-a-dmv/

Either one of these will tell you what you ultimately need to know – if your VLFs are an issue. How many VLFs are too many? There isn’t an industry standard, but for the sake of a starting point, let’s say a tiny log file has 500 VLFs. That is high. A 5GB log file with 200 VLFs, on the other hand, is perfectly acceptable. You’ll likely know a VLF problem when you find it; you’ll run a count on the VLFs and it will return something atrocious like 20,000. (ed – someone at Microsoft support told me about one with 1,000,000 VLFs)

Resolution

If the database is in Simple recovery model and doesn’t see much traffic, this is easy enough to fix. Manually shrink the log file as small as it will go, verify the autogrow is appropriate, and grow it back to its normal size. If the database is in Full recovery model and is in high use, it’s a little more complex. Follow these steps (you may have to do it more than once):

  • Take a transaction log backup .
  • Issue a CHECKPOINT manually.
  • Check the empty space in the transaction log to make sure you have room to shrink it.
  • Shrink the log file as small as it will go.
  • Grow the file back to its normal size.
  • Lather, Rinse, Repeat as needed

Now check your VLF counts again, and make sure you are down to a nice low number. Done!

If you need help, contact us

Thanks for reading!

Kevin3NF

Filed Under: HealthCheck, Performance Tuning, Troubleshooting Tagged With: performance, syndicated

Renaming SQL Server Databases

October 12, 2020 by Kevin3NF Leave a Comment

Video walkthrough of renaming or “flipping” databases to minimize down time during a refresh.  Most commonly when moving a copy from prod to dev.

My Pluralsight courses for new SQL Server DBAs

Thanks for reading!

Kevin3NF

Follow @Dallas_DBAs

Filed Under: SQL, video Tagged With: syndicated, video

Getting Started With SQL Server Maintenance

August 25, 2020 by Kevin3NF Leave a Comment

My second Pluralsight course for Junior and Accidental DBAs is finally released!

This course covers many of the SQL Server Maintenance items I do every day, week, and month for my servers:

My first course is a good (but not required) starter, covering history, installation, some configuration and the SQL Server tools:

I’d love to get your opinions, questions and ratings for either or both of these. I’m already planning the next one!

Pluralsight courses require a paid subscription.

If you want some FREE training, check out my YouTube channel.

Thanks for watching!

Kevin3NF

Follow @Dallas_DBAs

Filed Under: Accidental DBA, Career, Pluralsight, Training, video

TSQL Tuesday: Learn From Others

July 14, 2020 by Kevin3NF Leave a Comment

My Pluralsight course for new SQL Server DBAs

 

T-SQL Tuesday is a monthly blog party for the SQL Server community. It is the brainchild of Adam Machanic (b|t) and this month’s edition is hosted by Kerry Tyler (b|t), who  has asked us to write about “Learning From Others“, by telling about a time something went bad and how it got fixed.

I have an “In Real Life” series of blog posts that are exactly this:

  • Non-yielding IOCP Listener

  • Cannot Connect to SQL Server

  • SQL Server HealthCheck

  • Instance Tuning

  • Massive T-Log File

  • Availability Group Performance

    • This one took three different DBAs to sort out. I was number 3.
  • Test Restores and CheckDB

    • More of a “how can we solve this issue” request than a “something broke”

There are a couple of additional issues in the hopper, just haven’t had time to write them up.

Thanks for reading!

Kevin3NF

Follow @Dallas_DBAs

Filed Under: Uncategorized

SQL Server Express Size Limit

July 2, 2020 by Kevin3NF Leave a Comment

My Pluralsight course for new SQL Server DBAs

 

(Needs to upgrade to a bigger bowl)

Common scenario:

Company is using SQL Server Express to save on licensing costs for a small database. Over time this database grows and is getting close to the hard 10GB limit.

I just got off the phone with a client and their client is in this situation. During the conversation, she mentioned that the DB has information for four “regions.”

They already have a purge process in place, and compression is not an Express Edition feature.

Options I gave:

  • Decrease the retention (her client already said no to this)
  • Split the data into 4 databases – 1 for each region
    • Might require some re-work of applications and connection strings
  • Install a second Express instance and split the data between them
    • Easier on their app
  • Convince the end customer to buy SQL Standard (1% chance this is going to happen)
  • Buy Standard Edition for them and eat/split the cost to keep a huge customer happy
  • Move to a different platform (nope…all SQL Server shop)
  • I saw a blog post that you can bypass 10GB by using the Master database instead
    • That’s the worst idea I’ve ever read. If you do that, never call me. 🙂

If you have other legitimate things I should add to this list that Microsoft will support, please share in the comments.

Conclusion:

If your data is important, buy the proper version for your needs.  Maybe that’s Standard, maybe an Azure VM and spread out the SQL licensing over many months. But don’t do crazy things to try to get around the limits.

Thanks for reading!

Kevin3NF

Follow @Dallas_DBAs | |

Filed Under: Configuration, SQL, Troubleshooting Tagged With: syndicated

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 11
  • Go to page 12
  • Go to page 13
  • Go to page 14
  • Go to page 15
  • Interim pages omitted …
  • Go to page 44
  • Go to Next Page »

Primary Sidebar

Search

Sign up for blogs, DBA availability and more!

Home Blog About Privacy Policy
  • Home-draft
  • Blog
  • About Us

Copyright © 2026 · WordPress · Log in

 

Loading Comments...