The purpose of the executable permission

Hi,
What is the purpose behind the execute permission of Unix? Because if you can read it, you can always find a way to execute it anyway.
The read and write are pretty obvious.
If you can read a file, even if its execute permission isn't set and you don't have the rights to change the file permissions, you just copy it to your own machine, make it executable, and run it.
What does execute even mean? If it's Brainfuck code, then with read permissions your typical Brainfuck interpreter can execute it, no execute permission needed. Isn't running a Turing complete esoteric programming language considered executing? Or displaying an HTML file with JavaScript code in it...
There's probably something behind the execute permission that I don't know. The only way I come into contact with this permission, is in an annoying way: to enable it because it wasn't enabled already while I want to run it. What good (security) purpose does it serve in practice?
Thanks!

It isn't solely about security. You can execute anything you can read, it's always been this way.
s1gma is right in that it 'helps' shells etc. figure out what to execute
The 2 security aspects I can think of are:
a) You want an executable to be setuid for some user, but you only want people from a specific group to be able to execute it as setuid.
They can still execute it by copying, but the setuid flag gets lost, so they'll be executing it as themselves, rather than the user who owned the original file.
b) Help against "accidental" execution.
For instance, a good reason to mount something 'noexec' is because it might contain binaries from other machines, where you don't know what's going on.
So if you want to execute, you want to specifically get a snapshot of the file at your machine, then check if it's really what you want (sha1/md5 sum etc), then finally execute it - most likely by setting the execute permission, then running it.
Another use for it - in a completely different manner - is for example an init script directory, like you have it in slackware (or at least when I used slackware it worked that way).
Where all init scripts you wanted to start at boot time where simply marked executable, and the others you had to execute by hand using a shell (sh /etc/rc.d/foo start or whatever it used to be.)
Last edited by Blµb (2012-03-24 20:09:10)

