Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Defining Application Roles

Posted on 2014-12-15
4
Medium Priority
?
96 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:Ray
Ray earned 2000 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 2000 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 52

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

610 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