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)
 who is the USER when I EXEC in a sp ?

Author  Topic 

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-02-27 : 10:11:04
I need to define access rights to an executable file.
This file is activated in a stored procedure by a statement like this:

EXEC master.dbo.xp_cmdshell myExecutable.exe


I have clearly identified that the user is not related to who is launching the stored procedure.
But I have been unable to find out who is this user.
So I don't know his name and I cannot give it the needed rights.
I could guess the username might be like '*sql*', maybe!

(I have tested the whole thing should work at the time there were not protections at all)

Thank for you help.

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-02-27 : 10:31:49
Its your SQL Server Agent account.
Go to Top of Page

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-02-27 : 16:50:27
RickD,

Could you explain me how I can get the user name of the SQL Server Agent account?

thanks
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-27 : 16:52:56
Check in Services: you can find what a/c is used SQL Server agent .
Go to Top of Page

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-02-27 : 17:07:58
sodeep,

I am using the "SQL Server Enterprise Manager".
I don't see how to proceed.

thanks
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-02-27 : 17:22:44
Your SQL Server agent uses either Domain a/c or local a/c? What did you put domain username and password while installing SQL Server? or your local login a/c
Go to Top of Page

lalbatros
Yak Posting Veteran

69 Posts

Posted - 2008-02-28 : 01:37:24
sodeep,

I did not install the SQL server myself.
I will explore a little bit.
Maybe you can tell me where to look?
Go to Top of Page

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-02-28 : 02:38:59
Go to the server, then Start -> Run and type Services.msc

Then find SQLSRVAGENT and check its properties.
Go to Top of Page
   

- Advertisement -