473,657 Members | 2,996 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

stored procedure denies EXECUTE permission

Suddenly a stored procedure, very much like several others, is giving
EXECUTE permission denied on object 'Add_Adjustment ', database
'InStab', owner 'zhoskin'.
server:Msg 229, Level 14, State 5, Procedure Add_Adjustment, Line 18.

I'm zhoskin. I am the dbo and created the procedure, and when I look
at its properties, I have EXEC permission. Line 18 is just the return
statement. The values are all appropriate for the table. So what is
usually going on when a stored procedure denies access to its owner?

Thanks//Zeke Hoskin
CREATE Procedure Add_Adjustment (@AdjAcc Int, @AdjType Char, @AdjAmt
Money, @AdjYrMth Int, @AdjDate Datetime)
/* Add a Dep Adj (Type Z, Negative) or WD Adj (type Y, Positive) */
AS
IF @AdjType = 'Z'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, -1, @AdjYrMth, @AdjDate)
END

IF @AdjType = 'Y'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, 1, @AdjYrMth, @AdjDate)
/*this is just to afect line numbers*/
END
/* set nocount on */
/*space holder*/
return
/*more space*/
GO
Jul 20 '05 #1
3 13047
"Zeke Hoskin" <ze**@zekehoski n.com> wrote in message
news:77******** *************** ***@posting.goo gle.com...
Suddenly a stored procedure, very much like several others, is giving
EXECUTE permission denied on object 'Add_Adjustment ', database
'InStab', owner 'zhoskin'.
server:Msg 229, Level 14, State 5, Procedure Add_Adjustment, Line 18.

I'm zhoskin. I am the dbo and created the procedure, and when I look
at its properties, I have EXEC permission. Line 18 is just the return
statement. The values are all appropriate for the table. So what is
usually going on when a stored procedure denies access to its owner?

Thanks//Zeke Hoskin
CREATE Procedure Add_Adjustment (@AdjAcc Int, @AdjType Char, @AdjAmt
Money, @AdjYrMth Int, @AdjDate Datetime)
/* Add a Dep Adj (Type Z, Negative) or WD Adj (type Y, Positive) */
AS
IF @AdjType = 'Z'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, -1, @AdjYrMth, @AdjDate)
END

IF @AdjType = 'Y'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, 1, @AdjYrMth, @AdjDate)
/*this is just to afect line numbers*/
END
/* set nocount on */
/*space holder*/
return
/*more space*/
GO


What about permissions set on the data table(s)
or the ownership of same?


--
Pete Brown
Winluck P/L
IT Managers & Engineers
Falls Creek
Australia
www.mountainman.com.au/software


Jul 20 '05 #2

"Zeke Hoskin" <ze**@zekehoski n.com> wrote in message
news:77******** *************** ***@posting.goo gle.com...
Suddenly a stored procedure, very much like several others, is giving
EXECUTE permission denied on object 'Add_Adjustment ', database
'InStab', owner 'zhoskin'.
server:Msg 229, Level 14, State 5, Procedure Add_Adjustment, Line 18.

I'm zhoskin. I am the dbo and created the procedure, and when I look
at its properties, I have EXEC permission. Line 18 is just the return
statement. The values are all appropriate for the table. So what is
usually going on when a stored procedure denies access to its owner?

Thanks//Zeke Hoskin
CREATE Procedure Add_Adjustment (@AdjAcc Int, @AdjType Char, @AdjAmt
Money, @AdjYrMth Int, @AdjDate Datetime)
/* Add a Dep Adj (Type Z, Negative) or WD Adj (type Y, Positive) */
AS
IF @AdjType = 'Z'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, -1, @AdjYrMth, @AdjDate)
END

IF @AdjType = 'Y'
BEGIN
Insert Into tblTxn(TxnAcc, TxnType, TxnAmt, TxnSign, TxnYrMth,
TxnDate)
VALUES(@AdjAcc, @AdjType, @AdjAmt, 1, @AdjYrMth, @AdjDate)
/*this is just to afect line numbers*/
END
/* set nocount on */
/*space holder*/
return
/*more space*/
GO


One possibility is that someone DENYed execute to public - since all users
are members of the public role, this would explain the error. You can check
the output of this command:

exec sp_helprotect zhoskin.Add_Adj ustment

Another possibility is that you think you're connected as zhoskin, but in
fact you're not (perhaps due to using an intermediate application or an
application role). You can use the USER_NAME() function to check.

Simon
Jul 20 '05 #3
"Simon Hayes" <sq*@hayes.ch > wrote in message news:<40******* ***@news.bluewi n.ch>...
"Zeke Hoskin" <ze**@zekehoski n.com> wrote in message
Suddenly a stored procedure, very much like several others, is giving
EXECUTE permission denied on object 'Add_Adjustment ', database
One possibility is that someone DENYed execute to public - since all users
are members of the public role, this would explain the error. You can check
the output of this command:

exec sp_helprotect zhoskin.Add_Adj ustment

That was it! Thanks evr so//Zeke
Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7969
by: TJ Olaes | last post by:
Hello all, this is my second post to this newsgroup. It's a question about stored procedures and permissions and how these behave between databases. Here's the scenario. I have a database that stores information for a system "A", and I have a different database on the same SQL server that stores the login and other info "LOGIN". I write a stored procedure in the "A" database that checks some tables in the "LOGIN" database, let's call...
3
18607
by: Michael | last post by:
This one's really got me. I have a VB.NET (version 1.1.4322) project that provides an easy way to execute stored procedures on a generic level. When I run the code on computer A (running SQL Server 2000 version 08.00.0194) the code works great. However, computer B (running SQL Server 2000 version 08.00.0534) bombs when I try to execute the sproc saying 'Could not find stored procedure 'spmw_ReadByPage'. My thought process went as...
1
5425
by: Micah Gentry | last post by:
Is there any way to allow a user to use the xp_cmdshell extended stored procedure without giving that user execute permissions to xp_cmdshell in SQL server 6.5? Let me clarify. Lets say I (as the dbo) create a stored procedure called sp_send_err: CREATE PROCEDURE sp_send_err @CompID varchar(20) AS declare @strCMD varchar(255) select @strCMD = "master.dbo.xp_cmdshell 'net send " + @CompID + " ""ERROR!""', no_output" execute (@strCMD)
6
1664
by: Martin Feuersteiner | last post by:
Dear Group I have found that table A had SELECT permissions for 'Public' but not table B. Giving 'Public' SELECT permissions on table B did the trick. HOWEVER, I don't want anyone to be able to do a direct SELECT on table A or B but only give them access to the data by using the stored procedures. Is there any way this can be set up?
4
4962
by: Robin Tucker | last post by:
Hi, I'm trying to determine with my program whether or not a given database supports a given feature set. To do this I'm querying for certain stored procedures in the sysobjects table and if they are present, making the assumption the database will support the given feature. The problem is I can't find a certain stored procedure in the sysobjects table, even though I know it exists and can see other similar procedures using: select...
1
3591
by: Purple-Man | last post by:
wanted to use sp_OACreate, sp_OAMethod and sp_OADestroy to execute a DTS package from a stored procedure. I had the dba (using the sa account) create a wrapper stored procedure as recommended in http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsq.... However, when I executed the wrapper stored procedure, I still received privilege errors from the underlying sp_oa extended stored procedures.
1
5991
by: aish | last post by:
I want to send email using sql stored procedure.my code is work fine in my local sqlserver account. when I use my online sql server it display this error. EXECUTE permission denied on object 'sp_OACreate', database 'master', owner 'dbo'. EXECUTE permission denied on object 'sp_OASetProperty', database 'master', owner 'dbo'. EXECUTE permission denied on object 'sp_OAMethod', database 'master', owner 'dbo'. EXECUTE permission denied on...
2
5450
by: Dino L. | last post by:
How can I run stored procedure (MSSQL) ?
3
1142
by: John Dohn | last post by:
I can work with them just fine in VS but when I run my app, I get a select permission denied error on any view and execute permission denied on any SP in my web app. All was worked fine until Friday and not since then. Win Server 2003 SP4 VS 2003 ASP.NET 1.1 IIS 6.0
0
8384
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8820
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8718
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8499
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8601
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1937
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.