1. Home
  2. Humor
  3. (Page 3)

Bad Idea Jeans Week: Building a Fork Bomb in SQL Server

Somewhat different than a sex bomb, a fork bomb is a denial-of-service attack that just starts a process that replicates itself, thereby starting more and more processes until the service goes down. Wikipedia’s fork bomb page lists examples on most operating systems (including Windows). I’ve always found fork bombs funny because of their elegant simplicity, so…
Read More

Creating Tables and Stored Procedures in TempDB – Permanently

No, not #tables – actual tables. Here’s how: Transact-SQL USE tempdb; GO /* This one is only available during my session: */ CREATE TABLE #myTempTable (ID INT IDENTITY(1,1), Stuffing VARCHAR(100)); GO /* This one is global, meaning it's available to other sessions: */ CREATE TABLE ##myTempTable (ID INT IDENTITY(1,1), Stuffing VARCHAR(100)); GO /* You can…
Read More

Microsoft Discontinues SQL Server Support for Windows

Microsoft announced today that the forthcoming SQL Server 2016 version won’t just run on Linux – it will only run on Linux. Mark Souza, Microsoft “When we started developing the Linux port of SQL Server, we weren’t really serious about it at all,” confessed Mark Souza, lead documentation author for the project. “But after a couple of weeks, we…
Read More

Contest: SQL Server Theme Songs

During this month’s Senior DBA Class in Chicago, I started joking with the attendees about what songs they should play during common DBA job tasks, like: Best Song to Play During a Server Outage Best Song to Illustrate Your Predecessor’s Skills Best Song to Accompany an Index Rebuild Best Song to Play When Examining a Slow Query Best…
Read More

Brent’s Bad Idea Jeans: Stop People From Changing Tables with This One Trick

Developers hate his bad idea jeans: Transact-SQL CREATE VIEW dbo.StopThemDead WITH SCHEMABINDING AS SELECT COUNT(*) FROM dbo.Table1 UNION ALL SELECT COUNT(*) FROM dbo.Table2 UNION ALL.... 123456 CREATE VIEW dbo.StopThemDead WITH SCHEMABINDINGASSELECT COUNT(*) FROM dbo.Table1UNION ALLSELECT COUNT(*) FROM dbo.Table2UNION ALL.... Presto, the schemabinding option means no one can change the underlying tables. (At least, until they…
Read More

The Nine Circles of Developer Hell

Commit message: Duck! Everyone’s code is terrible. But exactly how terrible is yours? First Circle: Code Limbo We can’t say this is good code, but for the most part nobody notices it. Second Circle: Code Lust Cool function, bro! Third Circle: Gluttonous Code There’s always one simple piece of logic that’s been written hundreds of…
Read More

Defragmentation Proven to Completely Fix Performance Issues

SPRINGFIELD – Local systems administrator Jackie Toole was carried through city streets today on the backs of ecstatic Acme Tooling employees. For months, Acme’s accounting department had complained of slow performance in their payroll application. “Saving a new hire took minutes, and we had no idea what was going on. Jackie did something, and next thing…
Read More

Overheard in Performance Tuning Training Class

A sampling of things overheard at our 2015 Performance Troubleshooting Class in Denver: “I’m not a GUID hater.” “Oh, God help me. I’ve clicked on XML.” “Reporting Services looks around at the available memory, makes itself at home, maybe takes its pants off.” “Where would I go to check if I — hypothetically — accidentally set…
Read More

The Most Confusing Words, Phrases, and Acronyms in SQL Server

Words are hard. Acronyms are even harder. Here’s the words that give me the most trouble when talking to people about SQL Server. And thanks to all my Twitter friends quoted here for their suggestions! Replication “I have a question about replication…” “Which kind? Transactional? Merge? Peer to Peer?” “Availability Groups.” Technically, the word “replication”…
Read More

Brent’s Bad Idea Jeans [Video]

Over the years, I’ve come up with some rather “interesting” answers to SQL Server problems including: Warming up SQL Server’s buffer pool by selecting all the data from all the tables Creating indexes with triggers Adding nonclustered indexes to clustered columnstore indexes Compressing backups the hard way Putting databases on a RAM drive In this 20-minute…
Read More