Erland Sommarskog wrote:[color=blue]
>
blueghost73@yahoo.com (blueghost73@yahoo.com) writes:[color=green]
> > That's the part I'm having trouble figuring out, I think. What user's
> > PATH would it be using when calling isql from within a .sql script that
> > was run by isql within a .bat file that was kicked off by a user?
> > Apparently, it's not using the PATH of the user who ran the .bat file.
> > I just don't know what user's PATH is being used.[/color]
>
> Just like any other Windows process, SQL Server logs into to Windows
> with a user and a password. Ot it logs in as LocalSystem.
>
> To find out how SQL Server, do this on the server machine: In Control
> Panel find Administrative Tools. Go there, and find the Services applet.
> Open Services, and find the SQL Server service. Double-click it to see
> Properties. Log On information is on the second tab.
>
>[/color]
Because I know that the .bat file has the security access of the person
who started it, I thought the sql script run by the bat file would, as
well. But apparently, it always has the security access of the SQL
service, which I didn't realize, but it makes perfect sense. Thanks for
the clarification.
I checked, and the SQL service does log on as LocalSystem. So now for
the next obvious question: Since LocalSystem isn't a real user, how do
I change its PATH variable to include the folder that contains isql.exe
and other necessary SQL commands? I've hunted around a little, and I
haven't been able to find anything on changing the settings of
LocalSystem. I only know how to change the PATH of the username that
I'm logged in as.
--Richard