Friday, March 9, 2012

schedule sql file

How do I make a daily schedule to execute a sql file? Thanks.
Use the SQL Server Agent.
In your Enterprise Manager, goto Management-> SQL Server Agent -> Jobs
"Allen Iverson" wrote:
> How do I make a daily schedule to execute a sql file? Thanks.
>
|||Hi,
Create a .BAT file with the .SQL file using OSQL
OSQL -Uuser -Ppassword -Sserver -ic:\act.sql -oc:\act.out
Then schedule the batch using SQL Agent job with type as "Operating system
command".
Thanks
Hari
MCDBA
""Allen Iverson"" <no_spam@.bk.com> wrote in message
news:elWG4I0qEHA.3728@.TK2MSFTNGP09.phx.gbl...
> How do I make a daily schedule to execute a sql file? Thanks.
>

No comments:

Post a Comment