Similar Messages

  • The EXECUTE permission was denied on the object 'proc_FetchDocForUpdate'

    I occasionally see this error message
    Source: Windows SharePoint Server
    Category: Database
    Event ID: 5214
    Insufficient SQL database permissions for user '(web application pool account)’ in database 'SharePoint_AdminContent_' on SQL Server instance '(servername)'. Additional error information from SQL Server is included below.
    The EXECUTE permission was denied on the object 'proc_FetchDocForUpdate', database 'SharePoint_AdminContent_', schema 'dbo'.
    I found some posts about granting account dbowner right or directly grant Execute permission and they don’t sound very good options.
    Do you have ideas of what caused this and how to fix this?
    Thanks

    Hi guys,
    I have the same error, but now I can reproduce it easily (but I don't now why):
    1.- Go to a site with a document library
    2.- Right click over a FOLDER and select "save shortcut" (or something similar, I have OS in Spanish)
    3.- Open a new outlook message (or word document, etc) and insert an hyperlink. In the Address box of the dialog window paste the shortcut. The problem is that the address box doesn't allow more than 255 characters, so the link is "broken".
    4.- Send the message or click over the new "broken" hyperlink and it sends you to an error page ("Cannot complete this action. Please try later."). There is a link that says something like: "Problem with the errors localizator with Windows SharePoint Services". If you click to see the HELP window: "voilà", the critical error returns to the log:
    "w3wp.exe (0x0FD4)                        0x0E30 Windows SharePoint Services    General                        8kh7 High     Cannot complete this action. Please try later. 
    w3wp.exe (0x0FD4)                        0x0FE0 Windows SharePoint Services    Database                       6lcf Critical Insufficient SQL database permissions for user 'MOSS_WEBAPPxxx' in database 'SharePoint_AdminContent_xxxxx' on SQL Server instance 'SQLServerxxxx'. Additional error information from SQL Server is included below.  The EXECUTE permission was denied on the object 'proc_FetchDocForUpdate', database 'SharePoint_AdminContent_xxxxx', schema 'dbo'.  "
    It seems that it only happens in one of may Web Apps so I'll look for the differences. I hope it could be useful.
    Ciao.
    06/oct/09 - MORE NEWS
    - The link that reproduces the error appears if in the web.config of the web app:
          1. CallStack = false
          2. The "GlobalErrorHandle" line is commented
    Today it was "solved"???:
    - In the SQL Server we give "db_datareader" permission in the SharePoint_AdminContent_xxxx DB to the MOSS_WEBAPP_xxx user. We repeated the prove and the error had disappeared. Then we removed the "db_datareader" permission for MOSS_WEBAPP, and the error continued missing, so now we don't get this error anymore... but I don't know why (MOSS = X-file). Maybe tomorrow this error will return.
     13/oct/09 - AND MORE...
    - URL used to reproduce the error: http://server:port/_layouts/help.aspx?Lcid=1027&Key=WCMNavigationInheritance.com
    If we add the Execute Permission to the rol WSS_Content_Application_Pools over the SharePoint_AdminContent_xxxx DB then the error returns for other stored procedures or views. The complete list is:
    - proc_FetchDocForUpdate
    - proc_GetWebMetaInfo
    - proc_UpdateDirtyDocument
    - proc_UpdateListItem
    - and the view: UserData (need "Select" access)
    but again if instead of giving individual permissions we give the db_owner rol to the WEB_APP user, repeat the test and eliminate the db_owner rol for this user, then the error disappears ... ???? 

  • PowerPivot 2012 Error: BaseWorkbook.CacheStream: Failed to read from stream. Error was: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent'

    Hi, I have setup PowerPivot 2012 for SharePoint, but when I access'PowerPivot Management Dashboard' in Central Admin I get error message 'An error has occured'
    Below is the error in the ULS,
    Background file fill operation caught exception: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b', schema 'dbo'.  
     at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)    
     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)    
     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)    
     at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()    
     at System.Data.SqlClient.SqlDataReader.get_MetaData()    
     at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)    
     at System.Data.SqlClient.SqlCommand.CompleteAsyncExecuteReader()    
     at System.Data.SqlClient.SqlCommand.InternalEndExecuteReader(IAsyncResult asyncResult, String endMethod)    
     at System.Data.SqlClient.SqlCommand.EndExecuteReader(IAsyncResult asyncResult)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.AsyncSqlSession.EndExecuteReader(IAsyncResult ar)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPBackgroundSqlFileFiller.OnReadComplete(IAsyncResult result)
    BaseWorkbook.CacheStream: Failed to read from stream. Error was: System.Data.SqlClient.SqlException: The EXECUTE permission was denied on the object 'proc_FetchChunkFromDocStreams', database 'SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b',
    schema 'dbo'.    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPBackgroundFileFiller.Fill()    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedStreamBuffer.WaitForIntervalFill(SPInterval i)    
     at Microsoft.SharePoint.CoordinatedStreamBuffer.SPCoordinatedMemoryStream.Read(Byte[] array, Int32 offset, Int32 count)    
     at Microsoft.SharePoint.SPFileStream.Read(Byte[] buffer, Int32 offset, Int32 count)    
     at Microsoft.Office.Excel.Server.CalculationServer.BaseWorkbookManager.CacheStream(CachedFile cachedFile, FileLoader loader)
    Regards,
    Ayaz
    SharePoint Architect

    Hey Ayaz,
    I do had the same error message when I click on "PowerPivot Management Dashboard". After few research I resolved this issue.
    You need to provide the dbReader and dbWriter permission to powerpivot app pool account at "SharePoint_AdminContent_ca021d58-ef1f-4f30-9aeb-6f24db24862b"
    Have a great day :-)
    Santosh sethi

  • Enable-CsUser : The EXECUTE permission was denied on the object 'XdsPublishItems', database 'xds', schema 'dbo'

    I have created a PowerShell script that automates enabling users for Lync and setting policies based on group membership. I've successfully tested this script under my domain admin account and now I am working on getting it running as a scheduled task.
    Since all the script really does related to Lync is run the commands Enable-CsUser, Set-CsUser, and Grant-Cs<policy name>Policy, I elected to create a service account that only has Lync user administration permissions.  Initially, this user account
    was just a member of CSUserAdministration but this was not working so I added the user to RTCUniversalUserAdmins based on some other information I found.
    This change got me by the various access denied errors I was getting in the script, but now I am getting the following error when I run the Enable-CsUser part:
    Enable-CsUser : The EXECUTE permission was denied on the object 'XdsPublishItems', database 'xds', schema 'dbo'.
    At line:1 char:1
    + Enable-CsUser -Identity <redacted> -RegistrarPool <redacted> - ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : NotSpecified: (:) [Enable-CsUser], SqlException
    + FullyQualifiedErrorId : System.Data.SqlClient.SqlException,Microsoft.Rtc.Management.AD.Cmdlets.EnableOcsUserCmdl
    et
    This seems to be some sort of permission error related to the permissions on the SQL database "xds".  I checked, and RTCUniversalUserAdmins is a member of both CsUserAdministration and RTCUniversalReadOnlyAdmins.  This latter group does
    have permissions on the xds database.  It appears to be granted the "public" role on the database server.  The User Mapping shows the following users mapped to the login:
    cpsdyn: public,ReadOnlyRole
    lis: public,ReadOnlyRole
    rgsconfig: public,ReadOnlyRole
    rgsdyn: public,ReadOnlyRole
    rtcxds: public,ConsumerRole
    xds: public,ConsumerRole
    Even though I receive this error, the user is actually added to Lync. Follow-up Set-CsUser and Grant-Cs<policy name>Policy cmdlets succeed just fine.
    What do I need to do to fix this error message?

    The issue is not related to UAC / Run As Administrator / Run With Highest Privileges.  I have verified that accounts granted only the CS User Administrator role simply do not have access to the XdsPublishItems stored procedure in the Lync xds database,
    even if they are members of RTCUniversalUserAdmins.
    Also, it does not have anything to do with my script.  Even if I grant my service account that local Administrator rights on the Lync front-end server, log into the server with that account, and run the Lync Server Management Shell as administrator
    and then do just the Enable-CsUser cmdlet (not my whole script), I get the same error.
    I ended up opening a Microsoft support case (#114040311332658) and it has been going on for weeks now.  Eventually they just told me that I needed to either have my script establish a remote PowerShell session to Lync or install the Lync management
    tools on another server and have the script call the Lync Server Management Shell from that server.  They say this because the Planning for Role-Based Access Control documentation (http://technet.microsoft.com/en-us/library/gg425917.aspx)
    has the following tip:
    "RBAC restrictions work only on administrators working remotely, using either the Lync Server Control Panel or Lync Server Management Shell. A user sitting at a server running Lync Server is not restricted by RBAC. Therefore, physical security of your
    Lync Server is important to preserve RBAC restrictions."
    I did attempt to run a PowerShell instance on my workstation as the service account, establish a remote PowerShell session to the Lync front-end server, and then run Enable-CsUser and I can confirm that it does run successfully and I do not receive an error
    of any kind.
    I told the support personnel that the tip stating that RBAC doesn't actually restrict permissions if running PowerShell on the server itself doesn't mean that you simply cannot run PowerShell cmdlets and scripts on the server, it just means that the user
    running the cmdlet or script won't have their accessible cmdlets limited to only those granted to the role assigned.  I told them I want a description of what the XdsPublishItem stored procedure does at a high level so I can determine if the error can
    just be simply ignored in this case.  I'm still waiting for them to get back to me on that.
    They did say they tested it on their end and confirm the same behavior in their test environment.  They also said that it doesn't seem to have any sort of negative impact on the functionality of the enabled Lync user or the consistency of the SQL database. 
    That said, I don't want to just take their word for it without them knowing what XdsPublishItem does.

  • Get The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo', even when user has permissions

    I get the error message:  The EXECUTE permission was denied on the object 'sp_send_dbmail', database 'msdb', schema 'dbo'.  This happens when I run a job, even though the user has the correct permission on sp_send_dbmail and is a user in msdb.
    If I run the procedure through SSMS it runs just fine and sends the mail.
    I have run out of things to look for, any ideas on what else it could be?
    Thanks in advance,
    Nancy

    To send Database mail, users must be a user in the msdb database and a member of the
    DatabaseMailUserRole database role in the msdb database. To add
    msdb users or groups to this role use SQL Server Management Studio or execute the following statement for the user or role that needs to send Database Mail.
    EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
    ,@membername = '<user or role name>';
    GO
    http://technet.microsoft.com/en-us/library/ms188719(v=sql.105).aspx
    Regards, RSingh

  • The EXECUTE permission was denied on the object 'sp_ssis_addlogentry'

    "The EXECUTE permission was denied on the object 'sp_ssis_addlogentry', database,.
    I am able to execute package via VS SSIS studio, however, when I deploy the same package in SSIS agent it say's me above error.
    Could you please help me in that. 

    Hi BhavSAn,
    Based on the error message, we can infer that the account that execute the package via SQL Agent job has insufficient permissions to execute the package.
    It seems that you are use different accounts to execute the package in SSDT and SQL Agent job. When we run an SSIS package within an SQL Server Agent Job, the job step by default runs under SQL Server Agent Service Account. By default, SQL Server Agent Service
    uses the NT Service\SQLSERVERAGENT account. While it only has the following permissions granted by SQL Server Setup:SeServiceLogonRight, SeAssignPrimaryTokenPrivilege, SeChangeNotifyPrivilege and SeIncreaseQuotaPrivilege.
    To fix this issue, we can grant execute permission to the account that execute the job or create a SQL Server Agent proxy account. This proxy account must use a credential that lets SQL Server Agent run the job as the account that created the package or
    as an account that has the required permissions.
    References:
    GRANT Object Permissions (Transact-SQL)
    Running a SSIS Package from SQL Server Agent Using a Proxy Account
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • The execute permission was denied

    Hi we are running ssis packages from Integration server, we got this error. Please review the error message and tell me how to troubleshoot this issue.
    Thanks
    DBA

    Hi DBA,
    Just as the error message said ”The EXECUTE permission was denied on the object ‘HyperonExtract_Current’, database ‘xxxx’, schema ‘hyp’.”, the current use does not have permission to execute on the object ‘HyperonExtract_Current’, database ‘xxxx’, schema
    ‘hyp’.
    To fix this issue, please grant the execute permission to the user with the query below:
    USE xxxx;
    GRANT EXEC ON hyp.HyperonExtract_Current TO user
    References:
    GRANT System Object Permissions (Transact-SQL)
    The EXECUTE permission was denied on the object ‘sp_start_job’, database ‘msdb’, schema ‘dbo’.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • The EXECUTE permission was denied on the object 'ManagedEntityTypeGetBySystemName', database 'OperationsManagerDW', schema 'dbo

    hey all
    i'm getting the above error when trying to run certain reports in scom 2012. i know there are similar issues and kevin holman has blogged about something similar. but i have permissioned the reader account appropriately and still no luck (have read http://skaraaslan.blogspot.be/2011/10/opsmgr-mp-update-new-base-os-mp-6069570.html).
    reader account already has execute permissions on the relevant sp's.
    i have reinstalled reporting services, as a test also given the reader account dbo access on the dw db, and ended up trying to give it admin access both at the sql and windows level - made no difference. some reports work fine, alot dont (eg all the w2k8
    reports).
    so i'm pulling whats left of my hair out with this one - anyone have any ideas?
    thx.

    Hello!!!
    I too am getting this error since I had upgraded to 2012 R2.  It appears that when you select "Add Group" or "Add Object" you get this error.
    What I have done:
    Uninstalled Report Services SCOM Report and Web applications
    Renamed the ReportServices folder so reinstalling a fresh Report Services DB
    Checked to make sure the ReportServices service has the correct permissions on OperationsManagerDW, ReportServer and reportServerTempDB
    Ran a SQL command to see if the service had the correct permissions.  See below (And it does)
    SQL_STORED_PROCEDURE
    ManagedEntityGetWithRowId
    EXECUTE
    GRANT
    OpsMgrReader
    Error
    Permissions:
    What Else can it be to cause this issue?
    Thanks!

  • EXECUTE permission was denied on the object 'proc_putObjectTVP'

    Today I have seen the following error on one of my SharePoint servers.
    The EXECUTE permission was denied on the object 'proc_putObjectTVP', database 'SharePoint_Config', schema 'dbo'.
    The account that was denied EXECUTE permissions is the Service Application App Pool account.
    Having googled the problem - most posts seem to suggest manually granting execute rights to the WSS_Content_Application_Pools role on the SharePoint_Config database to the following stored procedures:
    [dbo].[proc_putObjectTVP]
    [dbo].[proc_putObject]
    [dbo].[proc_putDependency]
    However it seems odd that there is not a SharePoint way to do this rather than modifying SQL permissions via SQL Management Studio. Has anyone else encountered this problem and is there a SharePoint way to fix it?
    I should add that Microsoft say this about Service and other Application Pool accounts:
    "This account is assigned to the WSS_CONTENT_APPLICATION_POOLS role associated with the farm configuration database."
    https://technet.microsoft.com/en-us/library/cc678863%28v=office.15%29.aspx#Section3

    Hi,
    From your description, you might find error 5214 in event log, one or more of the following might be the cause:
    The service account to which SharePoint is set does not have sufficient permissions to the database to which it is trying to connect.
    The service account is not set up properly in SharePoint.
    When using least privilege setup of the Farm.
    Please perform the steps below and test the issue again:
    1. Expand Databases then expand the SharePoint_Config Database.
    2. Expand Security -> Roles -> Database Roles
    3. Find WSS_Content_Application_Pools role, right click it, and select Properties
    4. Click on Securables and click Search
    5. Next click Specific objects and click OK
    6. Click Object Types and select Stored Procedures. Click OK
    7. Add the Stored Procedure 'proc_putObjectTVP' and click OK (if it does not automatically grant it exec permission; you need to click the checkbox on "execute" and save it)
    Regards,
    Rebecca Tu
    TechNet Community Support

  • EXECUTE permission was denied in sysdb database, schema 'ssma_oracle'.

    Hello,
    I have migrated a database from oracle to SQL server.
    After migration when I run a script on the migrated database,
    I get following error . The user with which I have migrated the database and I am running this script are same.
    Also I have given these 3 permissions on sysdb database to this user - public, db_datareader db_datawriter.
    Please let me know what am I missing?
    Msg 229, Level 14, State 5, Server SERVER5009\SQLEXPRESS, Procedure PROC_LOADTEST , Line 303
    The EXECUTE permission was denied on the object 'db_error_get_oracle_exception_i
    d', database 'sysdb', schema 'ssma_oracle'.
    Msg 229, Level 14, State 5, Server SERVER5009\SQLEXPRESS, Procedure ssma_rethr
    owerror, Line 1
    The EXECUTE permission was denied on the object 'ssma_rethrowerror', database 's
    ysdb', schema 'ssma_oracle'.
    Thanks a lot.

    Hi ManiC24,
    Msg 59999, Level 16, State 1, Procedure PROC_LOADTEST, Line 324
    SSMA Oracle exception emulation for [ORA-00001]
    As other post, the issue is related to Oracle. The number 59999 is used for all Oracle system, user-defined, or predefined exceptions.
    Based on my research, ORA-00001 is common when: "a program tries to insert a "duplicate" row in a table,"  and that, "when a unique constraint is violated the row is NOT added to the table. To overcome this error, either remove
    the unique restriction or do not insert duplicate
    key.
    Reference:
    http://www.dba-oracle.com/sf_ora_00001_unique_constraint_violated.htm
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

  • SCOM reports not working, with execute permission denied error.

    Operations manager 2012 R2,
    some reports stopped working. Then i open report and click "add object" or "add group" i get error:
    Note:  The following information was gathered when the operation was attempted.  The
    information may appear cryptic but provides context for the error.  The application will continue to run.
    The EXECUTE permission was denied on the object 'ManagedEntityTypeGetBySystemName', database
    'OperationsManagerDW', schema 'dbo'.
    In SQL  there is EXECUTE permission on object 'ManagedEntityTypeGetBySystemName'
    Reports which not required to specify object or groups are working as expected.
    what esle can be wrong ?

    Hi,
    Please refer to the blog below. It tell us how to grant permission to objects.
    http://www.ndoubleor.com/the-execute-permission-was-denied-on-the-object-database-schema-dbo/11/2009/
    Important Note: Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.
    Juke Chou
    TechNet Community Support

  • All reports not working, with execute permission denied error.

    Operations manager 2012 R2,
    all reports stopped working. Then i open report and click "add object" or "add group" i get error:
    Note:  The following information was gathered when the operation was attempted.  The information may appear cryptic but provides context for the error.  The application will continue to run.
    The EXECUTE permission was denied on the object 'ManagedEntityTypeGetBySystemName', database 'OperationsManagerDW', schema 'dbo'.
    In SQL  there is EXECUTE permission on object 'ManagedEntityTypeGetBySystemName'
    what esle can be wrong ?

    Take a look at
    this.
    Jonathan Almquist | SCOMskills, LLC (http://scomskills.com)

  • Execute Permission Denied on Stored Procedure for SSRS Report

    I have a report in SSRS 2008R2.  The report is running against a 2005 instance.  This report, encapsulated as a stored procedure, runs fine in BIDS.  When I deploy it to the Report Manager I suddenly get"
    The EXECUTE permission was denied on the object 'ticketStatus',database 'SomeDatabase', schema 'dbo'.
    I have granted the execute permission to the sql login, I'll call it 'bob', being used in the datasource.  I can run the stored procedure in SSMS as that sql login.  That SQL login is also assigned the db_datareader and db_denydatawriter database
    level roles in the database for the query.  The query makes use of a linked server to another database.  I have tested that I can run the query via the linked server using the SQL login.  I created a separate SSRS report and simply used the
    SELECT part of my stored proc.  I upload that to the Report Manager and it works fine.  I can't figure out why this report will not work when it is set up to use the Stored Proc.  Any help sorting this out would be appreciated.

    I have granted the execute permission to the sql login, I'll call it 'bob', being used in the datasource.  I can run the stored procedure in SSMS as that sql login.  That SQL login is also assigned the db_datareader and db_denydatawriter database
    level roles in the database for the query.  The query makes use of a linked server to another database.  ...
    You are saying you are using a linked server for a database that sits on the same server as the database where the Procedure resides? Is there any reason to do that instead of just using a 3-part name, possibly in combination with a synonym?
    Linked servers have a different security concept also
    Trustworthy should not be used then either as it can lead to privilege escalation/elevation attacks from inside that database
    Cross Database Ownership chaining is yet another and different problem
    The best woul be to have that Login as a user in both databases and have the necessary permissions like Execute on Schema/Database there. Deny should only be necvessary under the circumstances that the user is member of different groups/roles
    Andreas Wolter
    Microsoft Certified Master SQL Server 2008
    Microsoft Certified Solutions Master SQL Data Platform, SQL Server 2012
    Blog: www.insidesql.org/blogs/andreaswolter
    Web: www.andreas-wolter.com |
    www.SarpedonQualityLab.com

  • EXECUTE permission denied on sp_sqlagent_log_jobhistory when running a maintenance task or sql job

    Hi folks,
    I have a scheduled maintenance plan and associated jobs in SQL Server 2008 SP2 that have been working but stopped about two months ago. When I run a maintenance task or sql job using any account (sa, sysadmin-priveleged domain account, etc) I get the following
    entries in the SQL Server Agent log (see below). I've tried changing the SQL Server Agent account, applied the latest hotfixes (CU2 for 2008 SP2) and set permissions manually so that the service accounts have dbo access to the msdb database. Anyone got other
    ideas? I've avoided recreating the msdb database, but that may be my only option.
    Date  4/02/2011 3:42:40 PM
    Log  SQL Server Agent (Current - 4/02/2011 3:23:00 PM)
    Message
    [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_log_jobhistory', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnExecuteCachableOp)
    Date  4/02/2011 3:42:40 PM
    Log  SQL Server Agent (Current - 4/02/2011 3:23:00 PM)
    Message
    [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'agent_datetime', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnExecuteCachableOp)
    Date  4/02/2011 3:42:40 PM
    Log  SQL Server Agent (Current - 4/02/2011 3:23:00 PM)
    Message
    [298] SQLServer Error: 229, The EXECUTE permission was denied on the object 'sp_sqlagent_log_jobhistory', database 'msdb', schema 'dbo'. [SQLSTATE 42000] (ConnExecuteCachableOp)

    And just to add to the confusion - I created a SQL login called sql-maintjobs and have it sysadmin priveleges. I then logged in to SQL using this account on the instance that is failing and ran the following:
    declare
    @backupjobid uniqueidentifier
    select
    @backupjobid=CONVERT(uniqueidentifier,
    '2C4974D4-53BE-4E38-8EC0-8F5398CADE88')
    exec
    sp_sqlagent_log_jobhistory
    @job_id = @backupjobid,
    @step_id
    =1,
    @sql_message_id
    = 0,
    @sql_severity
    = 0,
    @message
    =
    NULL,
    @run_status
    =1,
    -- SQLAGENT_EXEC_X code
    @run_date
    =19900101,
    @run_time
    =1,
    @run_duration
    =1,
    @operator_id_emailed
    = 0,
    @operator_id_netsent
    = 0,
    @operator_id_paged
    = 0,
    @retries_attempted
    =0,
    @server
    =
    NULL,
    @session_id
    = 0
    This sql worked fine - no permission errors at all. That would suggest the account does have permission to EXECUTE that stored procedure... very confusing!

  • EXECUTE permission denied on object 'xp_sqlagent_enum_jobs'

    Hello.  I am running SQL 2005 SP2 (9.0.3282) on a Windows 2003 SP2 Enterprise server.  I have three users that I have assigned the three SQL Server Agent roles within the msdb system database so that they may manage jobs that they own.  Recently they started seeing this error:
    The EXECUTE permission was denied on the object 'xp_sqlagent_enum_jobs', dartabase 'mssqlsystemresource', schema 'sys'. (Microsoft SQL Server, Error: 229)
    I have other servers that have SQL server configured the same where we are not seeing the errors.
    Any assistance would be greatly appreciated.
    Thanks.
    Kris

     
    After you move the msdb database, you may receive the following error message:
    Error 229: EXECUTE permission denied on object 'ObjectName', database 'master', owner 'dbo'.
    This problem occurs because the ownership chain has been broken. The database owners for the msdb database and for the master database are not the same. In this case, the ownership of the msdb database had been changed. To work around this problem, run the following Transact-SQL statements. You can do this by using the Osql.exe command-line utility (SQL Server 7.0 and SQL Server 2000) or the Sqlcmd.exe command-line utility (SQL Server 2005):
    USE MSDB Go EXEC sp_changedbowner 'sa' Go
    http://support.microsoft.com/kb/224071
    INF: Object Ownership Chain Checking Across Databases Depends on the Login That Is Mapped to the Object Owners| Sankar Reddy | http://sankarreddy.spaces.live.com/ |

Maybe you are looking for

  • How to create plug and play design pattern on a environment

    Hi All, Help me to get a best design for my problem statement. Problem Statement: I have to create a platform where I should be able to plug and play different components. explaining better with example Example: 1. I have to create a platform for sch

  • No Internet available for TV or Blu Ray systems - new problem

    I am unable to connect any TV or entertainment device to the Internet - Samsung TV, Samsung Blu Ray / Entertainment system, and Sony Blu Ray / Entertainment system. All 3 of these devices have a good connection to my Apple Airport AND my FIOS router,

  • Pls help - produce xml file with an agreed-upon DTD

    I posted this a few weeks ago: I have only installed XSU, and I was hopping to use pl/sql package XMLGEN to generate XML with a given DTD and a sql query. I can't find input parameter for DTD. Well it seems logical as both DTD and SQL are for definin

  • IPhoto 811 doesn't open

    Hello, I really did search a lot, but didn't find anything like it. So basically my iPhoto after I updated just stopped working. Every time it says relaunch - and that doesn't help. My Library is intact (in pictures). I created a new one with iPhoto

  • Looking up the Std. Invoice Number (Billing Doc#) using the Outbound Del.#

    Hi, I have a list of Outbound delivery #s that I collected by running T-Code:VL06O.  I am trying to get the Invoice value associated with these Delivery #s..i.e. I am trying to see what did we charge the customer for a particular delivery.  I can dbl