August 2010 - Posts

Grant SPROC Permission to an Application Account

With the principle of least privilege of application / database account, web app normally uses a DB account with limited permission to specific database objects in Connection String.

Manually typing of "GRANT EXECUTE ON <Object> to <User>" seem handy but it's hard to manage if the number of SPROCs, Functions or Views is over tens or hundreds.

This article shows how can we grant permission in batch easily: http://www.codeproject.com/KB/database/T-SQL.aspx

The key point is to retrieve the name of all custom objects from sysobjects table, for example,

declare cur_myobj cursor for select name from sysobjects where type='P' and name like 'MyApp_%'

Posted by Colt | with no comments
Filed under:

Back Pressure Problem in ASP.NET Emailing

I got an error message about "Back Pressure" when I was developing a ASP.NET emailing function recently. The code and configuration are good and I have no idea what is this issue, so I search MSDN and found this page about what is "Back Pressure" (for Exchange 2010 by the way).

Finally, I found that the problem is due to insufficient space on the Exchange server. So adding/mounting new drive to that server and solve this problem immediately! I'd suggest to read that MSDN page and try this solution whenever you see error about Back Pressure of Exchange.

Posted by Colt | 10 comment(s)
Filed under:
More Posts