Monday, February 20, 2012

Question on backups

I have a backup of a database that has been running for quite a while,
successfully.
I went in to the Database Maintenance plan, and created a new plan to
optimize, check the integrity and do a complete backup (this created 3
new jobs out in the job section of SQL).
Here's the TSQL code from both.
Can anyone tell me if they're doing much the same thing with regards to
having a restore-able backup?
[sfa] TO DISK = N'\\CORP-SISDB\MSSQL7\BACKUP\SFA backup.BAK' WITH INIT
, NOUNLOAD , NAME = N'BACKUP SFA DB', SKIP , STATS = 10, NOFORMAT
in the Tsql in the job.
the new one (the backup only) is:
.xp_sqlmaint N'-PlanID abcdefgh-ijkl-mnop-qrst-uvwxyz012345
-WriteHistory -VrfyBackup -BkUpOnlyIfClean -CkDB -BkUpMedia DISK
-BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 1DAYS -BkExt "BAK"'
Thanks,
BCRun a Profiler trace and you will see the TSQL commands submitted from the maint wizard. I don't
know what [sfa] is supposed to symbolize, but the maint plan as posted does a database backup for
the database(s) selected in the plan.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Blasting Cap" <goober@.christian.net> wrote in message news:OIWww4mdFHA.2124@.TK2MSFTNGP14.phx.gbl...
>I have a backup of a database that has been running for quite a while, successfully.
> I went in to the Database Maintenance plan, and created a new plan to optimize, check the
> integrity and do a complete backup (this created 3 new jobs out in the job section of SQL).
> Here's the TSQL code from both.
> Can anyone tell me if they're doing much the same thing with regards to having a restore-able
> backup?
> [sfa] TO DISK = N'\\CORP-SISDB\MSSQL7\BACKUP\SFA backup.BAK' WITH INIT , NOUNLOAD , NAME => N'BACKUP SFA DB', SKIP , STATS = 10, NOFORMAT
> in the Tsql in the job.
> the new one (the backup only) is:
> .xp_sqlmaint N'-PlanID
> abcdefgh-ijkl-mnop-qrst-uvwxyz012345 -WriteHistory -VrfyBackup -BkUpOnlyIfClean -CkDB -BkUpMedia
> DISK -BkUpDB "d:\MSSQL\BACKUP" -DelBkUps 1DAYS -BkExt "BAK"'
> Thanks,
> BC|||Tibor Karaszi wrote:
> Run a Profiler trace and you will see the TSQL commands submitted from
> the maint wizard. I don't know what [sfa] is supposed to symbolize, but
> the maint plan as posted does a database backup for the database(s)
> selected in the plan.
>
sfa in our case is the database name.|||I realized that after posting. I was confused by the missing BACKUP DATABASE.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Blasting Cap" <goober@.christian.net> wrote in message news:elODCendFHA.2420@.TK2MSFTNGP12.phx.gbl...
> Tibor Karaszi wrote:
>> Run a Profiler trace and you will see the TSQL commands submitted from the maint wizard. I don't
>> know what [sfa] is supposed to symbolize, but the maint plan as posted does a database backup for
>> the database(s) selected in the plan.
> sfa in our case is the database name.

No comments:

Post a Comment