SQL Server

Grant Login and Database Access for Hosting a Database with Integrated Security in IIS using ASP.NET 4.0

This is used for moving the database files from one server to another or whenever similar identity elements are changed.

  • SQL Server Code
USE GridTrak
EXEC sp_grantlogin 'NT AUTHORITY\NETWORK SERVICE'
EXEC sp_grantdbaccess 'NT AUTHORITY\NETWORK SERVICE'
EXEC sp_grantlogin 'IIS APPPOOL\ASP.NET v4.0'
EXEC sp_grantdbaccess 'IIS APPPOOL\ASP.NET v4.0'

You can also use the sp_grantlogin and sp_grantdbaccess procedures to grant access for User logins.

Last edited Mar 23, 2011 at 12:07 AM by ajstadlin, version 3

Comments

No comments yet.