SQL Server Application Roles
From: Jonathan Allen (x_at_x.x)
Date: 11/19/05
- Previous message: John: "Capture IP Address"
- Next in thread: Jonathan Allen: "Re: SQL Server Application Roles"
- Reply: Jonathan Allen: "Re: SQL Server Application Roles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Sat, 19 Nov 2005 14:12:39 -0800
Is this the correct way to use application roles?
Public Function GetDBConnection() As SqlConnection
Dim oCon As New SqlConnection(myConnectionString)
oCon.Open()
Using oCmd As SqlCommand = oCon.CreateCommand
oCmd.CommandText = "IF NOT User_NAME() = 'app_name' Exec
sp_setapprole 'app_name' ,'password"
oCmd.ExecuteNonQuery()
End Using
Return oCon
What is a good way to embed/encrypt the application role's password in the
program?
-- Jonathan Allen
- Previous message: John: "Capture IP Address"
- Next in thread: Jonathan Allen: "Re: SQL Server Application Roles"
- Reply: Jonathan Allen: "Re: SQL Server Application Roles"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]