Comments for Born SQL https://bornsql.ca/ A blog about the Microsoft Data Platform Wed, 03 Sep 2025 17:43:54 +0000 hourly 1 https://wordpress.org/?v=6.9.4 Comment on Get required permissions for DMVs by Eric Zierdt https://bornsql.ca/blog/get-required-permissions-for-dmvs/#comment-31067 Wed, 03 Sep 2025 17:43:54 +0000 https://bornsql.ca/?p=19630#comment-31067 Very Cool. I decided to dump all the results into a table so I could query/see it easier, here’s some code to do that:

CREATE TABLE #DMVResults (
ID INT IDENTITY(1,1)
, DMV VARCHAR(256)
, Scope VARCHAR(50)
, RequiredPermissions VARCHAR(256)
, SupersetPermissionThatAlsoWorks VARCHAR(256)
, YouHaveIt BIT
)

DECLARE @DMVCode VARCHAR(120)
DECLARE ZCursor CURSOR LOCAL FAST_FORWARD FOR
(
SELECT ‘EXEC dbo.DmvPermission @dmv=”sys.’ + name + ”’;’
FROM sys.system_objects
WHERE name LIKE ‘dm_%’ AND type = ‘V’
)
OPEN ZCursor
FETCH NEXT FROM ZCursor INTO @DMVCode
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO #DMVResults (
DMV
, Scope
, RequiredPermissions
, SupersetPermissionThatAlsoWorks
, YouHaveIt
)
EXEC (@DMVCode)
FETCH NEXT FROM ZCursor INTO @DMVCode
END

CLOSE ZCursor
DEALLOCATE ZCursor

SELECT *
FROM #DMVResults
WHERE RequiredPermissions ‘VIEW SERVER STATE’

]]>
Comment on SQL Server Management Studio uses the Visual Studio installer by Randolph https://bornsql.ca/blog/sql-server-management-studio-uses-the-visual-studio-installer/#comment-31009 Sat, 23 Aug 2025 01:13:21 +0000 https://bornsql.ca/blog/sql-server-management-studio-uses-the-visual-studio-installer/#comment-31009 We updated the SSMS installation article with a new table to explain this better.

]]>
Comment on What’s new in SQL Server 2025 CTP 2.0 by Michael S FULLER https://bornsql.ca/blog/whats-new-in-sql-server-2025-ctp-2-0/#comment-30756 Fri, 30 May 2025 16:05:33 +0000 https://bornsql.ca/?p=19603#comment-30756 I’d like to concentrate on two significant features that I hope to see in future SQL Server releases: the ability to perform selective table restorations and how this could integrate with current replication technologies, as well as the capability to execute recoveries independent of the version.

1.) Selective Table Restoration
SQL Server does not have a native way to restore only one table from a backup. This means that if you need to recover a single table from a backup, you must recover the whole database. This can take a lot of time and resources, especially for large databases.

Restoring tables selectively would let users recover only the tables they want, saving time and resources. This feature would be handy in situations where a particular table has been mistakenly changed or deleted. Instead of having to recover the whole database, users could just recover the relevant table from a backup. This would be similar to Recovery Manager (RMAN) Table Point In Time Recovery (PITR) in Oracle.

2.) Log Shipping Subsets of Tables
As you know Log shipping is a solution for high availability and disaster recovery that SQL Server offers. It works at the database level, meaning that it copies the whole database from one server (the primary server) to another (the secondary server).

I have run across several situations where copying the whole database is not needed or wanted. For example, a user might only need to copy a subset of tables for reporting reasons. In such cases, the option to log ship a subset of tables would be very helpful and reduce the data footprint tremendously lots of my databases are over 4 TB, and we only need a subset downstream for reporting.

For example a Subset Restore for Initializing Transactional Replication on VLDB’s.
Initializing transactional replication can be difficult when dealing with very large tables, especially those with over a billion rows.

The snapshot agent, which is in charge of initializing the replication by generating a snapshot of the published database objects and data, does have trouble with such large tables. This can cause performance issues and long initialization times.

One possible solution to this problem is the addition of a subset initialization restore feature. This would allow users to restore only the necessary tables for publications, rather than the entire database. By using subset initialization backup instead of the snapshot agent would make the process more efficient.

]]>
Comment on What’s new in SQL Server 2025 CTP 2.0 by Gonzalo Medina https://bornsql.ca/blog/whats-new-in-sql-server-2025-ctp-2-0/#comment-30752 Sat, 24 May 2025 22:13:00 +0000 https://bornsql.ca/?p=19603#comment-30752 I wish Microsoft would bring some “exciting” improvements to Power BI Reporting Services; I am talking about the paginated reports, no Power BI reports.

]]>
Comment on What’s new in SQL Server 2025 CTP 2.0 by Chris Wood https://bornsql.ca/blog/whats-new-in-sql-server-2025-ctp-2-0/#comment-30750 Tue, 20 May 2025 19:47:42 +0000 https://bornsql.ca/?p=19603#comment-30750 I just saw the SQL2025 announcement and wondered if anyone could talk about what to expect in SQL2025 and I thought of you and bingo you have written about the latest release. On June 1st the Edmonton Group will make this available https://sessionize.com/edmdata-2025 so would you want to present to the group on SQL2025.
It would be good to hear from you again.

Chris

]]>
Comment on Don’t run CHKDSK while SQL Server is running by Randolph https://bornsql.ca/blog/dont-run-chkdsk-while-sql-server-is-running/#comment-30711 Sat, 10 Aug 2024 17:54:30 +0000 https://bornsql.ca/?p=19588#comment-30711 In reply to Kay Sauter.

