Re: t logs

Re: t logs

 

  

Brian,

Here is some T-SQL that should get you started:

declare
@dt char(8),
@tm char(8),
@dtm char(18),
@fname char(102),
@descript char(55)

select @dt = convert(char(8),getdate(),112)
select @tm = replace(convert(char(8),getdate(),114),':','-')
set @dtm = '_' + @dt + '-' + @tm
set @fname = 'MyPathname\MyDatabaseName' + @dtm + '.bkp'
set @descript = 'My Backup Description ' + @dtm

BACKUP DATABASE MyDatabase TO
DISK = @fname
WITH DESCRIPTION = @descript

I hope the "at signs" for on the variable names come through.

S. Davey (3/28)

MI DIT\Agency Services
7:30 A.M. - 4:00 P.M. ET
517.335.4237 (M- F CCC )


>>> "Zelli Brian "
<mssqldba-ezmlmshield-x47002258.[Email address protected] 03/28/07
8:26 AM >>>
I need to do periodic t log backups and the vendor does not want us
using Maintenance jobs (for whatever reason). Does someone have a
sample of how to back up t logs using some type of timestamp as part
of
the name when it is backed up? Or is there another means?

ciao,
Brian




This email message may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee
or agent responsible for the delivery of this message to the intended
recipient(s), you are hereby notified that any disclosure, copying,
distribution, or use of this email message is prohibited. If you have
received this message in error, please notify the sender immediately by
e-mail and delete this email message from your computer. Thank you.


---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html



MS Sql Server LazyDBA home page