Resumen Copia de seguridad de SQL Server

Mensaje enviado por YAMIL BRACHO <brachoy@pdvsa.com>

Ismael, esto lo consegui en los libros en linea de SQL Server. Espero te ayude

Saludos
Yamil

In both examples A and B, a time interval has been specified for dumping the
transaction log. It is important to back up your transaction log frequently.
For more information about appropriate frequency of backups, see the Microsoft SQL Server Administrator's Companion.

A.    Multiple Dumps to a Single Dump Device
This example shows how to back up a database and its transaction logs to the
same disk device.
/* Dump database to a predefined (with sp_addumpdevice) DISK device. */
EXEC sp_addumpdevice 'disk', 'disk_dev1',
    'c:\sql60\dumps\diskdev1.dmp', 2
DECLARE @two_weeks char(8)
SELECT @two_weeks = CONVERT(char(8), DATEADD(dd, 14, GETDATE()) , 1)
DUMP DATABASE corporate
    TO    disk_dev1
    WITH INIT, EXPIREDATE = @two_weeks, STATS

/* The next day. */
DUMP TRANSACTION corporate
    TO    disk_dev1
    WITH NOINIT

Msg 4035, Level 10, State 1
Database 'corporate' log(26 pages) dumped to file <2> on device 'disk_dev1'.

/* The third day. */
DUMP TRANSACTION corporate
    TO    disk_dev1
    WITH NOINIT
go

Msg 4035, Level 10, State 1
Database 'corporate' log(4 pages) dumped to file <3> on device 'disk_dev1'.
/* and so on. */
DUMP TRANSACTION...

B.    Multiple Dumps to a Single Dump Device
This example shows the database backup used in example A using a temporary dump
device on the network.
/*
    Dump database to a NETWORK DISK device using UNC name.
    In this example, the UNC name should be
    replaced with a     specific server name, share name, and
    directory\filename.ext from your network.
*/
DECLARE @two_weeks char(8)
SELECT @two_weeks = convert(char(8), dateadd(dd, 14, getdate()) , 1)
DUMP DATABASE corporate
    TO    DISK = '\\servername\sharename\directory\filename.ext'
    WITH INIT, EXPIREDATE = @two_weeks, STATS
go

/* The next day. */
DUMP TRANSACTION corporate
    TO    DISK = '\\servername\sharename\directory\filename.ext'
    WITH NOINIT
go

/* The third day. */
DUMP TRANSACTION corporate
    TO    DISK = '\\servername\sharename\directory\filename.ext'
    WITH NOINIT
go

/* And so on. */
DUMP TRANSACTION...

C.    Striped Dump Device Backups
Both of the following examples show how to back up a database to a group of
devices. These devices can be a group of predefined devices (created with
sp_addumpdevice), a group of ad hoc devices, or any combination of these.
DUMP DATABASE corporate
    TO    tape_dev0,
        tape_dev1,
        tape_dev2
    WITH INIT, UNLOAD, EXPIREDATE = @two_weeks, STATS
Or
/* Dump database to ad hoc TAPE devices. */
DUMP DATABASE corporate
    TO    TAPE = '\\.\tape0',
        TAPE = '\\.\tape1',
        TAPE = '\\.\tape2'
    WITH INIT, UNLOAD, EXPIREDATE = @two_weeks, STATS



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com