T-sql output file

  • I'm backing up a database daily using the following t-sql command:

    BACKUP DATABASE master to drive WITH STATS = 10

    I also have this pointing all the information from the backup to the log file.  I need more information in my log file, for example, is there some t-sql commands to show what rows/tables are being backed up in the log??

    Thanks

  • Unfortunately not. I've also found that the STATS option is pretty useless in batch operations as well. It does come in handy when performing an interactive backup from a QA window in some instances. However usually after you have backed up a database a couple of time you'll know from the backup history how long it takes to execute.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • thanks for the reply.  the reason i ask is because currently i have a process that runs a t-sql job to backup a DB to tape.  and of course i have the log file setup as well with stats=10.  all i get is the % complete and a few lines at the end telling me how many pages were backed up completely, etc..and it also states if it was successful or if it quit abnormally.  my concern is this...once or twice a week, i will get this log file and it will go through the entire backup, put the 100% in the log, but at the end it states it quit abnormally.

    how do i know this DB is being backed up?  i know i can restore it and validate the data, but the sensitivity of this data is crucial and i have really no places to restore this backup using t-sql commands from tape.  the only place i could do it is to this production server and I REALLY DO NOT want to do this.  any ideas????

    can i restore the DB remotely from another server?  if i put the tape in the tape drive, can i go to one of my sql servers and run a restore command somehow attaching remotely to the tape drive on that box?

  • First things first - as a DBA you are only as good as your last restore ! Just because you have a backup tape you are not out of the woods. Can it be successfully restored ? This means testing it. If the data is that crucial then "the powers that be" need to provide you with an environment suitable for a restore test. Document this issue well for if they do not provide the test area then most assuredly you will need to restore and then Murphy's Law will come into play and your restore will fail.

    Now when you gett the messages indicating the backup is 100% complete but do not get the pages backed up and other messages afterwards, I'd automatically assume that the backup is BAD.

    How big is your database ? How long does it take to backup to tape ? Can you backup the database to disk and then copy the disk files to tape ?

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply