Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2010-12-01 : 02:18:54
|
hi,can anybody tel me how to use windows 7 task scheduler for backingup database and make it run automaticaly |
|
Kristen
Test
22859 Posts |
Posted - 2010-12-01 : 04:11:30
|
Use SQL Agent instead. That has scheduler and will run SQL commands / jobs. |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-01 : 04:46:06
|
You could use sqlcmd to execute a backup statement - but as Kristen says ....==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2010-12-01 : 05:04:15
|
ok.but v dnt have sql agent in express |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-01 : 05:17:04
|
There is a solution to use the broker to schedule jobs in express - do a search.But using sqlcmd from the windows scheduler should work.something likesqlcmd -Smyserver -E -Q"backup database mydb to disk='c:\mydb.bak'"oops - was sqlcmd available for v2005?osql was very similar and was replaced by sqlcmd.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2010-12-01 : 05:28:51
|
i wrote sp to take back up but dn5 knw how to use it to schedule in task schedule |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2010-12-01 : 05:41:11
|
Use sqlcmd or osql to call itI've checked and sqlcmd was available in v2005 sosqlcmd -Smyserver -E -Q"exec mydb..s_MyBackup"The -E means to use a trusted connection. It may need to be changed to a sql server connection depending on how the windows scheduler uns it but that's easy to set up.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
|
|
yadhu_cse
Constraint Violating Yak Guru
252 Posts |
Posted - 2010-12-01 : 06:07:34
|
K thanks i will seethis |
|
|
Kristen
Test
22859 Posts |
Posted - 2010-12-01 : 09:54:42
|
"but v dnt have sql agent in express"Not included as standard, but available to download AFAIK. **much** easier than trying to do it from Windows Task Manager |
|
|
|
|
|