Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How To Store On Remote Location
Message
From
13/06/2002 11:13:41
Jason Dalio
Northern Interior Regional Health Board
Prince George, British Columbia, Canada
 
 
General information
Forum:
Microsoft SQL Server
Category:
Backups
Miscellaneous
Thread ID:
00667147
Message ID:
00667963
Views:
20
This is an example of the s[p for the trans logs:
CREATE PROCEDURE dbo.up_C_NICC_BackupSynapseProdLogs AS

DECLARE @PathName varchar(59)
DECLARE @DateStamp varchar(11)
DECLARE @TimeStamp varchar(4)
DECLARE @FullPathName varchar(100)

SET @PathName = ('\\PRG-240-690\SynapseBackups\TransNIRHBProd\TransNIRHBProd-')
SET @DateStamp = GetDate()
SET @TimeStamp = CAST(DATEPART(HOUR , CURRENT_TIMESTAMP) AS varchar) + CAST(DATEPART(MINUTE , CURRENT_TIMESTAMP) AS varchar)
SET @FullPathName = @PathName + @DateStamp + '-' + @TimeStamp + '.bak'

BACKUP LOG NIRHBProd TO DISK = @FullPathName

SET @PathName = ('\\PRG-240-690\SynapseBackups\TransReportNIRHBProd\TransReportNIRHBProd-')
SET @DateStamp = GetDate()
SET @TimeStamp = CAST(DATEPART(HOUR , CURRENT_TIMESTAMP) AS varchar) + CAST(DATEPART(MINUTE , CURRENT_TIMESTAMP) AS varchar)
SET @FullPathName = @PathName + @DateStamp + '-' + @TimeStamp + '.bak'

BACKUP LOG ReportNIRHBProd TO DISK = @FullPathName
GO
This works fine but again the backup is made over the wire and I am trying to avoid it. As for moving the hourly backups to tape using the backup software would just be a pain. I'd rather manage the whole thing right from the SQL server itself. I know this would be possible if I could use a second step in the job itself to capture the name of the file created in the first step and then use a command step to do a copy of the file to a remote location.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform