I am using the Sql server backup database action to make a backup from a remote server. All ok. But it does not remove the old backup files.
Tested with FB 5.5.0.240 and build 340. Remote Sql Server 8.0.760 (2000 sp 3) Using sql server authentication to login Settings on tab BackupDetails: "Backup to DISK" and "Delete old backup files" to older than 2 days Backup path is an existing local path on the remote server, with backups older than 2 days. Other settings on this dialog are blank. Running from scheduler and in IDE.
Is it by design that remote old backup remove does not work / known problem / should I change settings ?
What directory do you have set for the backups? Is it a local path?
The full command line for sqlmaint.exe should be output as part of the log output. Could you post this, please (minus the password section, which isn’t current obfuscated - I’ll fix that right now.)
My mistake, the command line is only printed when using integrated security (ie no passwords.) I’ll fix it so it is output under all circumstances (with the password removed.)
I am using the standard sql server authentication (with the name and paswword).
The path info is the local (existing) path of the remote machine where sql server is running, and where I want to make the backup. So the machine running FB only has a C drive, the remote sql server machine only has D drive, and I specify D:\Backups.
I’m not entirely sure about this, but does it work if you specify the backup path as a UNC path to the remote machine (ie \RemoteServer\DriveD\Backups, or similar)
Well, changing paths does not help. But I did not expect it to: When calling a (remote) Sql server, you normally can always use the paths as known to the server. I think the Sql Backup action uses only calls to Sql server to implement all functionality, so path local to the server should work. And the creation of the backup does work. It only does not remove the old backups.
After inspecting the sql server books online, I don't know if this functionality is available when making backups. The T-SQL statement has options for EXPIREDATE and RETAINDAYS, but that seems to work on backupsets, not seperate file-backups.
When using the Sql server agent to make a backup (don't know if this is possible) then extra options would be possible. When I implement remove of old backups in an sql maintenance plan via sql server management studio, it informs me I must enable the sql server agent. I did, but it had no effect on the FinalBuilder action.
For now next to FB creating backups, I have defined a maintenanceplan that removes the old backups.
Thanks for the update. I’m not too knowledgeable on SQL Server, I was just looking at the SQL Maintenance tool options and trying to extrapolate possibilities.
The FB action uses that command line tool to perform the backups, and the option for deleting old backups is present on this tool, but I’m not able to find definite documentation on it - you may be right that it does not work any more.