Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Transaction Log Backup Script issues Expand / Collapse
Author
Message
Posted Friday, September 26, 2008 5:21 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 6:03 AM
Points: 1,065, Visits: 3,028
Declare @FileName varchar(255)
select @FileName = 'D:\BackupDB\Tlog\DVM_DB_Tlog' + substring(convert(varchar(50),getdate(),120),0,11)+'.TRN'
BACKUP LOG [DVM] TO DISK = @FileName WITH NOINIT , NOUNLOAD ,
NAME = N'DVM', NOSKIP , STATS = 10, NOFORMAT , NO_TRUNCATE

pls give me anybody, i need with time this script

for example
DVM_DB_Tlog 2008-09-26 16:50:28.TRN
Post #576687
Posted Friday, September 26, 2008 5:39 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Friday, May 30, 2014 6:27 PM
Points: 2,808, Visits: 7,175
What is the problem you are having with it?
Post #576695
Posted Friday, September 26, 2008 5:53 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 6:03 AM
Points: 1,065, Visits: 3,028
TLog Backup has been taken with date, but i need date and time becuse all Tlog overwrite the same file.

as per script file format is
D:\BackupDB\Tlog\DVM_DB_Tlog 2008-09-26.TRN

I want with time as follows
D:\BackupDB\Tlog\DVM_DB_Tlog 2008-09-26 16:50:28.TRN

Post #576706
Posted Friday, September 26, 2008 6:25 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, June 19, 2009 8:32 AM
Points: 196, Visits: 465
Try using this in part of your script, I don't think you can have a colon (: ) in the file name, that might be the reason it's not working, this should remove the : from the name:

LEFT(REPLACE(REPLACE(CONVERT(VARCHAR,GETDATE(), 120), ' ', '_'), ':', ''), 18)
Post #576733
Posted Monday, September 29, 2008 12:52 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, January 2, 2014 12:02 AM
Points: 185, Visits: 726
That is right file name can't have /\:*?"<>|.


Rajesh Kasturi
Post #577544
Posted Monday, September 29, 2008 6:10 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 6:03 AM
Points: 1,065, Visits: 3,028
Thanks for reply

i got file format with help of your script,

DVM_DB_Tlog2008-09-29_173509.TRN

.. its ok fine,

Post #577647
Posted Monday, September 29, 2008 6:17 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, October 16, 2014 6:03 AM
Points: 1,065, Visits: 3,028
hi,

could you give me details,

what is different between incremental backup & differential backup in sql server 2000?
Post #577652
Posted Monday, September 29, 2008 7:30 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, January 2, 2014 12:02 AM
Points: 185, Visits: 726
As you know we have 3 types of backups available in SQL Server
Full, Differential and Transactional

Incremental backup can be Differential or T-Log.



Rajesh Kasturi
Post #577705
Posted Monday, September 29, 2008 11:52 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Tuesday, March 18, 2014 1:26 PM
Points: 405, Visits: 1,431
ananda.murugesan (9/29/2008)

what is different between incremental backup & differential backup in sql server 2000?


SQL SERVER does not have incremental backup.

But, the Windows OS does have.;)
Post #577893
Posted Tuesday, September 30, 2008 3:38 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, January 2, 2014 12:02 AM
Points: 185, Visits: 726
Hi Wildcat,
Could you please tell me what is meaning of incremental backup weather it is in OS or sql server.


Rajesh Kasturi
Post #578157
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse