Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Sometimes, Troubleshooting Is Hard

I hop in the Jeep the other day and turn on my ham radio. Have I mentioned I'm a licensed amateur radio operator? Yeah, yeah, I know. I won't shut up about it. Ha! My call sign is KC1KCE. I haven't been on HF in a while, but I'm regularly on the air locally here in OK. I also take a radio with me sometimes while traveling, so you might hear me on your local repeaters.

OK. Back to the story.

I turn on my radio. I'm going to go ahead and name and shame in this story. It's a Radioddity DB-25D. It's a Digital Mobile Radio (DMR) so it can do both digital and analog transmission and reception. I also own it's sister, the GD-88, a handheld DMR radio. Now, I used to love this radio. When I first got it, it did so much. Active Packet Reporting System (APRS), DMR, analog, all in a tiny little package with a great color screen, I was happy as could be. Fit nicely on the dash in the Jeep. Great radio.... well, two years in. This thing is quirky and strange. Some days, it just won't turn on. I can't figure out why. I've traced the cable. It has power. Fuses aren't blown. Everything is, in theory, fine. But the radio won't turn on. Next day. Fires right up. Nothing changed. So, anyway, this time, it turns on. I grab the microphone. I hit the Push-to-talk (PTT) button. The radio restarts. Weird. Hit the PTT. It restarts. OK. That's odd. Well, I'm on Channel A. I'll switch to Channel B (this radio actually has two transceivers built in, unlike a lot of radios that only have one and bounce between VFO A & B to act like two radios). Hit the PTT. Restarts. I show my wife, "Look at this stupid thing." She could care less about radios, but at least I have a witness. Well, OK. Must be a problem in the microphone. I unplug it. Check the connection. Looks good. Plug it back in. PTT, restart. Fine. I actually have a second one of these radios (another story, but I have a brand new, in the box, only used once radio and I didn't pay a penny for it). So, try that microphone and PTT. Restart. OK. Radio is dead right? It has to be internal. I switch frequencies. Hit the PTT. It's fine. WHAT IN THE EVER LUVIN.... OK. Switch back to the first frequency. It's fine. Swap to Channel A. It's fine. Radio is fine. Everything is working. Plug in the original microphone. It's working too.

Yeah, the radio just randomly decided, on its own, to behave in a strange manner. Then, decided, on its own, to fix itself.

A few days earlier, I was working on code samples for the book I'm writing (an update to the query tuning book for SQL Server 2025). I'm running some queries and then looking at them in cache. Only, the query isn't in cache. What the heck? I run it a few times. Maybe I turned on Optimize for Ad Hoc. Nope. Still not in cache. Double check. Yes, the query is running. I'm not getting errors. It just won't go into cache. It's in the Query Store. I can see it run in Extended Events. It won't go into cache. Fine. I try another query. Nope. Another. Nope. Cache simply isn't letting queries in. I check all the settings. Memory. Everything. No joy. Queries are executing, but nothing is visible in sys.dm_exec_query_stats. I restart the container. It's fine. Everything is fine.

Never had that problem before. I've never had it since. Just one, random slice in time where everything got weird for a bit, just like with my radio. Troubleshooting can be hard.

Oh, and if anyone has a recommendation for a mobile DMR radio that does APRS, I'm in the market. Just have to convince Michele. Wish me luck!

Grant Fritchey

Join the debate, and respond to today's editorial on the forums

 
  Featured Contents
SQLServerCentral Article

Getting In: Running External Code in a Locked-Down PaaS

Tonie Huizer from SQLServerCentral

In Part 1, I explored how to bend SQL Server Agent to our will and peek under the hood of Azure SQL Managed Instance (SQL MI), gaining full OS access to the container (all without relying on xp_cmdshell). But once I realized what kind of door I'd opened, curiosity pushed us further, tempting us to […]

SQLServerCentral Article

Dimensional Modeling Case Study, Part 4 – Dynamic Time Duration Dimension

Hang Liu from SQLServerCentral

In this next article, we look at creating balanced dimensions on demand.

Learn Microsoft Fabric: A practical guide to performing data analytics in the era of artificial intelligence

Site Owners from SQLServerCentral

A step-by-step guide to harness the power of Microsoft Fabric in developing data analytics solutions for various use cases

 

  Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

The Updated Columns List

I have this table in SQL Server 2022:
CREATE TABLE CustomerLarge (CustomerID INT NOT NULL IDENTITY(1, 1) CONSTRAINT CustomerLargePK PRIMARY KEY CLUSTERED , CustomerName VARCHAR(20) , CustomerContactFirstName VARCHAR(40) , CustomerContactLastName VARCHAR(40) , Address VARCHAR(20) , Address2 VARCHAR(20) , City VARCHAR(20) , CountryCode CHAR(3) , Postal VARCHAR(20) ) GO
If I check the columns_updated() function return in a trigger, what is the data returned?

Think you know the answer? Click here, and find out if you are right.

 

 

  Yesterday's Question of the Day (by Grant Fritchey)

SQL Server Columnstore Index Fragmentation

The columnstore index is absolutely different than the traditional rowstore b-tree index. Because of this, it doesn't suffer from the same kind of fragmentation across pages as the b-tree index. Yet, it does suffer from a type of fragmentation brought about by an excess of deleted rows in a rowgroup and a lack of compression of storage because more things are in the delta store. While b-tree indexes use dm_db_index_physical_stats to show fragmentation, which system tables or DMVs can be used in SQL Server (prior to SQL Server 2025) to determine columnstore fragmentation?

Answer: sys.dm_db_column_store_row_group_physical_stats, sys.column_store_row_groups

Explanation: Both sys.dm_db_column_store_row_group_physical_stats and sys.column_store_row_groups show both the total_rows and deleted_rows that would enable you to identify fragmentation within a columnstore index. The query would look something like this:

SELECT OBJECT_NAME(i.OBJECT_ID) AS TableName, i.NAME AS IndexName, csrg.row_group_id, csrg.state_description, csrg.total_rows, csrg.deleted_rows, 100 * (total_rows - ISNULL(deleted_rows, 0)) / total_rows AS PercentFull FROM sys.indexes AS i JOIN sys.column_store_row_groups AS csrg ON i.OBJECT_ID = csrg.OBJECT_ID AND i.index_id = csrg.index_id WHERE NAME = 'cci_bigTransactionHistory' ORDER BY OBJECT_NAME(i.OBJECT_ID), i.NAME, row_group_id; 

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2019 - Development
do i lose "what this object depends on" etc when moving sprocs to etl server - Hi i was surprised to see the approach my coworkers used to sunset talend , a combo etl and job scheduling tool.  They were in a hurry. Basically, the talend transforms /jobs they needed to do something with ran a proc on the "ERP Servers" and loaded the extracted data into various databases on our […]
Editorials
People Make Odd Choices - Comments posted to this topic are about the item People Make Odd Choices
Navigating Multi Platform Realities in My Database Life - Comments posted to this topic are about the item Navigating Multi Platform Realities in My Database Life
Formatting Dates and Times: The SQL Dialect Divide - Comments posted to this topic are about the item Formatting Dates and Times: The SQL Dialect Divide
Article Discussions by Author
How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory - Comments posted to this topic are about the item How a Legacy Logic Choked SQL Server in a 30-Year-Old Factory, which is is not currently available on the site.
SQL Server 2022 Clusterless Distributed Availability Group - Comments posted to this topic are about the item SQL Server 2022 Clusterless Distributed Availability Group
Query Plan Regressions -- - Comments posted to this topic are about the item Query Plan Regressions --
Revolutionizing Efficiency: The Power of Custom Automation Software Development - Comments posted to this topic are about the item Revolutionizing Efficiency: The Power of Custom Automation Software Development
SQL Server and AI: Integrating Machine Learning Services - Comments posted to this topic are about the item SQL Server and AI: Integrating Machine Learning Services
Has the PK been used -- - Comments posted to this topic are about the item Has the PK been used --, which is is not currently available on the site.
Has the PK been used -- - Comments posted to this topic are about the item Has the PK been used --
SQL Server 2022 - Administration
Import/Export SSMS Settings issue - I have tried a number of times to export and then import my SSMS settings as I migrate local computers or sign into new servers. But for some reason, my toolbar customization and my keyboard settings (or other Tools -> Options) settings never pass through. I always seem to get errors like this:   Your […]
FQDN - SQL cannot connect when the server name has backslash - Hi I need to connect to a SQL server via FQDN -  that is named 'ABC\ABC' If I try to connect to [ABC\ABC].mydomainfullyqualified.com it does not work. Tried many other combinations also. ABC.mydomainfullyqualified.com, all sorts of combinations. Nothing works.. If I change to a different server that does not have the back slash in the […]
Upgrading from 2012 to 2022 - Hi, Would it be possible to upgrade from sql server 2012 sp4 to sql server 2022 in one upgrade step, or would it require intermediate upgrades? Thanks for any recommendations.
SQL Server 2022 - Development
Please help to optimize the query - Hi Experts, Thanks in advance. I am new to SQL. Can you please help me in optimizing the query?   CREATE FUNCTION [dbo].[UDF_GET_REVIEWERS_INFO_FOR_COI](@awardId NUMERIC, @nomineeIds varchar(max),@phaseSettingId NUMERIC_ID) RETURNS TABLE AS RETURN SELECT ReviewerMasterCustomerId=Reviewer.MASTER_CUSTOMER_ID, ReviewerName=Reviewer.First_Name+' '+Reviewer.Last_Name, --START Nominator Centric COICount= CASE WHEN Prog.IS_NOMINATOR_CENTRIC =1 THEN (SELECT [dbo].UDF_GET_NOMINATOR_CENTRIC_COI_COUNT(@phaseSettingId,NomineeReviewer.REVIEWER_MAST_CUST_ID,1)) ELSE sum(CASE WHEN NomineeReviewer.COI_STATUS=1 THEN 1 ELSE 0 END) […]
 

 

RSS FeedTwitter

This email has been sent to [email protected]. To be removed from this list, please click here. If you have any problems leaving the list, please contact the [email protected]. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
[email protected]

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -