Hello,

I have the following configuration:

IIS 5.0 running under "httpservice" user account (member
of web anonymous users group)
SQL Server 2000 agent running under "sqlservice" user
account (member of users group)

I have a maintenance job scheduled in sql server agent
that needs exclusive access to the db, so I want to stop
IIS within the first step of this job (the site hosted
opens frequent connections to the db so it must be
stopped).

I set up a cmdexec job step to execute a vbs script that
stops the website.
The problem is that the script runs under "sqlservice"
credentials and this user cannot control IIS service.

Should I add rights to this user (if yes, which are
needed) or there is another way to stop IIS from a job
inside SQL Server?

Thanks
Roberto Lambertini

Re: Control IIS service from script by jcochran

jcochran
Fri Jan 02 08:39:02 CST 2004

On Thu, 1 Jan 2004 16:52:36 -0800, "Roberto Lambertini"
<anonymous@discussions.microsoft.com> wrote:

>I have the following configuration:
>
>IIS 5.0 running under "httpservice" user account (member
>of web anonymous users group)
>SQL Server 2000 agent running under "sqlservice" user
>account (member of users group)
>
>I have a maintenance job scheduled in sql server agent
>that needs exclusive access to the db, so I want to stop
>IIS within the first step of this job (the site hosted
>opens frequent connections to the db so it must be
>stopped).
>
>I set up a cmdexec job step to execute a vbs script that
>stops the website.
>The problem is that the script runs under "sqlservice"
>credentials and this user cannot control IIS service.
>
>Should I add rights to this user (if yes, which are
>needed) or there is another way to stop IIS from a job
>inside SQL Server?

It's not an IIS issue, you might get a better response in a scritping
group. Also check the RUNAS options available to you.

Jeff