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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 72
  • Last Modified:

Report execution error:The permissions granted to user are insufficient for performing this operation.

A client is reporting that they get this error ..... any reason why?

I HAVE tried adding permissions in report manager under site settings AND folder settings
0
vbnetcoder
Asked:
vbnetcoder
  • 8
  • 6
  • 4
1 Solution
 
Mike EghtebasDatabase and Application DeveloperCommented:
Most likely, some of the tables queried is not in the chain of ownership. The user in question doesn't have to read from certain tables.
0
 
vbnetcoderAuthor Commented:
Really? every user that views my reports has to have permission to the tables?
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
If you are not admin, ask them to look at the ownership chain. If a view is used for this purpose, then the view may include a table lacking proper ownership.
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

 
vbnetcoderAuthor Commented:
I am an admin so what should i be looking at?
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
What the report based on?

SP, View, or table(s)?
0
 
vbnetcoderAuthor Commented:
I am using stored procedures to return the data from the tables
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
every user that views my reports has to have permission to the tables?
Sure. You need to see the SSRS as any application or website. Who will work with that need to have access to the database objects.
0
 
vbnetcoderAuthor Commented:
can you give me a screen shot on how to do this? Do i have to do this for every sp and table or can i do it all at one somewhere?
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
First of all, apart of the reports there is any other application that has access to the database?
0
 
vbnetcoderAuthor Commented:
no, only the reports
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Ok. Since it's only reports they will only need read permissions so you need to create their login and grant them the respective read permission and for that you can use the db_datareader role:
EXEC sp_addlogin 'DOMAIN\UserName' --> assuming that are AD users
GO
USE DatabaseName
GO
EXEC sp_addrolemember 'db_datareader','DOMAIN\UserName'

Open in new window

0
 
vbnetcoderAuthor Commented:
i get this error  

'domain\username' is not a valid name because it contains invalid characters.
0
 
Mike EghtebasDatabase and Application DeveloperCommented:
In your sp, there must be a view or some tables queried. Make sure the users have right to reach the sachems the view or tables belong. It seems the ownership of some of those tables is not granted.

Mike
0
 
vbnetcoderAuthor Commented:
so i reverse the \ to / and get

'domain/username'  does not exists in the database
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
'domain\username' is not a valid name because it contains invalid characters.
Please substitute DOMAIN with your domain name and USERNAME with a valid user name. They are only an example and you should replace with real values.
0
 
vbnetcoderAuthor Commented:
yeah that's what i did ....
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Let replace it with the CREATE LOGIN command:
CREATE LOGIN [<domainName>\<login_name>] FROM WINDOWS;

Open in new window

0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
I've realized now that I forgot the CREATE USER  statement. So this should be the complete script:
CREATE LOGIN [<domainName>\<login_name>] FROM WINDOWS
GO
USE DatabaseName
GO
CREATE USER [<domainName>\<login_name>] FOR LOGIN [<domainName>\<login_name>] WITH DEFAULT_SCHEMA=[dbo]
GO
EXEC sp_addrolemember N'db_datareader', N'[<domainName>\<login_name>]'

Open in new window

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

  • 8
  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now