Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Object does not exist error is getting if VIEW DEFINITION denied Expand / Collapse
Author
Message
Posted Monday, January 19, 2009 12:22 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 5:06 AM
Points: 196, Visits: 660
I have denied VIEW DEFINITION permission of all the objects of a database for a particular user. But he is getting an error like "Object does not exist or you do not have permission" while he is trying to execute some stored procedures. This error is coming ONLY for few stored procedures and rest everything is working properly. If I grant the View Definition permission to those objects it will work properly.

What could be the issue? Kindly help.


_____________________________________________
One ounce of practice is more important than tonnes of dreams
Post #639110
Posted Monday, January 19, 2009 12:31 AM
SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Monday, June 23, 2014 6:03 AM
Points: 920, Visits: 702
C.K.Shaiju (1/19/2009)
I have denied VIEW DEFINITION permission of all the objects of a database for a particular user. But he is getting an error like "Object does not exist or you do not have permission" while he is trying to execute some stored procedures. This error is coming ONLY for few stored procedures and rest everything is working properly. If I grant the View Definition permission to those objects it will work properly.

What could be the issue? Kindly help.



GRANT EXECUTE Permission on object this will resolve your problem.


Abhijit - http://abhijitmore.wordpress.com
Post #639112
Posted Monday, January 19, 2009 1:12 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: General Forum Members
Last Login: Today @ 6:39 AM
Points: 39,955, Visits: 36,310
What do those few stored procs that fail do that the ones that work don't? Access the system tables?


Gail Shaw
Microsoft Certified Master: SQL Server 2008, MVP
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

We walk in the dark places no others will enter
We stand on the bridge and no one may pass

Post #639127
Posted Monday, January 19, 2009 3:38 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 5:06 AM
Points: 196, Visits: 660
Hi Abhijit,

EXECUTE permission is already there. When I DENY VIEW DEFINITION permission it is giving the above error, otherwise not.

Hi Gail,
Those sps are not accessing any system tables.

Thanks,
Shaiju C.K.


_____________________________________________
One ounce of practice is more important than tonnes of dreams
Post #639154
Posted Monday, January 19, 2009 3:46 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, September 23, 2014 5:06 AM
Points: 196, Visits: 660
Please find one of the sp script below.

ALTER PROCEDURE [dbo].[pLoadDoctors]
@WardID SMALLINT
AS
SET NOCOUNT ON
BEGIN
SELECT
distinct Doc.ID as DoctorId ,
(Doc.DoctorCode + ' - ' + Doc.DoctorName) as DoctorCode
FROM tblRegistration C
JOIN tblADMISSION AS AD ON AD.MRN=C.MRN AND AD.VisitNumber=C.VisitNumber
JOIN tblSecondaryAttendingDoctors as RD on RD.MRN = C.MRN AND RD.VisitNumber=C.VisitNumber AND RD.IsDeleted =0
JOIN tblStatusMaster as SM ON SM.ID=C.RegistrationStatusID AND SM.ID <> 4
JOIN tblBedMaster as Bed on AD.BedId = Bed.ID
JOIN tblRoomMaster as Ro on Ro.Id = Bed.RoomId
JOIN tblWardMaster as W on W.ID = Ro.WardID
JOIN tblStatusMaster as S on S.ID = RD.StatusID
JOIN tblDoctorMaster As Doc on RD.DoctorID = Doc.ID
where W.ID = @WardID
AND AD.Isdeleted =0
AND ( C.RegistrationStatusID=1 OR C.RegistrationStatusID=5 ) -- only for open & Discharged visits
AND C.VisitTypeID = 3 AND C.ChargetypeID ='2' -- considering only the Admission
AND AD.ChargeTypeID = '2'
AND C.ISDeleted =0
Order by (Doc.DoctorCode + ' - ' + Doc.DoctorName) asc
END


_____________________________________________
One ounce of practice is more important than tonnes of dreams
Post #639158
Posted Monday, January 19, 2009 9:18 AM


Keeper of the Duck

Keeper of the Duck

Group: Moderators
Last Login: Friday, September 26, 2014 7:52 AM
Points: 6,624, Visits: 1,873
I don't see anything that stands out as causing the view definition right to be needed. All of these have the tbl prefix, so I'm assuming all are tables and not views. This sounds like a bug. If no one else comes up with an answer other than "grant the permission," you may want to consider posting it on connect.microsoft.com under SQL Server.

K. Brian Kelley, CISA, MCSE, Security+, MVP - SQL Server
Regular Columnist (Security), SQLServerCentral.com
Author of Introduction to SQL Server: Basic Skills for Any SQL Server User
| Professional Development blog | Technical Blog | LinkedIn | Twitter
Post #639389
Posted Tuesday, January 20, 2009 2:03 AM


Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, September 18, 2014 1:05 AM
Points: 14, Visits: 220
grant exec on [sp] to [user]
Post #639723
Posted Thursday, August 23, 2012 4:53 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, March 29, 2014 10:16 PM
Points: 34, Visits: 111
The Error message is:

"domain\user does not have permission to alter object 'mf20'..................."
I gone through the work around and found the solution as below:

Open Services, go to Analysis services--->right click on it --> Properties-->LogOn --> select This Account -->give server and your user name here. confirm it is your user, click ok.

Stop the service and again start the service. check the service Log On As in your user name.

Thant's it. save your cube in BIDS and close and reopen the cube, then deploy the cube. it will deploy and process it.


I hope this will help.
Post #1349014
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse