Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 execute permission problem

Author  Topic 

SamC
White Water Yakist

3467 Posts

Posted - 2005-04-14 : 13:49:16
quote:
Server: Msg 229, Level 14, State 5, Procedure EmailCDONTS, Line 34
EXECUTE permission denied on object 'sp_OACreate', database 'master', owner 'dbo'.

Now, this function has been happily executing for a long time. Typically called from other stored procs which have "Public" EXECUTE permissions.

Of course I don't get these errors if I execute it as SA, but then who does?

How do I fix this up so Public procs and DBO role users can call this proc without error?

Sam

X002548
Not Just a Number

15586 Posts

Posted - 2005-04-14 : 13:59:24
BOL Sammy...BOL

quote:

Permissions
Only members of the sysadmin fixed server role can execute sp_OACreate.






Brett

8-)
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2005-04-14 : 14:01:11
Must mean that SQL jobs run as sysadmin. Seems to work there.

Thanks, and I'll test as a sysadmin with this.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-04-14 : 16:06:59
quote:
Originally posted by SamC

Must mean that SQL jobs run as sysadmin.



Not always. SQL jobs run under the account that the SQLSERVERAGENT service uses. This typically is a domain account that has local admin privileges on the database server as well as sysadmin inside SQL Server. I say typically because not everyone does this. And also, typically the MSSQLSERVER service uses the same account as the SQLSERVERAGENT service.

Tara
Go to Top of Page

SamC
White Water Yakist

3467 Posts

Posted - 2005-04-14 : 17:08:12
Thanks Tara.
Go to Top of Page

derrickleggett
Pointy Haired Yak DBA

4184 Posts

Posted - 2005-04-15 : 01:11:45
??? I'm missing something here or I'm just stupid (probably a little of both). Don't scheduled jobs execute under whatever context you tell them to when you set them up, unless you run them manually?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

jen
Master Smack Fu Yak Hacker

4110 Posts

Posted - 2005-04-15 : 01:31:16
quote:
Originally posted by derrickleggett

??? I'm missing something here or I'm just stupid (probably a little of both). Don't scheduled jobs execute under whatever context you tell them to when you set them up, unless you run them manually?

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.



yap, depending on who owns the job, had a blast with this one regarding replication he he he, played a little prank on one of the netadmins


--------------------
keeping it simple...
Go to Top of Page
   

- Advertisement -