Scripts

Technical Article

Execute on DMVs without user having View Server State

Wanted to share this script to the community just in case anyone out there may be search for a way to allow a hosted customer the ability to query certain DMVs for information without granting them View Server State. There are some other options out there, but this worked better for me after going through […]

5 (1)

You rated this post out of 5. Change rating

2020-09-24

1,902 reads

Technical Article

Fiscal/Retail 4-5-4 Calendar Function

This function returns a 3 year calendar based on a 4-5-4/5-4-4/4-4-5 calendar, also known as a 52/53 week calendar.  The basis of this calendar function was derived from the NRF retail calendar published at https://nrf.com/resources/4-5-4-calendar and the Wikipedia article published at https://en.wikipedia.org/wiki/4%E2%80%934%E2%80%935_calendar. The calendar function requires 2 helper functions.  The helper functions were derived from […]

You rated this post out of 5. Change rating

2020-09-21 (first published: )

2,616 reads

Technical Article

Table Variable Deferred Compilation (SQL 2019)

I have explored the SQL Server 2019, Intelligent Query Processing Feature – “Table Variable Deferred Compilation”.

The script contains some theory at the top and links to read.
After that, there are required queries to run on SQL Server 2019.
This way we can see the feature in action and look at it's strengths and caveats.

3.67 (3)

You rated this post out of 5. Change rating

2020-08-03

1,422 reads

Technical Article

Post SQL Server Installation steps with PowerShell

I bet, each DBA would change some settings after the SQL Server installation as per their company standard . I wrote this PowerShell script for one of my client who has below standards: Port should be 1433, static Disable SQL telemetry* & SQLWriter services Change recovery model to FUll for all databases except tempdb and […]

5 (2)

You rated this post out of 5. Change rating

2020-07-02 (first published: )

2,535 reads

Technical Article

move db files to different location dynamically

Lately, I'm dealing with lots of DB migrations and came across situation that I have no proper dynamic script to move DB files to different location. There are an option to proceed manually scripting one by one DB and execute it. Another option is detach attach DB - I'm not a big fan of this […]

3 (2)

You rated this post out of 5. Change rating

2020-07-01 (first published: )

1,726 reads

Technical Article

Insert Multiple Rows

Insert multiple rows in the table using insert syntax which is the same as single insert rows. So, we have to use value likewise, single rows than there is the same process but include coma and insert the value of another row in your query. In this paragraph, we were given a syntax with insert […]

You rated this post out of 5. Change rating

2020-06-29

1,238 reads

Blogs

Async stats update causing blocking

By

I recently encountered an issue where an index rebuild set to wait_at_low_priority ended up...

Level Up Your SQL Skills: The Best Intermediate to Advanced Courses

By

In the data-driven landscape of 2024, advanced SQL isn't just a nice-to-have, it's a...

Query deadlock info in Azure SQL DB

By

A couple of weeks ago, a developer came to me and wanted to know...

Read the latest Blogs

Forums

how to find the cpu memory disk and network of the OS where RDS is residing.

By rajemessage 14195

hi, i have one RDS, but i do not have any other permissions, and...

“user_scans” of table “sys.dm_db_index_usage_stats”

By Meera

I am trying to find answer to the below. What exactly the scan means...

how to assign studentid from one table to other one? please

By Zond Sita

Good Morning,   how to assign query one results to query 2 student id,...

Visit the forum

Question of the Day

A Lack of Memory Grant Feedback Persistence

SQL Server has added an Intelligent Query Processing feature called Memory Grant Feedback. In SQL Server 2022, this can be persisted across queries to improve the performance of future executions. In SQL Server 2022, when is memory grant feedback not persisted if the plan is evicted from cache? (choose 2)

See possible answers