How to Create an Application Role in a Database of SQL Server - SQL Server DBA Tutorial

In this video you will learn how to create Application Role in SQL Server database role using SQL Server management studio as well as using T-SQL Script. It also illustrates best practices of creating application role in SQL Server Database, when it is good idea to create application role and what types of application requires application role in SQL Server Database.

Script used to Create Application Role in a Database of SQL Server in this video

USE [SalesOrders]
GO
 

CREATE APPLICATION ROLE [AppReader] WITH DEFAULT_SCHEMA = [dbo], PASSWORD = N'Pa$$w0rd'GO 
USE [SalesOrders]
GO
 

ALTER AUTHORIZATION ON SCHEMA::[db_datareader] TO [AppReader]
GO

 USE [SalesOrders]
GO
 

GRANT SELECT ON [dbo].[Customers_3] TO [AppReader]
GO
 

USE [SalesOrders]
GO

 GRANT UPDATE ON [dbo].[Customers_3] TO [AppReader]
GO




Create an Application Role in a Database of SQL Server

2 comments:

  1. what is difference between application an database role

    ReplyDelete
  2. Push your shoulders back, straighten your spine, and lift your chin. You'll start to feel in control and calm your anxiety. Vidmate

    ReplyDelete