Grant execute for all sp
Posted on 11/26/12 by dinaselect ‘grant execute on ‘ +
QuoteName(specific_schema) + ‘.’ +
QuoteName(specific_name) + ‘ to ta_user’
from information_schema.routines
where routine_type=’PROCEDURE’
Sql Server Restore DB from T-SQL
Posted on 11/26/12 by dinaUSE MASTER
GO
ALTER DATABASE TA_DEV
SET SINGLE_USER WITH ROLLBACK IMMEDIATE
Go
RESTORE DATABASE TA_DEV
FROM DISK = N’[C:\8ninths\data\2012.11.26.02.bak]‘
Go
ALTER DATABASE TA_DEV
SET MULTI_USER with ROLLBACK IMMEDIATE
Go
Job Interview Questions from Candidate
Posted on 11/23/12 by dinahttp://www.inc.com/jeff-haden/5-questions-great-job-candidates-ask-interviewers.html
What do you expect me to accomplish in the first 60 to 90 days?
What are the common attributes of your top performers?
What are a few things that really drive results for the company?
What do employees do in their spare time?
How do you plan to deal with…?
String Resource Insert Update Cursor
Posted on 11/18/12 by dina/*
delete from StringResources
where resourceType = ‘MicrosoftPropertyGroupPerformance’
update MicrosoftPropertyGroupPerformance set StringResourceKey = null
select * from StringResources where resourceValue = ‘ Audience consumed any of these alcoholic beverages in the last 30 days’
select * from MicrosoftPropertyGroupPerformance
select * from StringResources where resourceType = ‘MicrosoftPropertyGroupPerformance’ order by resourceValue
SELECT ‘MicrosoftPropertyGroupPerformance’, ‘en’, ‘tblMicrosoftPropertyGroupPerformance.’ + Convert(nvarchar(10),a.Id) + ‘.Footnote’, RTrim(LTrim(a.Footnote))
FROM MicrosoftPropertyGroupPerformance A
Inner Join (select distinct Footnote as Footnote from MicrosoftPropertyGroupPerformance ) B
On b.Footnote = a.Footnote
Order by a.Id
*/
Declare @rowId int
Declare @footnote varchar(255)
select @rowId = 1;
DECLARE DistinctMicrosoftPropertyFootnote CURSOR FOR
SELECT distinct Footnote as Footnote from MicrosoftPropertyGroupPerformance;
OPEN DistinctMicrosoftPropertyFootnote;
FETCH NEXT FROM DistinctMicrosoftPropertyFootnote;
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM DistinctMicrosoftPropertyFootnote INTO @footnote;
BEGIN
Insert into dbo.StringResources
select ‘MicrosoftPropertyGroupPerformance’, ‘en’, ‘tblMicrosoftPropertyGroupPerformance.’ + Convert(nvarchar(10),@rowId) + ‘.Footnote’, @footnote
Update MicrosoftPropertyGroupPerformance Set
StringResourceKey = ‘tblMicrosoftPropertyGroupPerformance.’ + Convert(nvarchar(10),@rowId) + ‘.Footnote’
where Footnote = @footnote
select @rowId = @rowId + 1
END
END;
CLOSE DistinctMicrosoftPropertyFootnote;
DEALLOCATE DistinctMicrosoftPropertyFootnote;
GO
Build Anonymous Type in Asp.net
Posted on 11/17/12 by dinahttp://beyondrelational.com/modules/2/blogs/61/posts/11203/anonymous-types-in-c-or-vb-net.aspx
http://peterkellner.net/2010/05/14/unit-test-jsonresult-aspnet-mvc-reflection/
Asp.net database resource strings management
Posted on 11/09/12 by dina No Comments »app_data access denied
Posted on 11/05/12 by dinamake sure web app has trust level of full
make sure app pool uses network service identiy and that network service identity has full control of directory
Azure federated access to web service data (odata, wcf)
Posted on 10/29/12 by dinaWhen Sean Iannuzzi was asked to secure a Web service for an existing database and Web application, he saw the benefits of using OData, but he didn’t think it was secure enough. See how he developed his own custom implementation with extra security.
