Tuesday, December 18, 2007

Vacation

The hardest thing to do on vacation is stop reading email. At least in January I managed to leave the country and turn off my email redirection to avoid roaming charges. It's also not accurate to think that if you take time off and don't go anywhere, that you will get stuff done. At least I knocked out some Christmas shopping.

Wednesday, December 12, 2007

Useful Script

Here is a SQL script that grants execute access to all user stored procedures and functions. While I didn't write this particular script, it comes in handy after a restore!

IF EXISTS (SELECT * FROM sysobjects WHERE NAME = 'GrantExecOnStoredProc')
DROP PROCEDURE dbo.GrantExecOnStoredProc
GO
CREATE PROCEDURE dbo.GrantExecOnStoredProc @SQLUserName SYSNAME AS
SET NOCOUNT ON
DECLARE @cmd VARCHAR(200)
CREATE TABLE #tmp (cmd VARCHAR(100))
INSERT INTO #tmp
SELECT 'GRANT EXECUTE ON ' + NAME + ' TO ' + @SQLUserName
FROM sysobjects WHERE XTYPE = 'P' OR XTYPE = 'FN'
WHILE (EXISTS (SELECT * FROM #tmp))
BEGIN
SELECT TOP 1 @cmd = cmd FROM #tmp
EXEC (@cmd)
DELETE FROM #tmp WHERE cmd = @cmd
END
DROP TABLE #tmp
SET NOCOUNT OFF
GO

EXEC GrantExecOnStoredProc '[SQL\AD Account]'

Monday, December 10, 2007

Blogging is a habit..

So, I guess that if you don't blog often, you don't blog at all. I will now make an effort to blog, more often.

That being said, I'm going to get back on track.

Seriously, the writer's strike is killing me. First they end Heroes early, then they delay 24. Now we may not have Lost for a while and Family Guy might be done for good. I can't imagine how bad the movies are going to be that get released a year form now if this doesn't stop soon. Is there not enough money in Hollywood to go around? Perhaps George Clooney can live on $9mil instaed of $10mil? Can you imagine if all Windows Systems Engineers went on strike? How about just Exchange Administrators..

I guess I need to buy more DVDs or something. Maybe Netflix can follow the IRS's lead and say "Click here to donate $1 of you subscription to the Writer's Guild."