Sunday, October 5, 2014

0 SQL Server Application role

From SQL 2005, it allow us to create the application role.  After user connect to the database, it can use sp_setrole to switch the security context .

USE [TestDB]
GO
CREATE APPLICATION ROLE [ExcelRole] WITH PASSWORD = N'Pass@word'
GO
USE [TestDB]
GO
ALTER AUTHORIZATION ON SCHEMA::[db_datareader] TO [ExcelRole]
GO

image_thumb[5]

Reference

0 comments:

Post a Comment

 

SQL Panda Copyright © 2011 - |- Template created by O Pregador - |- Powered by Blogger Templates