This post was more targeted at system administrators, not DBAs. Thank you for commenting!

]]>
Comment on Don’t run CHKDSK while SQL Server is running by Kay Sauter https://bornsql.ca/blog/dont-run-chkdsk-while-sql-server-is-running/#comment-30710 Sat, 10 Aug 2024 17:49:59 +0000 https://bornsql.ca/?p=19588#comment-30710 I couldn’t agree more, Randolph. (Great to read from you again, by the way!)
However, a lot of DBAs do not administer the windows server they are their DBs having on. That are oftentimes other folks. If someone of them has the glorious idea to run CHKDSK /r with a schedule, the only hope of the DBA is to have a backup. Therefore: Take backups. Frequently. Hope is not a strategy!

]]>
Comment on You can’t run SQL Server on Apple Silicon, and it sucks by Randolph https://bornsql.ca/blog/you-cant-run-sql-server-on-apple-silicon-and-it-sucks/#comment-30646 Fri, 16 Sep 2022 04:06:19 +0000 https://bornsql.ca/?p=14365#comment-30646 In reply to John Landry.

It sounds like you installed SQL Server on Windows. Did you use Parallels?

]]>
Comment on You can’t run SQL Server on Apple Silicon, and it sucks by Randolph https://bornsql.ca/blog/you-cant-run-sql-server-on-apple-silicon-and-it-sucks/#comment-30645 Fri, 16 Sep 2022 04:03:11 +0000 https://bornsql.ca/?p=14365#comment-30645 In reply to Sunil K.

Which version of SQL Server did you install using Docker Desktop?

]]>
Comment on You can’t run SQL Server on Apple Silicon, and it sucks by Sunil K https://bornsql.ca/blog/you-cant-run-sql-server-on-apple-silicon-and-it-sucks/#comment-30644 Fri, 16 Sep 2022 03:49:00 +0000 https://bornsql.ca/?p=14365#comment-30644 You can run sqlserver on a Mac m1 using docker desktop. You can also save the data files on the Mac side, and also use azure data studio to run queries and manage the database.

]]>
Comment on You can’t run SQL Server on Apple Silicon, and it sucks by John Landry https://bornsql.ca/blog/you-cant-run-sql-server-on-apple-silicon-and-it-sucks/#comment-30631 Thu, 15 Sep 2022 19:12:34 +0000 https://bornsql.ca/?p=14365#comment-30631 In reply to Brian.

I was able to get Microsoft SQL installed on my M1 MacBook Pro utilizing Microsoft SQL 2014 (32 bit). I am not an SQL expert. I have two windows-based programs that I have to utilize for my construction company, which rely on Microsoft SQL to work. After installing SQL 2014 (32) bit, both programs ran without any issues.

]]>
Comment on Dates and Times in SQL Server: the problem with DATETIME by randolph https://bornsql.ca/blog/dates-and-times-in-sql-server-the-problem-with-datetime/#comment-30477 Sat, 03 Sep 2022 23:03:30 +0000 https://bornsql.ca/?p=2009#comment-30477 In reply to Jeff Moden.

Thanks Jeff. I hear where you’re coming from, and life has quite a different perspective now that I’m inside the belly of the beast.

]]>
Comment on Dates and Times in SQL Server: the problem with DATETIME by Jeff Moden https://bornsql.ca/blog/dates-and-times-in-sql-server-the-problem-with-datetime/#comment-30475 Sat, 03 Sep 2022 22:27:22 +0000 https://bornsql.ca/?p=2009#comment-30475 To be sure, one of the big reasons why I like the ANSI standards is because they allow direct date math, particularly what you cited about what I said about how easy is is to calculate durations quite accurately as well as it being quite easy. I won’t change my position on that.

I’ll also say that it wouldn’t take much to change my mind but Microsoft has been of no help even as 2022 is less than the horizon away from going public. Having recently to have to work with UNIX TimeStamps at the ms level has only added to the exasperation I feel. What on Earth was Microsoft thinking when they came out with the DATEDIFF_BIG() function without also producing a DATEADD_BIG() function? Further, it’s 2022… why is there no DURATION() Function? It’s not like people haven’t needed one since SQL Server and Sybase first hit the streets.

Oh, yeah… I know all the workarounds. My point is, it IS 2022 and these types of problems have existed in the world of relational databases for decades. We shouldn’t need to do such workarounds in this day and age.

Anyway, let me take this as another opportunity to say “Thank You” again, Randolph, for all of the great articles, presentations, and discoveries you’ve done and made in the past and continue to do. You’re definitely one of the “greats”.

]]>
Comment on Is DBCC SHRINKFILE (filename, EMPTYFILE) fully logged? by Jeff Moden https://bornsql.ca/blog/dbcc-shrinkfile-filename-emptyfile-fully-logged/#comment-30104 Sat, 06 Aug 2022 16:50:59 +0000 https://bornsql.ca/?p=570#comment-30104 Yeah, nothing like me dredging up a 6 year old article from the past but that also shows how relevant and timeless some articles can be. Thanks again, Randolph.

]]>
Comment on Is DBCC SHRINKFILE (filename, EMPTYFILE) fully logged? by randolph https://bornsql.ca/blog/dbcc-shrinkfile-filename-emptyfile-fully-logged/#comment-30097 Sat, 06 Aug 2022 06:09:08 +0000 https://bornsql.ca/?p=570#comment-30097 In reply to Jeff Moden.

From what I recall of this, yes.

]]>