Hi,
I need to create a sql job that exec a .sql file located in c:\.
Anyone knows how to?
Thanks
Create a job step of type: Operating System
Enter a command: OSQL -E -i C:\MyFolder\myscript.sql -o
C:\MyFolder\myscript.txt
Assuming that the account running OSQL has the needed rights, then OSQL will
run the script for you.
What account you run as differs depending on whether you are running SQL
2000 or 2005. Read about SQL Agent proxy accounts.
RLF
"mecn" <mecn2002@.yahoo.com> wrote in message
news:ueohAzIpHHA.4196@.TK2MSFTNGP06.phx.gbl...
> Hi,
> I need to create a sql job that exec a .sql file located in c:\.
> Anyone knows how to?
> Thanks
>
|||I'll try. Thanks a lot
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:ORU1z$IpHHA.5052@.TK2MSFTNGP04.phx.gbl...
> Create a job step of type: Operating System
> Enter a command: OSQL -E -i C:\MyFolder\myscript.sql -o
> C:\MyFolder\myscript.txt
> Assuming that the account running OSQL has the needed rights, then OSQL
> will run the script for you.
> What account you run as differs depending on whether you are running SQL
> 2000 or 2005. Read about SQL Agent proxy accounts.
> RLF
> "mecn" <mecn2002@.yahoo.com> wrote in message
> news:ueohAzIpHHA.4196@.TK2MSFTNGP06.phx.gbl...
>
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment