Tag: syndicated

  • Monday Monitor Tips: VLF Alerts

    A recent change made to Redgate Monitor to add a new alert for VLF count. This post looks at the change.

    This is part of a series of posts on Redgate Monitor. Click to see the other posts

    Tracking Virtual Log Files

    Virtual Log Files (VLF) are sections inside of your physical log file (.ldf). These have no fixed size or number per file, but there can be many. The architecture of the log is explained in this doc and it varies according to a number of factors.

    That doc also explains there are issues with too many VLFs inside of a log file. There are plenty of other posts about this (Brent Ozar, Kimberly Trip) and it is somethin you want to keep track of.

    Redgate Monitor changes and grows every week with new releases and one of the resent releases (14.0.41) included a new alert for VLFs.

    2025-02_0318

    To configure this, select the gear icon in the upper right of Redgate Monitor.

    2025-02_0319

    On the configuration page, select the Alert settings. This will bring you to the details for your alerts.

    2025-02_0320

    There are a number of items on the Alert Settings page, but scroll down to the bottom of the SQL Server Alerts section. The Virtual log file count is the last alert.

    2025-02_0321

    The default setting is to raise multiple alerts here. The settings are:

    • low: 100
    • medium: 300
    • high: 1000

    These may or may not be appropriate  for your system, and for me, I don’t know I’ve ever had time to worry about this and I might disable a low level alert and only have two, but you can decide what’s important to you.

    The important thing is that if you worry about VLFs in your environment, you can get alerted and track this over time.

    Redgate Monitor is a world class monitoring solution for your database estate. Download a trial today and see how it can help you manage your estate more efficiently.

  • A New Word: Tangency

    tangency– n.  a fleeting glimpse of what might have been.

    I tend to live in the real world as it is, not too dreamy or wishful that things were different. I tend to accept things as they are.

    I don’t see a lot of tangency, as I am more appreciative of where I am, knowing that if things had been different in my past, I’d be in a different place.

    I’m happy now, so I’m happy with the path I walked.

    However, I do see some tangency when I coach. Not for me, but for the kids, because I know that having some success breeds more desire and confidence. I want these young ladies to grow up strong and able to make the life they want.

    There are moments when I see the indecision or the lack of reaction or the mistake. Once in awhile there’s a split second where you think you’ve won, only to have the referee let you know you haven’t. To me, that’s a fleeting glimpse of what might have been.

    From the Dictionary of Obscure Sorrows

  • Making a PostgreSQL Backup in a Container

    I needed to back up a PostgreSQL database as a part of the repro for an issue I had. I hadn’t ever made a backup of PostgreSQL, so this was a learning exercise for me. Plus, a container made it slightly more complex than SQL Server. This post shows what I did.

    In looking over the documentation and in searches, everyone seems to use pg_dump to make a backup. This looks hokey and immature to me, essentially a command line tool to script things out.

    There is also a file level backup and a PITR backup strategy,  but those are more complex for my use case.

    So, how do I run pg_dump?

    I found this article, which is helpful, but contains a lot of stuff. Essentially, I need to connect to my container and run from there. I’ll use the exec with the it switch from Docker to do this.

    So, first I run this to get a shell inside the container.

    docker container exec -it pgdev /bin/bash

    The image below shows me connected to the container with a bash shell.

    2025-02_0286

    Now I can run pg_dump. I’ll use this command, which connects to the db with a user and sends a database backup to the /usr location.

    pg_dump -U postgres -Fc bb_fullrestore > /usr/bbfull.dmp

    Once this is done, I can go check. First, I’ll ls this folder and I see my file.

    2025-02_0287

    Summary

    As technology advances and I use containers more, I’m hesitant to keep installing stuff on my machine that I don’t need to. I’d rather have scripts. Trying to just get pg_dump installed is a pain, so this post shows how you can access this in a container and create a backup.

    If you’ve mapped your folders in a container to your local machine, then you can easily find this file and most it elsewhere for a restore.

  • T-SQL Tuesday #183 Roundup

    I hosted this month’s T-SQL Tuesday party with my invitation asking about tracking permissions. I didn’t get my own post completed in time, but I’ll add it in the next week sometimes.

    In any case, here’s a roundup of the posts I saw. If I missed any, ping me and I’ll add you.

    As usual, Rob Farley is first to respond. Since he’s in AUS and I can’t my New Zealand friends to participate, I’m always glad to see his post appear late on a Monday my time. His post looks at how he does health checks for clients, examining the permissions for logins. He doesn’t care if it’s a SQL login or not, but it should be a controlled login of some sort. He has other thoughts, and it’s a good look at the things you should consider when managing security with an eye on the reality of how people acesss data. Read this one.

    Shane O’Neil has some PowerShell for us. He works with AGs and separate instances, so he needs to ensure the correct logins are on each replic.

    Hugo Kornelis talks about how hard it is to get an overview of permissions. He says there is no permission heaven, but he has some suggestions on how to set up permissions.

    Deb the DBA gives us a few things to think about in a large organization. A nice overview of what to consider and how to talk to others.

    Rob writes about the importance of visibility in managing permissions.

    A relatively quiet month for T-SQL Tuesday (including me). If you are reading this, then I hope you are planning on participating next month. Let us know your thoughts on a topic. If you don’t have a blog, here is how to start.

    If you have a blog, where are you? Share some thoughts? Take 15-20 minutes and help pay it forward by helping others.