• Skip to main content
  • Skip to primary sidebar

DallasDBAs.com

SQL Server Database Consulting

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

SQL

TIL: Duplicate Registered Server Entries

November 27, 2020 by SQLDork Leave a Comment

@SQLDork continues to make my brain hurt with questions like these – Ed.

So i’m doing my usual set of work, and i think to myself, “What would happen if i made two registered server entries that point to the same server?”. Naturally, i asked Kevin (b|t) for his thoughts on it, and naturally, he told me to test it, so i did:

Running SELECT @@Servername against both these groups gives these results:

Interestingly enough, there’s that _2 appended to the second copy of server SQLPD07, which means somebody at Microsoft (t) thought this same thing at some point, so they included it in the SSMS code.

That’s all i (b|t) got for this post, this is just the part where i link to my twitter several times more than necessary, because reasons™

Thanks for reading,

Kevin and Liz

Filed Under: SSMS, TIL

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

The Ironic DBA—My First Year as a DBA [Part 4]

July 21, 2020 by SQLandMTB Leave a Comment

My Favorite and Recommended Training Resources

As I’ve been in intense, focused SQL Server training for the last year, I thought it would be a great time to share links to the resources I’ve gathered over the preceding months. To be clear, I’ve not yet had the chance to use all of these resources, but have saved them for future use. So, I can’t guarantee that all of these resources are of equal value or quality. Some types of presentations will appeal to you in various degrees based on your learning style.

I’m not going to list many specific blogs or non-dedicated training resources, but there’s a wealth of information out there if you search for it. One of the best things you can do is jump on Twitter and follow the #sqlhelp and #sqlfamily hashtags to find some of the best minds in the SQL community. You should also join the SQL Community Slack channel and get involved.

Basics for Beginners and Accidental DBAs

Kevin’s Getting Started with Your First SQL Server Instance on Pluralsight.

Though it’s not out yet—but should be very soon—Kevin has a new class on Getting Started with SQL Server Maintenance coming out on Pluralsight that is the perfect next step once you’ve completed his first class.

You should also check out Kevin’s YouTube channel for an array of quick videos on many basic SQL Server concepts you should know.

And to finish tooting our own horn here at Dallas DBAs, you should read all the posts in the Accidental DBA category here on the blog.

For the first of many links to Brent Ozar materials, I suggest starting with his DBA Training Plan series of blog posts to get grounded.

I highly recommend the Accidental DBA Series at SQL Skills. Prepare to go a lot deeper and take your time with these posts. I should probably go back and re-read all of these myself.

SQL Server Tutorial has a nice collection of beginner-level tutorials to help you get a grasp on concepts.

You should definitely subscribe to PASS’s DBA Fundamentals Virtual Group. You can peruse the meeting archive to find past webinars on a variety of topics.

You can learn about SQL Server, Azure, and more at Microsoft Learn.

Check out Kendra Little’s Training Plan for Junior DBAs Learning SQL Server, as well as her Dear SQL DBA series.

Topical Overviews

The SQL Server Central Stairways series covers everything from Azure to U-SQL and more. There’s no particular order to climb these stairways, but some will require more previous knowledge than others.

Microsoft has a collection of SQL Server and Azure Labs and Workshops available for free.

Online Classes, Webinars, and Streams

Get a grasp on the basic of indexes and how they work with Brent’s How to Think Like the SQL Server Engine.

Speaking of Brent Ozar, we got in on his Black Friday sale last year for his Recorded Class Season Pass, and it has been a fantastic experience. Not only is Brent a top-notch presenter and teacher, he constantly updates the classes with his latest live presentation, which means you can re-watch the class every few months and learn about different aspects of the topic at hand based on class participant questions.

You can see all the content from past SQL Bits conferences. There’s over 900 videos available spread across dozens of SQL and data-related topics.

Here’s a handful of SQL Server related channels you should definitely get subscribed to today:

    • Brent Ozar: YouTube or Twitch
    • Pinal Dave
    • Kevin Hill
    • Erik Darling
    • Kendra Little
    • Grant Fritchey
    • Bert Wagner
    • Redgate Videos featuring Kendra Little, Grant Fritchey, Steve Jones, and more.
    • DBA Fundamentals
    • GroupBy
    • PASStv

     

    SQL Scripting

    Brent Ozar: Learn to Query SQL Server with the StackOverflow Database

    Also take a look at the T-SQL Tutorial at Tutorials Point.

    Other Resources

    As always, Microsoft’s own SQL Server Technical Documentation will explain what’s really going on in and around SQL Server.

    Brent has a very nice list of Free Downloads for Powerful SQL Server Management.

    Redgate’s well-known Simple Talk series of blog posts is superb. You’ll find in-depth introductions such as Robert Sheldon’s great Introduction to SQL Server Security.

    Power BI

    Rather than put together my own separate list of Power BI resources, I can’t recommend this list of Power BI Learning Path – Free and Paid Resources by Eugene Meidinger more highly. You should also check out Eugene’s Pluralsight courses.

    And, of course, if you watch anything related to Power BI, you should watch the Guy in a Cube YouTube channel.

    Are there any great training resources you recommend that I haven’t mentioned here? Please link to them in the comments.

    Follow me on Twitter at @SQLandMTB, and if you’re into mountain bikes come over and check out my site NTX Trails.

    Follow @Dallas_DBAs

