Solved

Defining Application Roles

Posted on 2014-12-15
4
86 Views
Last Modified: 2014-12-24
Please experts:
in that scenario I can use an application role?

Application roles are used to enable permissions for users only while they are running particular applications
0
Comment
Question by:enrique_aeo
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:Ray
Ray earned 500 total points
ID: 40501838
10775 - I guess you're referring to the MS course - Administering Microsoft SQL Server 2012 Databases

I guess we'll need more details for the scenario to address your specific questions.  

In general, if you want your users to work with SQL Server data only when they run a specific application, application roles can be useful tools. For example, suppose you have an inventory-control database and you've built an application that lets users work with inventory. You might not want your users to connect directly to the inventory-control database or to modify sales data. By granting permissions to an application role, rather than to users or database roles, you ensure that users can access inventory data only when running the application.

Application roles can also simplify security administration. Suppose you have many users who access SQL Server through only one application and you don't want to have to manage individual logins and enable database access for each user. An application role requires only one login, which many users can share.
0
 

Author Comment

by:enrique_aeo
ID: 40501857
I need users to connect from excel; but not using the user name and password to connect from SSMS.
0
 
LVL 7

Accepted Solution

by:
Ray earned 500 total points
ID: 40501903
Private mcnn As ADODB.Connection
Private mrst As ADODB.Recordset

Private Sub Form_Load()
  Dim strConn As String

' Create the connection.
  strConn = "Provider=sqloledb;" & _
    "Data Source=(local);" & _
    "Initial Catalog=Products;" & _
    "OLE DB Services = -2;" & _
    "Integrated Security=SSPI"

  ' Open the connection, and activate the application role.
  Set mcnn = New ADODB.Connection
  mcnn.Open strConn
  mcnn.Execute "sp_setapprole 'ProductApprole', 'password'"
End Sub
0
 
LVL 45

Expert Comment

by:Vitor Montalvão
ID: 40504951
Yes you can create an Application role for let the users connect to a database through an application only.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now