[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Sql server Permisson Query

Posted on 2014-08-12
3
Medium Priority
?
510 Views
Last Modified: 2014-08-13
I Created 1 Table and and stored procedure.(Sql server 2008)
I need to give access right to users

I created Group called Group1 and i add some users for that.

For example Table1 and Stored Procedure1
I gave this Grant using code below(T-sql)
 GRANT EXECUTE ON Table1 TO [TestServer1\Group1];
 GRANT EXECUTE ON stored procedure1 TO [TestServer1\Group1];

its execute successfully.

My query is I need to write VB.net code using following connection String
connetionString= "Data Source=TestServer1;Initial Catalog=MainDB;Integrated Security=SSPI"

Could you any  one show me How to give permission Table1 and Storedprocedure1

Need grant to access Insert,Delete,Execute store procedures1 and Table1

Thanks
0
Comment
Question by:ukerandi
3 Comments
 
LVL 35

Accepted Solution

by:
David Todd earned 1000 total points
ID: 40257136
Hi,

TestServer\Group1 - how did you add users to that?

What is the relationship between TestServer and the AD Domain?

HTH
  David
0
 
LVL 10

Author Comment

by:ukerandi
ID: 40257171
Create User group in TestServer
, Then Add users to that Usergroup1

All users in the group available in the AD directory
for example 1 user name
user1
Then AD Directory also User1
user1@companyname.com
0
 
LVL 43

Assisted Solution

by:Eugene Z
Eugene Z earned 1000 total points
ID: 40257212
there is no execute action on table.
if you plan to read data from table


USE yourdb
GRANT SELECT ON Table1 TO [TestServer1\Group1];
GO

--more

GRANT Object Permissions (Transact-SQL)
http://msdn.microsoft.com/en-us/library/ms188371(v=sql.105).aspx


also make sure
that login that is executing this connection is member of this windows group  [TestServer1\Group1] that must be added to sql logins;
connetionString= "Data Source=TestServer1;Initial Catalog=MainDB;Integrated Security=SSPI"
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
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

834 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