olahallengren / sql-server-maintenance-solution

SQL Server Maintenance Solution
https://ola.hallengren.com
MIT License
2.89k stars 748 forks source link

Output File Clean Job Does NOT support UNC Path #529

Open asjacket opened 3 years ago

asjacket commented 3 years ago

Description of the issue Output file Clean up job. I can backup to UNC path but this job doesn't support UNC path.

SQL Server version and edition Microsoft SQL Server 2012 (SP4-GDR) (KB4583465) - 11.0.7507.2 (X64) Nov 1 2020 00:48:37 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor) But it doesn't work on any server

Version of the script dbo CommandExecute 2020-01-26 14:06:53 431750767 dbo DatabaseBackup 2020-01-26 14:06:53 -1034257979 dbo DatabaseIntegrityCheck 2020-01-26 14:06:53 417283523 dbo IndexOptimize 2020-01-26 14:06:53 1528201776

What command are you executing? cmd /q /c "For /F "tokens=1 delims=" %v In ('ForFiles /P "\\ddbbackup$\SQLBackups\bi_dwh-DBA_ServerLog" /m *_.txt /d -30 2^>^&1') do if EXIST "\***\ddbbackup$\SQLBackups\bi_dwh-DBA_ServerLog"\%v echo del "\**\dbbackup$\SQLBackups\bi_dwh-DBA_ServerLog"\%v& del "\**\ddbbackup$\SQLBackups\bi_dwh-DBA_ServerLog"\%v"

What output are you getting? ERROR: UNC Paths are not supported

asjacket commented 3 years ago

My path was modified when posted but the path is correct in the script. When I run the command with a mapped path it works but I have a lot of servers to modify.