Showing posts with label denied. Show all posts
Showing posts with label denied. Show all posts

Monday, March 19, 2012

ExecuteOutOfProcess calling a transactional child package causes Access is Denied.

I have a master package that contains an Execute Package Task whose ExecuteOutOfProcess flag is True, and that calls a child package whose TransactionOption = Required. The job is running in Sql Agent, and the step that calls the master package is configured to run under a certain domain account that is not in the local Administrators group. With this, I get the following:

messageText: Error 0x80070005 while loading package file "C:\program files\microsoft sql server\90\dts\Packages\ETL\Fact_Various_TransactionalChannels.dtsx". Access is denied.

When I add the domain account to the local Administrators group, this error does not occur. From a blog entry, I read that when a child package is executed out of process, the resultant OS process is called dtshost.exe (http://blogs.conchango.com/jamiethomson/comments/1414.aspx). Do I simply need to give my domain account permission to spawn this process? If so, what permission is it? Is there a group that contains this permission?

Is it possible that the domain account does not have access to "C:\program files\microsoft sql server\90\dts\Packages\ETL\"

-Jamie?

|||Unfortunately, no. The account has full control over that path.

Sunday, February 26, 2012

EXECUTE permission deny

Any one can help me, below error messages for reference, thanks!

Exception Details:System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'sp_insertspend', database 'master', owner 'dbo'.

Source Error:

Line 96: cmdMid.Connection = conMid;Line 97: cmdMid.CommandText = "exec sp_insertspend '" + uid + "','" + Mid + "','" + status + "','" + spend + "'";Line 98: cmdMid.ExecuteNonQuery();Line 99: conMid.Close();Line 100:


Source File:f:\Microsoft Visual Studio 8\Web\Soccer\main.aspx.cs Line:98

Stack Trace:

[SqlException (0x80131904): EXECUTE permission denied on object 'sp_insertspend', database 'master', owner 'dbo'.] System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +857322 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +734934 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +188 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1838 System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) +192 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +380 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 _Default.btnbet_Click(Object sender, EventArgs e) in f:\Microsoft Visual Studio 8\Web\Soccer\main.aspx.cs:98 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +107 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102

Hi there,

In SQL Server Managment Studio under Database Properties / Permissions you have to tickgrant execute permissionthe user or role you are using to connect to the database.

Execute Permission denied when running from IIS

My development environment is IIS 5.1, asp.net 2.0, Visual Web Developer 05 Express, MS Sql 2005 Express with XP Pro. I used a "stored procedure" in a webpage Formview to insert a record in a child table after inserting a record in the parent table. All went well when testing in VWD.

After deploying to remote site on same machine, I get an error

"EXECUTE permission denied on object 'usp_Insertdataset', database 'Job_Tracker_SQL', schema 'dbo'"

when trying to insert. I know that SQL Express is not suppose to support stored procedures. Is there a work around? I need to host this site on this machine for the immediate future.

Thanks

cbrcdr

I think that you are incorrect in stating that SQL Server Express does not support stored procedures. I'd be curious to see where that is documented (but, I have been proven wrong in the past!).

But, in any case, I would bet that in your development environment, you were connecting to the database as a DBO (database owner), and the same was not true for the remote site. By default, no one but a DBO is granted any permissions on database objects.

You should be able to grant execute permissions to the "Public" role, which should take care of allowing anyone who is permitted to connect to the database to execute your stored procedure. As an alternative, you can grant execute permission to invididual users too.

Execute the following SQL while connected to your database as the DBO user (i.e., from a query window or whatever mechanism you have available):

GRANT EXECUTE ON usp_InsertdatasetTO Public

|||

Jason

I saw a Feature Matrix on a Mircosoft Webpage that compared all the SQL products and it indicted that SQL Express did not support Stored Procedures. Maybe it was not up to date. I assumed it was right but you are. I used SSMSE and set the permissions on the Stored Procedure to execute for the login and it works.

Thanks, that was my last big hurdle for this phase of my application.

George

Execute permission denied on stored procedure

Hi,
A user of a VB.Net windows application gets this error message when
trying to add data. She is able to add data to other tables by
executing other stored procedures except in this 1 screen. I've checked
the database user/role that she is using and both have execute
permission for that stored procedure in error. Please help! I'm lost as
how to debug this problem.
Appreciate your inputs.
Thanks!Check to see if the use or role has DENY permissions. When both GRANT and
DENY permissions are present, DENY takes precedence. Execute sp_helprotect
'ProcName' to list all proc permissions.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"hillcountry74" <shruthibg@.yahoo.com> wrote in message
news:1154708924.877916.202230@.m73g2000cwd.googlegroups.com...
> Hi,
> A user of a VB.Net windows application gets this error message when
> trying to add data. She is able to add data to other tables by
> executing other stored procedures except in this 1 screen. I've checked
> the database user/role that she is using and both have execute
> permission for that stored procedure in error. Please help! I'm lost as
> how to debug this problem.
> Appreciate your inputs.
> Thanks!
>

Execute permission denied on stored procedure

Hi,
A user of a VB.Net windows application gets this error message when
trying to add data. She is able to add data to other tables by
executing other stored procedures except in this 1 screen. I've checked
the database user/role that she is using and both have execute
permission for that stored procedure in error. Please help! I'm lost as
how to debug this problem.
Appreciate your inputs.
Thanks!Check to see if the use or role has DENY permissions. When both GRANT and
DENY permissions are present, DENY takes precedence. Execute sp_helprotect
'ProcName' to list all proc permissions.
Hope this helps.
Dan Guzman
SQL Server MVP
"hillcountry74" <shruthibg@.yahoo.com> wrote in message
news:1154708924.877916.202230@.m73g2000cwd.googlegroups.com...
> Hi,
> A user of a VB.Net windows application gets this error message when
> trying to add data. She is able to add data to other tables by
> executing other stored procedures except in this 1 screen. I've checked
> the database user/role that she is using and both have execute
> permission for that stored procedure in error. Please help! I'm lost as
> how to debug this problem.
> Appreciate your inputs.
> Thanks!
>

Execute permission denied on 'sp_xml_preparedocument'

Hello,
We have hosted our .NET application on a windows 2003 server runing SQL
Server 2000. We have a stored procedure that uses
"'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
is throwing the following error in one of the testing environment, but
working fine in the development environment, Any Ideas ?
Failed to update company details. Error message: EXECUTE permission
denied on object 'sp_xml_preparedocument',
database 'master', owner 'dbo'. Could not find prepared statement with
handle 0.
EXECUTE permission denied on object 'sp_xml_removedocument', database
'master', owner 'dbo'.
The statement has been terminated.
Thanks in Advance.
With Regards,
Sharath.Whoever you're logging in as in the test environment needs execute
permissions on the sp. You can easily check (and change) the permissions on
it in EM and compare to your other server. You can also change the
permissions through QA (GRANT statement).
"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
> Hello,
>
> We have hosted our .NET application on a windows 2003 server runing SQL
> Server 2000. We have a stored procedure that uses
> "'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
> is throwing the following error in one of the testing environment, but
> working fine in the development environment, Any Ideas ?
>
> Failed to update company details. Error message: EXECUTE permission denied
> on object 'sp_xml_preparedocument',
> database 'master', owner 'dbo'. Could not find prepared statement with
> handle 0.
> EXECUTE permission denied on object 'sp_xml_removedocument', database
> 'master', owner 'dbo'.
> The statement has been terminated.
>
> Thanks in Advance.
> With Regards,
> Sharath.|||Mike C# wrote:
> Whoever you're logging in as in the test environment needs execute
> permissions on the sp. You can easily check (and change) the permissions
on
> it in EM and compare to your other server. You can also change the
> permissions through QA (GRANT statement).
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
>
>
>
Thanks Mike for the reply. I am not well versed with SQL commands nor I
have access to the Server thru EM, If you could please send the script
(GRANT), that would be very helpful.|||"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Thanks Mike for the reply. I am not well versed with SQL commands nor I
> have access to the Server thru EM, If you could please send the script
> (GRANT), that would be very helpful.
USE master
GO
GRANT EXEC ON sp_xml_preparedocument TO public
GO
Of course you can change "public" above to another role/user. More
information is available in BOL:
http://msdn.microsoft.com/library/d...br />
8odw.asp|||Thank you Mike. I will try that.
Mike C# wrote:
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
>
>
> USE master
> GO
> GRANT EXEC ON sp_xml_preparedocument TO public
> GO
> Of course you can change "public" above to another role/user. More
> information is available in BOL:
> http://msdn.microsoft.com/library/d... />
z_8odw.asp
>

Friday, February 24, 2012

Execute permission denied on 'sp_xml_preparedocument'

Hello,
We have hosted our .NET application on a windows 2003 server runing SQL
Server 2000. We have a stored procedure that uses
"'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
is throwing the following error in one of the testing environment, but
working fine in the development environment, Any Ideas ?
Failed to update company details. Error message: EXECUTE permission
denied on object 'sp_xml_preparedocument',
database 'master', owner 'dbo'. Could not find prepared statement with
handle 0.
EXECUTE permission denied on object 'sp_xml_removedocument', database
'master', owner 'dbo'.
The statement has been terminated.
Thanks in Advance.
With Regards,
Sharath.
Whoever you're logging in as in the test environment needs execute
permissions on the sp. You can easily check (and change) the permissions on
it in EM and compare to your other server. You can also change the
permissions through QA (GRANT statement).
"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
> Hello,
>
> We have hosted our .NET application on a windows 2003 server runing SQL
> Server 2000. We have a stored procedure that uses
> "'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
> is throwing the following error in one of the testing environment, but
> working fine in the development environment, Any Ideas ?
>
> Failed to update company details. Error message: EXECUTE permission denied
> on object 'sp_xml_preparedocument',
> database 'master', owner 'dbo'. Could not find prepared statement with
> handle 0.
> EXECUTE permission denied on object 'sp_xml_removedocument', database
> 'master', owner 'dbo'.
> The statement has been terminated.
>
> Thanks in Advance.
> With Regards,
> Sharath.
|||Mike C# wrote:
> Whoever you're logging in as in the test environment needs execute
> permissions on the sp. You can easily check (and change) the permissions on
> it in EM and compare to your other server. You can also change the
> permissions through QA (GRANT statement).
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
>
>
Thanks Mike for the reply. I am not well versed with SQL commands nor I
have access to the Server thru EM, If you could please send the script
(GRANT), that would be very helpful.
|||"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Thanks Mike for the reply. I am not well versed with SQL commands nor I
> have access to the Server thru EM, If you could please send the script
> (GRANT), that would be very helpful.
USE master
GO
GRANT EXEC ON sp_xml_preparedocument TO public
GO
Of course you can change "public" above to another role/user. More
information is available in BOL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ga-gz_8odw.asp
|||Thank you Mike. I will try that.
Mike C# wrote:
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
>
> USE master
> GO
> GRANT EXEC ON sp_xml_preparedocument TO public
> GO
> Of course you can change "public" above to another role/user. More
> information is available in BOL:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ga-gz_8odw.asp
>

Execute permission denied on 'sp_xml_preparedocument'

Hello,
We have hosted our .NET application on a windows 2003 server runing SQL
Server 2000. We have a stored procedure that uses
"'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
is throwing the following error in one of the testing environment, but
working fine in the development environment, Any Ideas ?
Failed to update company details. Error message: EXECUTE permission
denied on object 'sp_xml_preparedocument',
database 'master', owner 'dbo'. Could not find prepared statement with
handle 0.
EXECUTE permission denied on object 'sp_xml_removedocument', database
'master', owner 'dbo'.
The statement has been terminated.
Thanks in Advance.
With Regards,
Sharath.Whoever you're logging in as in the test environment needs execute
permissions on the sp. You can easily check (and change) the permissions on
it in EM and compare to your other server. You can also change the
permissions through QA (GRANT statement).
"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
> Hello,
>
> We have hosted our .NET application on a windows 2003 server runing SQL
> Server 2000. We have a stored procedure that uses
> "'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
> is throwing the following error in one of the testing environment, but
> working fine in the development environment, Any Ideas ?
>
> Failed to update company details. Error message: EXECUTE permission denied
> on object 'sp_xml_preparedocument',
> database 'master', owner 'dbo'. Could not find prepared statement with
> handle 0.
> EXECUTE permission denied on object 'sp_xml_removedocument', database
> 'master', owner 'dbo'.
> The statement has been terminated.
>
> Thanks in Advance.
> With Regards,
> Sharath.|||Mike C# wrote:
> Whoever you're logging in as in the test environment needs execute
> permissions on the sp. You can easily check (and change) the permissions on
> it in EM and compare to your other server. You can also change the
> permissions through QA (GRANT statement).
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:O5k7YevGHHA.1804@.TK2MSFTNGP02.phx.gbl...
>>Hello,
>>
>>We have hosted our .NET application on a windows 2003 server runing SQL
>>Server 2000. We have a stored procedure that uses
>>"'sp_xml_preparedocument" to pick the XML values sent in a parameter. It
>>is throwing the following error in one of the testing environment, but
>>working fine in the development environment, Any Ideas ?
>>
>>Failed to update company details. Error message: EXECUTE permission denied
>>on object 'sp_xml_preparedocument',
>>database 'master', owner 'dbo'. Could not find prepared statement with
>>handle 0.
>>EXECUTE permission denied on object 'sp_xml_removedocument', database
>>'master', owner 'dbo'.
>>The statement has been terminated.
>>
>>Thanks in Advance.
>>With Regards,
>>Sharath.
>
>
Thanks Mike for the reply. I am not well versed with SQL commands nor I
have access to the Server thru EM, If you could please send the script
(GRANT), that would be very helpful.|||"Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
> Thanks Mike for the reply. I am not well versed with SQL commands nor I
> have access to the Server thru EM, If you could please send the script
> (GRANT), that would be very helpful.
USE master
GO
GRANT EXEC ON sp_xml_preparedocument TO public
GO
Of course you can change "public" above to another role/user. More
information is available in BOL:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ga-gz_8odw.asp|||Thank you Mike. I will try that. :)
Mike C# wrote:
> "Sharath Shetty" <sharath.shetty567@.gmail.com> wrote in message
> news:%23o5NJqvGHHA.1912@.TK2MSFTNGP03.phx.gbl...
>>Thanks Mike for the reply. I am not well versed with SQL commands nor I
>>have access to the Server thru EM, If you could please send the script
>>(GRANT), that would be very helpful.
>
> USE master
> GO
> GRANT EXEC ON sp_xml_preparedocument TO public
> GO
> Of course you can change "public" above to another role/user. More
> information is available in BOL:
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_ga-gz_8odw.asp
>

execute permission denied on schema?

Boy, this one is tangled, but I'll take a guess at what's relevant.
I create a schema to hold an XSD, use it, it's all great - in dev.
Trying to deploy to staging with stricter security, something is
wrong.
-- this works fine, executed by someone with sysadmin:
declare @.RBSchema XML
set @.RBSchema = (select * from openrowset(bulk
'D:\RC850\RB850.xsd', single_clob) as xmlData)
create xml schema collection RB850Schema as @.RBSchema
-- at some point, executing as someone with minimal privileges,
-- I get this message:
/*
EXECUTE permission denied on object 'RB850Schema',
database 'mydb', schema 'dbo'.
*/
So, it looks like I need to grant something to somebody, but this
fails:
GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
GO
/*
Msg 15151, Level 16, State 1, Line 1
Cannot find the schema 'RB850Schema',
because it does not exist or you do not have permission.
*/
Now, I just (re)created it and it works, but, well, so, what's the
deal?
Thanks.
Josh
ps - complicating factors might be that this is happening in an SSIS
environment, which was working fine when it used integrated security,
but is now sticking with standard security. Also, I'm not certain
exactly where it's generated, but it may be from a dynamic SQL
statement like:
SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
SET @.x850 = (select * from openrowset(bulk '''
+ @.xmlfilename + ''' , single_clob) as xmldata);
SELECT @.X850 AS myxml;'
INSERT INTO @.mytable (myxml)
execute @.rc = sp_executesql @.cmd
(again, this works fine, until I try to limit privileges)
Answering my own question:
By clicking around under database security, selecting objects by type, and
hitting the script button on the dialog, I got:
GRANT EXECUTE ON XML SCHEMA COLLECTION::[dbo].[RB850Schema] TO [minimaluser]
GO
Don't know quite yet if it fixes everything, but at least the grant executes!
So, who exactly makes up this syntax?
Talking to himself in public yet again,
Josh
"JXStern" wrote:

> Boy, this one is tangled, but I'll take a guess at what's relevant.
> I create a schema to hold an XSD, use it, it's all great - in dev.
> Trying to deploy to staging with stricter security, something is
> wrong.
> -- this works fine, executed by someone with sysadmin:
> declare @.RBSchema XML
> set @.RBSchema = (select * from openrowset(bulk
> 'D:\RC850\RB850.xsd', single_clob) as xmlData)
> create xml schema collection RB850Schema as @.RBSchema
> -- at some point, executing as someone with minimal privileges,
> -- I get this message:
> /*
> EXECUTE permission denied on object 'RB850Schema',
> database 'mydb', schema 'dbo'.
> */
> So, it looks like I need to grant something to somebody, but this
> fails:
> GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
> GO
> /*
> Msg 15151, Level 16, State 1, Line 1
> Cannot find the schema 'RB850Schema',
> because it does not exist or you do not have permission.
> */
> Now, I just (re)created it and it works, but, well, so, what's the
> deal?
> Thanks.
> Josh
> ps - complicating factors might be that this is happening in an SSIS
> environment, which was working fine when it used integrated security,
> but is now sticking with standard security. Also, I'm not certain
> exactly where it's generated, but it may be from a dynamic SQL
> statement like:
> SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
> SET @.x850 = (select * from openrowset(bulk '''
> + @.xmlfilename + ''' , single_clob) as xmldata);
> SELECT @.X850 AS myxml;'
> INSERT INTO @.mytable (myxml)
> execute @.rc = sp_executesql @.cmd
> (again, this works fine, until I try to limit privileges)
>

execute permission denied on schema?

Boy, this one is tangled, but I'll take a guess at what's relevant.
I create a schema to hold an XSD, use it, it's all great - in dev.
Trying to deploy to staging with stricter security, something is
wrong.
-- this works fine, executed by someone with sysadmin:
declare @.RBSchema XML
set @.RBSchema = (select * from openrowset(bulk
'D:\RC850\RB850.xsd', single_clob) as xmlData)
create xml schema collection RB850Schema as @.RBSchema
-- at some point, executing as someone with minimal privileges,
-- I get this message:
/*
EXECUTE permission denied on object 'RB850Schema',
database 'mydb', schema 'dbo'.
*/
So, it looks like I need to grant something to somebody, but this
fails:
GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
GO
/*
Msg 15151, Level 16, State 1, Line 1
Cannot find the schema 'RB850Schema',
because it does not exist or you do not have permission.
*/
Now, I just (re)created it and it works, but, well, so, what's the
deal?
Thanks.
Josh
ps - complicating factors might be that this is happening in an SSIS
environment, which was working fine when it used integrated security,
but is now sticking with standard security. Also, I'm not certain
exactly where it's generated, but it may be from a dynamic SQL
statement like:
SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
SET @.x850 = (select * from openrowset(bulk '''
+ @.xmlfilename + ''' , single_clob) as xmldata);
SELECT @.X850 AS myxml;'
INSERT INTO @.mytable (myxml)
execute @.rc = sp_executesql @.cmd
(again, this works fine, until I try to limit privileges)Answering my own question:
By clicking around under database security, selecting objects by type, and
hitting the script button on the dialog, I got:
GRANT EXECUTE ON XML SCHEMA COLLECTION::[dbo].[RB850Schema] TO [minimaluser]
GO
Don't know quite yet if it fixes everything, but at least the grant executes!
So, who exactly makes up this syntax?
Talking to himself in public yet again,
Josh
"JXStern" wrote:
> Boy, this one is tangled, but I'll take a guess at what's relevant.
> I create a schema to hold an XSD, use it, it's all great - in dev.
> Trying to deploy to staging with stricter security, something is
> wrong.
> -- this works fine, executed by someone with sysadmin:
> declare @.RBSchema XML
> set @.RBSchema = (select * from openrowset(bulk
> 'D:\RC850\RB850.xsd', single_clob) as xmlData)
> create xml schema collection RB850Schema as @.RBSchema
> -- at some point, executing as someone with minimal privileges,
> -- I get this message:
> /*
> EXECUTE permission denied on object 'RB850Schema',
> database 'mydb', schema 'dbo'.
> */
> So, it looks like I need to grant something to somebody, but this
> fails:
> GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
> GO
> /*
> Msg 15151, Level 16, State 1, Line 1
> Cannot find the schema 'RB850Schema',
> because it does not exist or you do not have permission.
> */
> Now, I just (re)created it and it works, but, well, so, what's the
> deal?
> Thanks.
> Josh
> ps - complicating factors might be that this is happening in an SSIS
> environment, which was working fine when it used integrated security,
> but is now sticking with standard security. Also, I'm not certain
> exactly where it's generated, but it may be from a dynamic SQL
> statement like:
> SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
> SET @.x850 = (select * from openrowset(bulk '''
> + @.xmlfilename + ''' , single_clob) as xmldata);
> SELECT @.X850 AS myxml;'
> INSERT INTO @.mytable (myxml)
> execute @.rc = sp_executesql @.cmd
> (again, this works fine, until I try to limit privileges)
>

execute permission denied on schema?

Boy, this one is tangled, but I'll take a guess at what's relevant.
I create a schema to hold an XSD, use it, it's all great - in dev.
Trying to deploy to staging with stricter security, something is
wrong.
-- this works fine, executed by someone with sysadmin:
declare @.RBSchema XML
set @.RBSchema = (select * from openrowset(bulk
'D:\RC850\RB850.xsd', single_clob) as xmlData)
create xml schema collection RB850Schema as @.RBSchema
-- at some point, executing as someone with minimal privileges,
-- I get this message:
/*
EXECUTE permission denied on object 'RB850Schema',
database 'mydb', schema 'dbo'.
*/
So, it looks like I need to grant something to somebody, but this
fails:
GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
GO
/*
Msg 15151, Level 16, State 1, Line 1
Cannot find the schema 'RB850Schema',
because it does not exist or you do not have permission.
*/
Now, I just (re)created it and it works, but, well, so, what's the
deal?
Thanks.
Josh
ps - complicating factors might be that this is happening in an SSIS
environment, which was working fine when it used integrated security,
but is now sticking with standard security. Also, I'm not certain
exactly where it's generated, but it may be from a dynamic SQL
statement like:
SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
SET @.x850 = (select * from openrowset(bulk '''
+ @.xmlfilename + ''' , single_clob) as xmldata);
SELECT @.X850 AS myxml;'
INSERT INTO @.mytable (myxml)
execute @.rc = sp_executesql @.cmd
(again, this works fine, until I try to limit privileges)
Answering my own question:
By clicking around under database security, selecting objects by type, and
hitting the script button on the dialog, I got:
GRANT EXECUTE ON XML SCHEMA COLLECTION::[dbo].[RB850Schema] TO [minimaluser]
GO
Don't know quite yet if it fixes everything, but at least the grant executes!
So, who exactly makes up this syntax?
Talking to himself in public yet again,
Josh
"JXStern" wrote:

> Boy, this one is tangled, but I'll take a guess at what's relevant.
> I create a schema to hold an XSD, use it, it's all great - in dev.
> Trying to deploy to staging with stricter security, something is
> wrong.
> -- this works fine, executed by someone with sysadmin:
> declare @.RBSchema XML
> set @.RBSchema = (select * from openrowset(bulk
> 'D:\RC850\RB850.xsd', single_clob) as xmlData)
> create xml schema collection RB850Schema as @.RBSchema
> -- at some point, executing as someone with minimal privileges,
> -- I get this message:
> /*
> EXECUTE permission denied on object 'RB850Schema',
> database 'mydb', schema 'dbo'.
> */
> So, it looks like I need to grant something to somebody, but this
> fails:
> GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
> GO
> /*
> Msg 15151, Level 16, State 1, Line 1
> Cannot find the schema 'RB850Schema',
> because it does not exist or you do not have permission.
> */
> Now, I just (re)created it and it works, but, well, so, what's the
> deal?
> Thanks.
> Josh
> ps - complicating factors might be that this is happening in an SSIS
> environment, which was working fine when it used integrated security,
> but is now sticking with standard security. Also, I'm not certain
> exactly where it's generated, but it may be from a dynamic SQL
> statement like:
> SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
> SET @.x850 = (select * from openrowset(bulk '''
> + @.xmlfilename + ''' , single_clob) as xmldata);
> SELECT @.X850 AS myxml;'
> INSERT INTO @.mytable (myxml)
> execute @.rc = sp_executesql @.cmd
> (again, this works fine, until I try to limit privileges)
>

execute permission denied on schema?

Boy, this one is tangled, but I'll take a guess at what's relevant.
I create a schema to hold an XSD, use it, it's all great - in dev.
Trying to deploy to staging with stricter security, something is
wrong.
-- this works fine, executed by someone with symin:
declare @.RBSchema XML
set @.RBSchema = (select * from openrowset(bulk
'D:\RC850\RB850.xsd', single_clob) as xmlData)
create xml schema collection RB850Schema as @.RBSchema
-- at some point, executing as someone with minimal privileges,
-- I get this message:
/*
EXECUTE permission denied on object 'RB850Schema',
database 'mydb', schema 'dbo'.
*/
So, it looks like I need to grant something to somebody, but this
fails:
GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
GO
/*
Msg 15151, Level 16, State 1, Line 1
Cannot find the schema 'RB850Schema',
because it does not exist or you do not have permission.
*/
Now, I just (re)created it and it works, but, well, so, what's the
deal?
Thanks.
Josh
ps - complicating factors might be that this is happening in an SSIS
environment, which was working fine when it used integrated security,
but is now sticking with standard security. Also, I'm not certain
exactly where it's generated, but it may be from a dynamic SQL
statement like:
SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
SET @.x850 = (select * from openrowset(bulk '''
+ @.xmlfilename + ''' , single_clob) as xmldata);
SELECT @.X850 AS myxml;'
INSERT INTO @.mytable (myxml)
execute @.rc = sp_executesql @.cmd
(again, this works fine, until I try to limit privileges)Answering my own question:
By clicking around under database security, selecting objects by type, and
hitting the script button on the dialog, I got:
GRANT EXECUTE ON XML SCHEMA COLLECTION::[dbo].[RB850Schema] TO [minimaluser]
GO
Don't know quite yet if it fixes everything, but at least the grant executes
!
So, who exactly makes up this syntax?
Talking to himself in public yet again,
Josh
"JXStern" wrote:

> Boy, this one is tangled, but I'll take a guess at what's relevant.
> I create a schema to hold an XSD, use it, it's all great - in dev.
> Trying to deploy to staging with stricter security, something is
> wrong.
> -- this works fine, executed by someone with symin:
> declare @.RBSchema XML
> set @.RBSchema = (select * from openrowset(bulk
> 'D:\RC850\RB850.xsd', single_clob) as xmlData)
> create xml schema collection RB850Schema as @.RBSchema
> -- at some point, executing as someone with minimal privileges,
> -- I get this message:
> /*
> EXECUTE permission denied on object 'RB850Schema',
> database 'mydb', schema 'dbo'.
> */
> So, it looks like I need to grant something to somebody, but this
> fails:
> GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
> GO
> /*
> Msg 15151, Level 16, State 1, Line 1
> Cannot find the schema 'RB850Schema',
> because it does not exist or you do not have permission.
> */
> Now, I just (re)created it and it works, but, well, so, what's the
> deal?
> Thanks.
> Josh
> ps - complicating factors might be that this is happening in an SSIS
> environment, which was working fine when it used integrated security,
> but is now sticking with standard security. Also, I'm not certain
> exactly where it's generated, but it may be from a dynamic SQL
> statement like:
> SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
> SET @.x850 = (select * from openrowset(bulk '''
> + @.xmlfilename + ''' , single_clob) as xmldata);
> SELECT @.X850 AS myxml;'
> INSERT INTO @.mytable (myxml)
> execute @.rc = sp_executesql @.cmd
> (again, this works fine, until I try to limit privileges)
>

execute permission denied on schema?

Boy, this one is tangled, but I'll take a guess at what's relevant.
I create a schema to hold an XSD, use it, it's all great - in dev.
Trying to deploy to staging with stricter security, something is
wrong.
-- this works fine, executed by someone with sysadmin:
declare @.RBSchema XML
set @.RBSchema = (select * from openrowset(bulk
'D:\RC850\RB850.xsd', single_clob) as xmlData)
create xml schema collection RB850Schema as @.RBSchema
-- at some point, executing as someone with minimal privileges,
-- I get this message:
/*
EXECUTE permission denied on object 'RB850Schema',
database 'mydb', schema 'dbo'.
*/
So, it looks like I need to grant something to somebody, but this
fails:
GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
GO
/*
Msg 15151, Level 16, State 1, Line 1
Cannot find the schema 'RB850Schema',
because it does not exist or you do not have permission.
*/
Now, I just (re)created it and it works, but, well, so, what's the
deal?
Thanks.
Josh
ps - complicating factors might be that this is happening in an SSIS
environment, which was working fine when it used integrated security,
but is now sticking with standard security. Also, I'm not certain
exactly where it's generated, but it may be from a dynamic SQL
statement like:
SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
SET @.x850 = (select * from openrowset(bulk '''
+ @.xmlfilename + ''' , single_clob) as xmldata);
SELECT @.X850 AS myxml;'
INSERT INTO @.mytable (myxml)
execute @.rc = sp_executesql @.cmd
(again, this works fine, until I try to limit privileges)Answering my own question:
By clicking around under database security, selecting objects by type, and
hitting the script button on the dialog, I got:
GRANT EXECUTE ON XML SCHEMA COLLECTION::[dbo].[RB850Schema] TO [
minimaluser]
GO
Don't know quite yet if it fixes everything, but at least the grant executes
!
So, who exactly makes up this syntax?
Talking to himself in public yet again,
Josh
"JXStern" wrote:

> Boy, this one is tangled, but I'll take a guess at what's relevant.
> I create a schema to hold an XSD, use it, it's all great - in dev.
> Trying to deploy to staging with stricter security, something is
> wrong.
> -- this works fine, executed by someone with sysadmin:
> declare @.RBSchema XML
> set @.RBSchema = (select * from openrowset(bulk
> 'D:\RC850\RB850.xsd', single_clob) as xmlData)
> create xml schema collection RB850Schema as @.RBSchema
> -- at some point, executing as someone with minimal privileges,
> -- I get this message:
> /*
> EXECUTE permission denied on object 'RB850Schema',
> database 'mydb', schema 'dbo'.
> */
> So, it looks like I need to grant something to somebody, but this
> fails:
> GRANT EXECUTE ON dbo.RB850Schema TO minimaluser
> GO
> /*
> Msg 15151, Level 16, State 1, Line 1
> Cannot find the schema 'RB850Schema',
> because it does not exist or you do not have permission.
> */
> Now, I just (re)created it and it works, but, well, so, what's the
> deal?
> Thanks.
> Josh
> ps - complicating factors might be that this is happening in an SSIS
> environment, which was working fine when it used integrated security,
> but is now sticking with standard security. Also, I'm not certain
> exactly where it's generated, but it may be from a dynamic SQL
> statement like:
> SET @.cmd = 'DECLARE @.x850 XML (RB850Schema)
> SET @.x850 = (select * from openrowset(bulk '''
> + @.xmlfilename + ''' , single_clob) as xmldata);
> SELECT @.X850 AS myxml;'
> INSERT INTO @.mytable (myxml)
> execute @.rc = sp_executesql @.cmd
> (again, this works fine, until I try to limit privileges)
>

EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', sc

I'm trying to create a new subscriptions on an existing report and get the following error.

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Get Online Help

EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.

I ran the following that was suggested in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=17774&SiteID=1. But still I get the same error. Do I need a reboot or restart of the services?

The only log file information I can find contains the following.

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: An internal error occurred on the report server. See the error log for more details. > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportingService2005.ListSchedules(Schedule[]& Schedules)

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at Microsoft.SqlServer.ReportingServices2005.ReportingService2005.ListSchedules()

at Microsoft.SqlServer.ReportingServices2005.RSConnection.ListSchedules()

at Microsoft.ReportingServices.UI.SharedScheduleDropDown.EnsureSchedulesAreLoaded()

at Microsoft.ReportingServices.UI.SharedScheduleDropDown.SharedScheduleDropDown_Load(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
aspnet_wp!ui!1!17/10/2006-08:44:26:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
aspnet_wp!extensionfactory!e!17/10/2006-09:35:13:: w WARN: The extension Report Server Email does not have a LocalizedNameAttribute.
aspnet_wp!extensionfactory!e!17/10/2006-09:35:13:: w WARN: The extension Report Server FileShare does not have a LocalizedNameAttribute.
aspnet_wp!ui!e!17/10/2006-09:35:13:: e ERROR: System.Web.Services.Protocols.SoapException: An internal error occurred on the report server. See the error log for more details. > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportingService2005.ListSchedules(Schedule[]& Schedules)
aspnet_wp!ui!e!17/10/2006-09:35:13:: e ERROR: HTTP status code --> 200

I cannot find any other error log.

Can anybody help?

Sorry for the late reply. Try this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=662319&SiteID=1

EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource'

I'm trying to create a new subscriptions on an existing report and get the following error.

An internal error occurred on the report server. See the error log for more details. (rsInternalError) Get Online Help

Get Online Help

EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.

I ran the following that was suggested in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=17774&SiteID=1. But still I get the same error. Do I need a reboot or restart of the services?

The only log file information I can find contains the following.

System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: An internal error occurred on the report server. See the error log for more details. > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportingService2005.ListSchedules(Schedule[]& Schedules)

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at Microsoft.SqlServer.ReportingServices2005.ReportingService2005.ListSchedules()

at Microsoft.SqlServer.ReportingServices2005.RSConnection.ListSchedules()

at Microsoft.ReportingServices.UI.SharedScheduleDropDown.EnsureSchedulesAreLoaded()

at Microsoft.ReportingServices.UI.SharedScheduleDropDown.SharedScheduleDropDown_Load(Object sender, EventArgs e)

at System.Web.UI.Control.OnLoad(EventArgs e)

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Control.LoadRecursive()

at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
aspnet_wp!ui!1!17/10/2006-08:44:26:: e ERROR: Exception in ShowErrorPage: System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg) at at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Web.HttpResponse.End()
at System.Web.HttpServerUtility.Transfer(String path, Boolean preserveForm)
at Microsoft.ReportingServices.UI.ReportingPage.ShowErrorPage(String errMsg)
aspnet_wp!extensionfactory!e!17/10/2006-09:35:13:: w WARN: The extension Report Server Email does not have a LocalizedNameAttribute.
aspnet_wp!extensionfactory!e!17/10/2006-09:35:13:: w WARN: The extension Report Server FileShare does not have a LocalizedNameAttribute.
aspnet_wp!ui!e!17/10/2006-09:35:13:: e ERROR: System.Web.Services.Protocols.SoapException: An internal error occurred on the report server. See the error log for more details. > Microsoft.ReportingServices.Diagnostics.Utilities.InternalCatalogException: An internal error occurred on the report server. See the error log for more details. > System.Data.SqlClient.SqlException: EXECUTE permission denied on object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'.
End of inner exception stack trace
at Microsoft.ReportingServices.WebServer.ReportingService2005.ListSchedules(Schedule[]& Schedules)
aspnet_wp!ui!e!17/10/2006-09:35:13:: e ERROR: HTTP status code --> 200

I cannot find any other error log.

Can anybody help?

Sorry for the late reply. Try this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=662319&SiteID=1

EXECUTE permission denied on object 'xp_sqlagent_notify'

Hello Everyone,
I get this Error msg on RS 2005 SP1 whenever I try to edit my Subscriptions,
"An internal error occurred on the report server. See the error log for more
details. (rsInternalError) Get Online Help EXECUTE permission denied on
object 'xp_sqlagent_notify', database 'mssqlsystemresource', schema 'sys'. "
Any suggestions on how to solve this.
regards,
ClatonHere is a link that hopefully will solve your problem;
http://forums.microsoft.com/msdn/showpost.aspx?postid=17774&siteid=1

EXECUTE permission denied on object 'xp_sqlagent_notify'

get the message EXECUTE permission denied on object 'xp_sqlagent_notify' when trying to create subscription on the report in R
From http://www.developmentnow.com/g/115_2004_7_0_12_0/sql-server-reporting-services.ht
Posted via DevelopmentNow.com Group
http://www.developmentnow.comCheck for 'admin' permission and moreover hope you have started the sql agent
in the sql server without that subscription doesn't work.
Amarnath
"Lada" wrote:
> get the message EXECUTE permission denied on object 'xp_sqlagent_notify' when trying to create subscription on the report in RS
> From http://www.developmentnow.com/g/115_2004_7_0_12_0/sql-server-reporting-services.htm
> Posted via DevelopmentNow.com Groups
> http://www.developmentnow.com
>

Execute permission denied on object xp_SQLagent_notify

SQL Server 2000, SP4. I have this login MyLogin which has access in both msd
b
and master. The account is public in master and db_owner in msdb. I have the
same settings on 10 servers. I attempt to create a job, steps and schedule.
When it comes to msdb.dbo.sp_add_jobserver I got the following messages:
Msg 229, Level 14, State 5, Procedure xp_sqlagent_is_starting, Line 7
EXECUTE permission denied on object 'xp_sqlagent_is_starting', database
'master', owner 'dbo'.
Msg 229, Level 14, State 5, Procedure xp_sqlagent_notify, Line 175
EXECUTE permission denied on object 'xp_sqlagent_notify', database 'master',
owner 'dbo'.
The puzzling part here is that I got the errors on 2 servers out of the 10
above mentioned. On the other 8 the job is created successfully and there ar
e
no explicit rights granted or denied on these particular XPs.
Question: What are the minimum requirements to execute the above 2 XP? They
are not documented by Microsoft or it seems I cannot find much on them. Ther
e
is always the possibility to explicitly GRANT access to them for MyLogin, bu
t
the question remains: why is it working on 8 servers and not working on the
other 2. Must be some other setting somewhere!
Any answer will be higly appreciated.Gabriela,
On my server the xp_sqlagent* stored procedures are granted execute to
public. Check on your two problem servers to see whether that is true for
you.
If the agent XPs are not enabled, you can do so by:
sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
sp_configure 'Agent XPs', 1;
GO
RECONFIGURE
GO
RLF
"Gabriela Nanau" <Gabriela Nanau@.discussions.microsoft.com> wrote in message
news:36F16EC4-7BFF-421B-B397-2BEB931FF1ED@.microsoft.com...
> SQL Server 2000, SP4. I have this login MyLogin which has access in both
> msdb
> and master. The account is public in master and db_owner in msdb. I have
> the
> same settings on 10 servers. I attempt to create a job, steps and
> schedule.
> When it comes to msdb.dbo.sp_add_jobserver I got the following messages:
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_is_starting, Line 7
> EXECUTE permission denied on object 'xp_sqlagent_is_starting', database
> 'master', owner 'dbo'.
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_notify, Line 175
> EXECUTE permission denied on object 'xp_sqlagent_notify', database
> 'master',
> owner 'dbo'.
> The puzzling part here is that I got the errors on 2 servers out of the 10
> above mentioned. On the other 8 the job is created successfully and there
> are
> no explicit rights granted or denied on these particular XPs.
> Question: What are the minimum requirements to execute the above 2 XP?
> They
> are not documented by Microsoft or it seems I cannot find much on them.
> There
> is always the possibility to explicitly GRANT access to them for MyLogin,
> but
> the question remains: why is it working on 8 servers and not working on
> the
> other 2. Must be some other setting somewhere!
> Any answer will be higly appreciated.|||As I said in my first post, I don't have GRANT or DENY for the xp_SQLAGENT%
SPs (not even for public) on any of the servers (the ones that work or the
ones that don't).
As for the sp_configure 'Agent SPs', I am on SQL Server 2000, not such
option there!
So thanks, but it doesn't help.
Gabriela Nanau
MCDBA
"Gabriela Nanau" wrote:

> SQL Server 2000, SP4. I have this login MyLogin which has access in both m
sdb
> and master. The account is public in master and db_owner in msdb. I have t
he
> same settings on 10 servers. I attempt to create a job, steps and schedule
.
> When it comes to msdb.dbo.sp_add_jobserver I got the following messages:
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_is_starting, Line 7
> EXECUTE permission denied on object 'xp_sqlagent_is_starting', database
> 'master', owner 'dbo'.
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_notify, Line 175
> EXECUTE permission denied on object 'xp_sqlagent_notify', database 'master
',
> owner 'dbo'.
> The puzzling part here is that I got the errors on 2 servers out of the 10
> above mentioned. On the other 8 the job is created successfully and there
are
> no explicit rights granted or denied on these particular XPs.
> Question: What are the minimum requirements to execute the above 2 XP? The
y
> are not documented by Microsoft or it seems I cannot find much on them. Th
ere
> is always the possibility to explicitly GRANT access to them for MyLogin,
but
> the question remains: why is it working on 8 servers and not working on th
e
> other 2. Must be some other setting somewhere!
> Any answer will be higly appreciated.|||Gabriela Nanau (Gabriela Nanau@.discussions.microsoft.com) writes:
> SQL Server 2000, SP4. I have this login MyLogin which has access in both
> msdb and master. The account is public in master and db_owner in msdb. I
> have the same settings on 10 servers. I attempt to create a job, steps
> and schedule. When it comes to msdb.dbo.sp_add_jobserver I got the
> following messages:
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_is_starting, Line 7
> EXECUTE permission denied on object 'xp_sqlagent_is_starting', database
> 'master', owner 'dbo'.
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_notify, Line 175
> EXECUTE permission denied on object 'xp_sqlagent_notify', database
> 'master', owner 'dbo'.
> The puzzling part here is that I got the errors on 2 servers out of the
> 10 above mentioned. On the other 8 the job is created successfully and
> there are no explicit rights granted or denied on these particular XPs.
> Question: What are the minimum requirements to execute the above 2 XP?
> They are not documented by Microsoft or it seems I cannot find much on
> them. There is always the possibility to explicitly GRANT access to them
> for MyLogin, but the question remains: why is it working on 8 servers
> and not working on the other 2. Must be some other setting somewhere!
I would guess this is a owner-chaining issue. Since there are no perms
granted to revoked to these SP:s, MyLogin should not be able to execute
these procedures directly on any server.
However, when MyLogin runs sp_add_jobserver, permission is granted
through ownership chaining, if the two procedures have the same owner.
To have this:
1) The two databases must have the same owner.
2) Cross-DB chaining must be enabled for the databases.
According to Books Online is DB chaining always on for master and msdb,
so my guess is that on the two servers you have problem, master and msdb
have different owners.
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||To add to Erland's response, you can fix msdb ownership can database options
using the script below.
USE msdb
EXEC sp_changedbowner 'sa'
EXEC sp_dboption 'msdb', 'db chaining', true
Hope this helps.
Dan Guzman
SQL Server MVP
"Gabriela Nanau" <Gabriela Nanau@.discussions.microsoft.com> wrote in message
news:36F16EC4-7BFF-421B-B397-2BEB931FF1ED@.microsoft.com...
> SQL Server 2000, SP4. I have this login MyLogin which has access in both
> msdb
> and master. The account is public in master and db_owner in msdb. I have
> the
> same settings on 10 servers. I attempt to create a job, steps and
> schedule.
> When it comes to msdb.dbo.sp_add_jobserver I got the following messages:
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_is_starting, Line 7
> EXECUTE permission denied on object 'xp_sqlagent_is_starting', database
> 'master', owner 'dbo'.
> Msg 229, Level 14, State 5, Procedure xp_sqlagent_notify, Line 175
> EXECUTE permission denied on object 'xp_sqlagent_notify', database
> 'master',
> owner 'dbo'.
> The puzzling part here is that I got the errors on 2 servers out of the 10
> above mentioned. On the other 8 the job is created successfully and there
> are
> no explicit rights granted or denied on these particular XPs.
> Question: What are the minimum requirements to execute the above 2 XP?
> They
> are not documented by Microsoft or it seems I cannot find much on them.
> There
> is always the possibility to explicitly GRANT access to them for MyLogin,
> but
> the question remains: why is it working on 8 servers and not working on
> the
> other 2. Must be some other setting somewhere!
> Any answer will be higly appreciated.|||Thanks a lot. The different ownership was indeed, the problem! I didn't even
think to check the owners for these 2 databases! It seemed so obvious that i
t
must be sa! That was a rookie's error, I'm sort of embarrassed! Now that I
think about, the msdb was brought from a different machine at some point and
it was probably then when the owner changed.
Once again thanks!
--
Gabriela Nanau
MCDBA
"Dan Guzman" wrote:

> To add to Erland's response, you can fix msdb ownership can database optio
ns
> using the script below.
> USE msdb
> EXEC sp_changedbowner 'sa'
> EXEC sp_dboption 'msdb', 'db chaining', true
> --
> Hope this helps.
> Dan Guzman
> SQL Server MVP
> "Gabriela Nanau" <Gabriela Nanau@.discussions.microsoft.com> wrote in messa
ge
> news:36F16EC4-7BFF-421B-B397-2BEB931FF1ED@.microsoft.com...
>

EXECUTE permission denied on object ''xp_sqlagent_enum_jobs''

SQL Server 2005 SP2, v9.00.3042

Last week, I set up a SQL Server login and assigned it to the MSDB role of SQLAgentOperatorRole. A couple of jobs were created and this login was assigned as being the owner of those jobs.

The login was able to successfully edit and execute the jobs. Per the documentation, only these 2 jobs would show up in the jobs list for the login to view.

Now, when the login attempts to expand the jobs list, the following error appears:

EXECUTE permission denied on object 'xp_sqlagent_enum_jobs', database 'mssqlsystemresource', schema 'sys'

I'm not excited about granting explicit execute permissions to extended stored procedures . . . . but will if I have to.

I think the senior DBA changed something that hosed this up.

What should I be looking for?

Also, I should point out that the login was able to successfully able to execute the jobs on our "upgrade test' instance of 2005. Then we created a production instance and restored the MSDB backup of the upgrade instance to the production instance.

I'm thinking the problem is somehow related to this . . . .

EXECUTE permission denied on object ''xp_sqlagent_enum_jobs''

SQL Server 2005 SP2, v9.00.3042

Last week, I set up a SQL Server login and assigned it to the MSDB role of SQLAgentOperatorRole. A couple of jobs were created and this login was assigned as being the owner of those jobs.

The login was able to successfully edit and execute the jobs. Per the documentation, only these 2 jobs would show up in the jobs list for the login to view.

Now, when the login attempts to expand the jobs list, the following error appears:

EXECUTE permission denied on object 'xp_sqlagent_enum_jobs', database 'mssqlsystemresource', schema 'sys'

I'm not excited about granting explicit execute permissions to extended stored procedures . . . . but will if I have to.

I think the senior DBA changed something that hosed this up.

What should I be looking for?

Also, I should point out that the login was able to successfully able to execute the jobs on our "upgrade test' instance of 2005. Then we created a production instance and restored the MSDB backup of the upgrade instance to the production instance.

I'm thinking the problem is somehow related to this . . . .