Filed Under: Accidental DBA, Apprentice, Beginner, Career, Training Tagged With: syndicated

The Ironic DBA—My First Year as a DBA [Part 3]

July 14, 2020 by SQLandMTB Leave a Comment

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“.

I thought I’d join the party this month and throw my latest post into the mix since my entire journey over the last year has been learning from others in the SQL community.

Junior DBA

On September 17, 2019, I was given a promotion from Apprentice to Junior DBA. By this point, I had three daily check clients and one weekly check client in my portfolio. Despite the promotion, I was (and remain to this day) very much in training mode. The primary reason for the change in status was the fact that I was starting to interact directly with some of my clients.

Until this point I had been performing my daily server checks and sending my reports to Kevin. From there, Kevin would let the clients know of problems critical enough to warrant their attention. Once I became a Junior, I began to send my own reports to one client and interject in emails to others.

Honestly, this was a bit nerve-wracking at first. While I’m no stranger to emailing clients for work or business, sending emails of a highly-technical nature—especially within a field where I am still quite green—was completely outside my wheelhouse. Kevin has corrected me privately or clarified terms for clients when something I’ve written isn’t completely accurate. I’m okay with this because it not only aids our clients in getting the most accurate information, but it also helps solidify terms and concepts in my mind.

Since promotion day, I’ve added three more daily clients to my routine. Each new client brings another level of complexity and new experiences—including one client using replication, and another using Availability Groups.

Impostor Syndrome

Being so new and inexperienced in a job is something I haven’t had to deal with for a long time. To be honest, it’s a very strange feeling to be a middle-aged man about a year into a third career.

I was just getting settled into feeling comfortable calling myself a graphic designer after about five years of experience. When our design clients started drying up and I began learning about photography in the hopes of starting a photography business, I ventured onto shaky ground again. Thankfully, I discovered I was a natural at photography and became rather good at it in a short period of time. Despite all that, the business never got of the ground because I underestimated just how saturated the local market was, so it was a non-starter as a business (and why I don’t count it as yet another career).

Now that I’m a little over a year into the SQL Server world, I’m starting to find balance again. For a long while, whenever I met someone who asked me what I do for a living, I had felt like an impostor saying, “I’m a DBA.” I would sort of waffle and respond with something like, “Well, I used to be…and then I…but now I’m learning to be a DBA.” It’s only recently that I’ve felt confident enough to just flat out declare, “I’m a DBA.”

Comparison is a losing game, especially when you’re comparing yourself to those who’ve been in the game for 20+ years. In my months of dedicated training, I’ve spent a lot of virtual time around DBAs who have been in the business for a long time. It’s easy to fall into the trap of comparing myself to them, but I constantly remind myself that I’m still new and haven’t discovered my area of specialization yet. The people I’m learning from typically have both experience and specialization in their toolbox.

Certification?

The biggest challenge over the last few months has been preparing for the 70-764 Administering a SQL Database Infrastructure exam. About the time Kevin laid this challenge out for me, we discovered that Microsoft was retiring most of the role-based certifications in favor of a new framework.

To be fair, Kevin never required me to take the certification exam. He only wanted me to study and learn the material as the next step in my DBA training. Knowing myself, however, I asked him to set me a goal for taking the exam, which helps me keep my focus and move forward toward a specific goal. In the wake of the COVID-19 pandemic, Microsoft has decided to keep the pre-existing certifications and exams through January of 2021. Our goal is for me to take the 70-764 exam by the end of September 2020.

I’ve been studying long enough now that I’m starting to find and take some free online practice tests for the exam. I have access to the official practice exam which I’ll probably attempt in August 2020 to find my weak areas before scheduling the official exam. I’ve also found several flash card decks on the Quizlet website that were created by previous exam-takers. I’m spending some time each day reviewing and quizzing myself using these decks.

I fully expect to not pass the exam, and I’m okay with that fact—I’ll still give it my best effort. Again, Kevin’s goal has been for me to learn and grow as a DBA through both study and experience, not collect certifications. As I work through the practice tests I’ve found so far, my biggest takeaway is that there’s no replacement for experience. Several times I’ve been completely stumped by an exam question that would likely not cause a problem for a DBA with several more years of experience. But each time I’m stumped by a question, I go research it and learn the answer, thereby increasing my own knowledge.

Maybe, just maybe, I’ll have enough knowledge internalized by exam time to pass, but I’m not going to be terribly disappointed if I don’t. This is just another step on the journey to becoming a better DBA.

Follow me on Twitter at @SQLandMTB, and if you’re into mountain bikes come over and check out my site NTX Trails.

Follow @Dallas_DBAs

Filed Under: Career, EntryLevel Tagged With: career, syndicated

  • « Go to Previous Page
  • Go to page 1
  • Interim pages omitted …
  • Go to page 10
  • Go to page 11
  • Go to page 12
  • Go to page 13
  • Go to page 14
  • Interim pages omitted …
  • Go to page 37
  • 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...