Stop People From Changing Tables with This One Trick

I received today's posts from Brent Ozar, I feel it is very interesting, LOL:


Brent Ozar says:
Stop People From Changing Tables with This One Trick

Brace yourselves. Our Black Friday sale is coming.
Developers hate his bad idea jeans:
CREATE VIEW dbo.StopThemDead WITH SCHEMABINDING
AS
SELECT COUNT(*) FROM dbo.Table1
UNION ALL
SELECT COUNT(*) FROM dbo.Table2
UNION ALL....
Presto, the schemabinding option means no one can change the underlying tables. (At least, until they figure out about your view.)
Obligatory disclaimer: seriously, this is a really bad idea. But it’s hilarious.

Comments

Popular posts from this blog

Sysaux tablespace is too big

patching Oracle Database 12.2.0.1 Release Update & Release Update Revision January 2021 Critical Issues (Doc ID 2725763.1)