SQL Script to find the last executed commands on the SQl Server
Sometimes we needs to find out the last executed commands on the database server.
Below is the SQL script share by...
2015-01-08
1,969 reads
Sometimes we needs to find out the last executed commands on the database server.
Below is the SQL script share by...
2015-01-08
1,969 reads
Reading a Microsoft Article (which can be found here) while making sure I understood what can cause a query plan to...
2015-01-07 (first published: 2015-01-05)
7,952 reads
First this type of error is because a subquery returned more than one row when it wasn’t allowed to. In...
2015-01-07
1,284 reads
Here is an overview of the articles I published in the last quarter of 2014.
INTENSE SCHOOL
MCSE Prep: Overview of T-SQL Windowing...
2015-01-07
529 reads
Below is the script to find the fragmentation of the indexes created on a database.
SELECT OBJECT_NAME(OBJECT_ID), index_id,index_type_desc,index_level,
avg_fragmentation_in_percent,avg_page_space_used_in_percent,page_count
FROM sys.dm_db_index_physical_stats (DB_ID( N'Database name')...
2015-01-07 (first published: 2015-01-04)
7,236 reads
During my vacations at the end of 2014 I have finally finished a book on “SQL Server 2012 Integration Services...
2015-01-07
620 reads
The following blog describes how to use certain cloud-based Power BI for Office 365 products (Power View and Q&A) on...
2015-01-07
2,245 reads
This is me on the last cruise
In just a few more weeks I’ll be setting sail on the first of...
2015-01-06
1,087 reads
On 22 of January 2015, Microsoft Portugal is organising a new IT Pro Airlift 2015 – – Microsoft Data Platform event. This...
2015-01-06
1,071 reads
When a new year comes around it is always a great time to reflect on the previous year.
2014 was a...
2015-01-06
424 reads
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...
By SQLPals
SQL Server gMSA: Why DBAs Still Aren't Using It in 2026 ...
Comments posted to this topic are about the item Never is Not the Policy
Comments posted to this topic are about the item Automating SSAS Multidimensional Security Audits...
Comments posted to this topic are about the item Rebuilding All Indexes
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_CustomerEmail
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.CustomerContactAfter I do this, what will I see for the index status? See possible answers