Check if any database has auditing configured
Here is a DMV script to check whether a or any database has the auditing configured and running, along with...
2018-09-18
757 reads
Here is a DMV script to check whether a or any database has the auditing configured and running, along with...
2018-09-18
757 reads
Do you ever wonder if there are any databases in your environment that may just be there but not being...
2018-09-18
182 reads
SELECT TOP 50
QueryState.execution_count
,OBJECT_NAME(objectid)
,query_text = SUBSTRING(
qt.text,
QueryState.statement_start_offset/2,
(CASE WHEN QueryState.statement_end_offset = -1
THEN len(convert(nvarchar(max), qt.text)) * 2
ELSE QueryState.statement_end_offset
END - QueryState.statement_start_offset)/2)
,qt.dbid
,dbname = db_name(qt.dbid)
,qt.objectid
FROM sys.dm_exec_query_stats QueryState
CROSS APPLY sys.dm_exec_sql_text(QueryState.sql_handle) as qt
ORDER BY...
2018-09-18
2,093 reads
A while back I built an automated process that parses JSON strings into a relational format.
Up until recently this process...
2018-09-18
1,526 reads
Watch this week's video on YouTube
A while back I built an automated process that parses JSON strings into a relational format.
Up until recently this process had been working great:...
2018-09-18
9 reads
Watch this week's video on YouTube
A while back I built an automated process that parses JSON strings into a relational format.
Up until recently this process had been working great:...
2018-09-18
10 reads
/*Get list of all queries hitting any specific tables*/SELECT DISTINCT TOP 100ProcedureName = OBJECT_SCHEMA_NAME(sqlTxt.objectid) + '.' + OBJECT_NAME(sqlTxt.objectid),SQLStatement = SUBSTRING(sqlTxt.Text,(QueryState.statement_start_offset/2)+1,CASE QueryState.statement_end_offsetWHEN -1 THEN DATALENGTH(sqlTxt.text)ELSE QueryState.statement_end_offsetEND...
2018-09-18
3,872 reads
If you haven’t registered for the 2018 PASS Summit and plan to go, you might press to get registration done...
2018-09-17
872 reads
The requirement of data refactoring is very common and vital in data mining operations. In the previous article, you’ll learn...
2018-09-17
271 reads
So, what do you really know about bots or how they can help your organization? You may be thinking, Pragmatic...
2018-09-17
176 reads
By Steve Jones
I recently started playing with the MCP Server for SQL Server, which is a...
If you spend your days tuning queries, managing pipelines, or keeping a production database...
I’ve been rebuilding my three-site SQL Server demo lab, and I ran into something...
Has anyone written a wrapper function (or similar) around STRING_AGG() to allow the retrieval...
Putting this here as we're currently on SQL Server 2019 installed on Windows Server...
Comments posted to this topic are about the item Never is Not the Policy
I have added a few indexes to one of my tables in SQL Server 2025:
ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
PRIMARY KEY (CustomerID);
-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerPhone
ON dbo.CustomerContact (phone);
I then do this to disable one index:
alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disableI see this when I check the index status:
I decide to rebuild all indexes with this command:
ALTER INDEX ALL ON dbo.CustomerContact rebuildAfter I do this, what will I see for the index status? See possible answers