A varchar(MAX) STRING_SPLIT function for SQL 2012 and above
An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.
2021-03-11 (first published: 2021-03-05)
2,141 reads
An alternative for Microsoft's STRING_SPLIT function that will work on SQL Server 2012 and higher.
2021-03-11 (first published: 2021-03-05)
2,141 reads
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 […]
2020-09-24
1,902 reads
See how to find those files that are not in use, but are taking up space on your instance.
2020-09-22 (first published: 2020-09-21)
1,978 reads
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 […]
2020-09-21 (first published: 2020-09-15)
2,616 reads
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.
2020-08-03
1,422 reads
A brand new, high-performing, "GetNumbers" or "fnTallyTable" function that can be used for defeating RBAR.
2020-07-02 (first published: 2016-03-23)
1,308 reads
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 […]
2020-07-02 (first published: 2020-06-21)
2,535 reads
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 […]
2020-07-01 (first published: 2020-06-24)
1,725 reads
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 […]
2020-06-29
1,238 reads
Avoid conversion errors when using UNION to stack rows from multiple tables.
2020-06-19 (first published: 2020-06-16)
3,759 reads
A couple of weeks ago, a developer came to me and wanted to know...
By SQLPals
Database Property LastGoodCheckDbTime to Get the Last Successful DBCC CHECKDB on a Database As one...
When you develop data pipelines in Microsoft Fabric (the Azure Data Factory equivalent in...
Comments posted to this topic are about the item Baseball Everywhere
I am working on a small test script on SQL server 2022 using python...
Upgrade to SQL2019 from 2012 Query is taking time, Need Query Optimization steps and...
I want to use the ADD SENSITIVITY CLASSIFICATION DDL to mark some columns in my SQL Server 2022 database as PII. Can I use this code?
ADD SENSITIVITY CLASSIFICATION TO dbo.sales.price, dbo.sales.discount WITH ( LABEL = 'Highly Confidential', INFORMATION_TYPE = 'Financial', RANK = 'INTERNAL ONLY' );See possible answers