Matt decided that this month for TSQL Tuesday, he would pull out all stops to help us break out the inner prankster in ourselves.
You can read all about it from his invitation here.
Reading the invitation made me immediately flash to a couple of recent possibilities or things that maybe others had done.
For instance, I thought about the April Fools post I did about Backups in SQL 2014. Mix a little truth and a splash of fun and you have a believable April Fools blog post. You can read that post here.
Then I thought momentarily on a great post by Paul Randal for April Fools. Paul talked about a great prank that could be pulled on some co-workers and it would really get them in a frenzy. You could read about his Day 0 checksum issue here.
Then I flashed to something a friend tried to pull on me. He sent me a script to the following tune.
SELECT 'principal name' = p.NAME ,
'principal creation date' = p.create_date ,
'password' = ca.passwordcrack ,
'instance sid' = p.sid,
'user type' = p.type
FROM master.sys.server_principals p
CROSS APPLY ( SELECT p1.principal_id ,
CAST(0x596F75207468696E6B2070617373776F726473206172652074686174206561737920746F206465637279707420696E2053514C205365727665723F2E2E2E417072696C20466F6F6C277321 AS VARCHAR(1023))
+ ISNULL(CONVERT(VARCHAR(10), NULLIF(POWER(p1.principal_id,
0), 1)), ' ')
FROM sys.server_principals p1
) ca ( principal_id, passwordcrack )
WHERE p.type LIKE '[GUS]'
AND ca.principal_id = p.principal_id
For the seasoned DBA, the joke in this one is easy to spot. But it will still catch some people and it could provide a good laugh.
But my favorite piece of seriousness to parley in the workplace comes from this gem.
This gem from our friends at ThinkGeek®, can provide several minutes of hard laughter. You plug this into an USB port that is not very visible and then camp out and watch for the fun to begin. If they are typing in SSMS, you could end up with some real fun (random key strokes inserted into keywords etc).
Whatever you do, please do not attempt this with somebody who will be connecting to a Production instance.