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 |
|
Tracey
Starting Member
40 Posts |
Posted - 2004-07-20 : 20:41:08
|
| Hello Everyone,I am doing Database Backups using T-SQL. Is there anyway to Verify the Backup as in Database Backup Wizards.Thank youTracey |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-20 : 20:49:50
|
| This isn't an option in the BACKUP statement. Enterprise Manager runs a RESTORE VERIFYONLY after the backup to verify it if you choose this option. You can easily add that to your T-SQL.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Tracey
Starting Member
40 Posts |
Posted - 2004-07-20 : 21:15:59
|
| Thanks derrickTracey |
 |
|
|
Tracey
Starting Member
40 Posts |
Posted - 2004-07-20 : 22:08:47
|
| Another Q,I have created a permanent Backup devices for each database, i want to store only last 2 days of backup file in the backup device. I tried all those Expiry date,Retain days, skip blah blah options, but cant get it work.any help would be greatly appreciatedTy, Tracey |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-07-20 : 23:14:32
|
| Most people here prefer to have only one day in each backup file or device. Personally, I use files using the WITH DISK = '\\server\share\backupfile_full_20040601.bak' option. I then move each day to tape and erase anything older than 2 days. To do what you are trying to do, you need to test for every other day and use the WITH INIT file every other day. If you store the name of your backup files in a table, or justcreate a table to backups, you can just refer to that to INIT every other day.Just as an fyi, you might want to look at Tara's blog a: http://weblogs.sqlteam.com/tarad .MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
Tracey
Starting Member
40 Posts |
Posted - 2004-07-21 : 01:04:01
|
| Thanks Derrick,One more Q, :)Is there anyway to list the last 5 date and time when the SQL Server Service is Stopped and Started.ThanksTracey |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2004-07-21 : 01:33:06
|
| The last few SQL Server Logs will be visible, in Enterprise Manager (Management : SQL Server Logs), with the date that SQL started (and the bottom of each log will show the time of a proper shutdown (i.e. not for a power cut), but that probbly doesn't get you what you want.You could make a Stored Procedure in Master, and set it to Execute on startup - that could store the Startup time in a tablesp_procoption MySProc, startup, truePerhaps the data you need is in MSDB somewhere ...Kristen |
 |
|
|
|
|
|
|
|