Wednesday, September 22, 2010

Ms Sql Server Grant Execute against sub-set of stored procs

Thanks to Karlson for this -
Here's a script that can grant execute (or whatever you wish to grant) to a set of stored procs based on a prefix in the stored proc name:

Set nocount on
Declare @proc_name as nvarchar(max)

     FOR Select [name] FROM    sysobjects WHERE [name] like '[sp prefix here]%' AND xtype = 'P'

OPEN procs

INTO @proc_name


    exec('Grant Execute ON ' + @proc_name + ' TO [roleName here]')

    INTO @proc_name
CLOSE procs;
Set nocount off

Monday, September 20, 2010

Another business idea

One of my clients just moved into a brand new office tower.  Everyone was all pumped about the new digs - lights that have movement sensors that turn off automatically when no one is in the room and turn on when someone comes in, new desks and chairs, new faster elevators,etc.  However, upon using the 'facilities' for the first time, I couldn't help but notice a common problem I see in many public bathrooms around the city.  Paper towel fills up the garbage cans too fast.  Nobody wants to compact it with their hands.  Inevitably, it overflows before the janitors make their rounds.
My business idea this go round is to import/sell garbage can compactors to these public buildings in the city that have this problem.  Other places where I've seen this issue (besides busy office tower washrooms) are airports and universities.

Thursday, September 9, 2010

Open Source Bug/Issue Tracking System

In the last couple of weeks I've been helping facilitate the development process (through build & deployment automation, etc) on a new project, and I was asked to spin up a new instance of Trac for the project team. It didn't take me long to get it going.  I was amazed at the rate of adoption of this tool by the team as a whole.  The business was very positive about the tool and had no issues with learning it and beginning to log tickets.  I will definitely keep this tool in mind in the future as it is relatively easy to install, straight forward to use, integrates with Subversion and Active Directory, and fulfills all the basic requirements for a bug/issue tracking system that my project team was looking for.