DBCC SHRINKFILE

  • as a follow up to the post that I just submitted,

    I should point out that the device name confusingly has the same name as the database name itself so the command

    BACKUP DATABASE sample_db TO sample_db WITH DIFFERENTIAL

    go

    means backup the database sample_db to the device sample_db as listed in sp_helpdevice.

    sp_helpdevice

    DEVICE_NAMEPHYSICAL_NAME

    sample_dbs:\backups\sample_db.dat

    sample_dbLogs:\backups\sample_dbLog.dat

  • bill (3/9/2009)STEP 2 (Conditional on STEP 1 being successful): BACKUP LOG sample_db TO sample_DbLog WITH INIT

    As soon as you issue the above command, you can no longer restore to a point in time prior to that backup since you have initialized the backup device. You would need a copy of the backup device - or be able to insure a valid copy with all transaction log backups has been copied to tape before initializing the device.

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

Viewing 2 posts - 16 through 16 (of 16 total)

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