on 10-04-2007 7:41 AM
Hi Expert
I want to write a simple execute script as below and run as a scheduler every week so can you tell me how can make a bat file and place in weekly scheduling
backup in windows 2003
Use <DBNAME>
EXEC sp_updatestats
go
regards
Piroz
Hi,
you can easily run such a short script via:
osql -S<SQL Server Instance> -E -Q"use <SID> exec sp_updatestats"
This line can be added to any Windows command script and will execute
sp_updatestats against the given database.
Why you don't use the SQL Agent for doing this ? He is designed for running scheduled task on he databases ?
Regards
Clas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.