Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Object does not exist error is getting if VIEW DEFINITION denied


Object does not exist error is getting if VIEW DEFINITION denied

Author
Message
C.K.Shaiju
C.K.Shaiju
SSC Veteran
SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)

Group: General Forum Members
Points: 214 Visits: 707
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
Abhijit More
Abhijit More
SSC Eights!
SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)SSC Eights! (943 reputation)

Group: General Forum Members
Points: 943 Visits: 767
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
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47175 Visits: 44355
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, MVP, M.Sc (Comp Sci)
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


C.K.Shaiju
C.K.Shaiju
SSC Veteran
SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)

Group: General Forum Members
Points: 214 Visits: 707
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
C.K.Shaiju
C.K.Shaiju
SSC Veteran
SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)SSC Veteran (214 reputation)

Group: General Forum Members
Points: 214 Visits: 707
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
K. Brian Kelley
K. Brian Kelley
Keeper of the Duck
Keeper of the Duck (6.8K reputation)

Group: Moderators
Points: 6770 Visits: 1908
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
rio_briones
rio_briones
Grasshopper
Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)Grasshopper (14 reputation)

Group: General Forum Members
Points: 14 Visits: 301
grant exec on [sp] to [user]
shreenu.vasulu
shreenu.vasulu
SSC Rookie
SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)SSC Rookie (34 reputation)

Group: General Forum Members
Points: 34 Visits: 113
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.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search