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 2005 Forums
 Transact-SQL (2005)
 EXECUTE permission

Author  Topic 

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-15 : 20:46:02
i am getting :
quote:
The EXECUTE permission was denied on the object 'xp_logevent', database 'mssqlsystemresource', schema 'sys'

and ic ant find the 'xp_logevent' stored proceudre in the sql server 2005 -where can i find it?
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-15 : 20:57:18
it's in mssqlsystemresource database:
http://weblogs.sqlteam.com/mladenp/archive/2007/03/12/60132.aspx

you don't have proper permissions for whatever it is that you're trying to do.


_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-15 : 21:11:33
yesi understand i dont have permissions beacuse of that i aksed how to find the SP itself!
i tried
SELECT object_definition(OBJECT_ID('sys.xp_logevent')) AS Expr1
and got null
any idea?

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-15 : 21:14:17
have you read the link i gave you?
you don't have access to this extended stored procedure.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-16 : 02:43:19
oops so what can i do then?
how can i get permission"??
i want to write the window event viewer
i dont think that in sql2005 its not possible
beacuse on my pc (winxp) it works fine)
and i havethis problem only on 2003 server
thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-09-16 : 03:51:40
"i dont think that in sql2005 its not possible
beacuse on my pc (winxp) it works fine)
and i havethis problem only on 2003 server
"

Are you Admin [or some other "higher" permissions level] on your local PC but not on the 2003 server?

Kristen
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-16 : 04:09:02
i am with admin permissions on both of them
maybe i just didnt give permissions in correct way or something like thaT?

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-16 : 17:38:31
You can't access mssqlsystemresource db since it should not be online.
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-17 : 05:11:41
so how is it that i can add
xp_logevent whihc in my code i access through master db?

thnaks in advance
peleg

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-17 : 05:15:49
can you tell us what exactly are you trying to do?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-17 : 06:30:01
i want to write to the event viewer of window from a stored procedure
which is called from asp.net.



Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-17 : 06:32:23
and your code would be?

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-17 : 16:11:48
this is the code i use :
Exec master.dbo.xp_logevent 50003,@sqlMessage,INFORMATIONAL

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-09-17 : 22:08:33
Do you have proper permission to run that?
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-18 : 02:55:00
onm my pc i didnt habve a problem
i just gave it an execute permission to the user

but

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-18 : 02:56:57
onm my pc i didnt habve a problem
i just gave it an execute permission to the sql user

but on 2003 server eveng givven permiision to master db dosent solve it beacuse it compaines about : 'mssqlsystemresource'
if there is another way to write to event viewer (not using RaisSerror - which cases me an exception on my asp.net application)
thnaks
peleg
Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-18 : 04:04:05
i'd suggest you create a CLR stored procedure for this.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

pelegk2
Aged Yak Warrior

723 Posts

Posted - 2007-09-18 : 04:24:44
can iu redirect me to a relevent code that do that? or something similir?

Israel -the best place to live in aftr heaven 9but no one wan't to go there so fast -:)
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-09-18 : 04:58:23
http://www.sqlteam.com/article/writing-clr-stored-procedures-in-charp-introduction-to-charp-part-1
http://msdn2.microsoft.com/en-us/library/ms190790.aspx

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -