May 9, 2017 at 11:44 am
Hello, I have a SQL Server 2016 on a Windows Server 2012, and have made a number of SSAS tabular cube backups, the .abf file, and they are on a local to the server share drive. What method is used to delete these as they are outside of a backup script that runs. With File Explorer and delete, or is there a way through SSMS? I only see Backup and Restore, but no way to delete. Thanks
May 9, 2017 at 12:07 pm
quinn.jay - Tuesday, May 9, 2017 11:44 AMHello, I have a SQL Server 2016 on a Windows Server 2012, and have made a number of SSAS tabular cube backups, the .abf file, and they are on a local to the server share drive. What method is used to delete these as they are outside of a backup script that runs. With File Explorer and delete, or is there a way through SSMS? I only see Backup and Restore, but no way to delete. Thanks
You can do it manually with File Explorer. I've usually seen it done with something like Powershell or xp_cmdshell
This has a couple of basic Powershell samples to backup and delete older abf files:
Backup SSAS with PowerShell
Sue
May 9, 2017 at 12:11 pm
Like Sue suggested, i use Powershell, as a scheduled job step to remove any abf files older than x number of days.
not sure how you are backing up, in my case i have a different job that dynamically generates the XMLA query. let me know if you want an example of that.
here's the very simple powershell that deletes any *.abf files older than x days.
[
$limit = (Get-Date).AddDays(-20)
Get-ChildItem -Path "\\myServerbk01\SQLBackUps\" -include *.abf -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force #-ErrorAction SilentlyContinue
Lowell
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply