Stworzyłem maintnance plan,
Stworzyłem katalog na dysku U:
Nadałem uprawnienia do U:\Backup dla konta na którym pracuje SQL.
A backup nadal kończy się błedem:
Error: 2013-11-22 15:14:02.53
Code: 0xC002F210
Source: Back Up Database (Full) Execute SQL Task
Description: Executing the query „EXECUTE master.dbo.xp_create_subdir N’U:\Backup\Full\moja_baza’
” failed with the following error: „xp_create_subdir() returned error 5, 'Access is denied.'”. Possible failure reasons: Problems with the query, „ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly.
End Error
Error: 2013-11-22 15:14:02.56
Code: 0xC002F210
Source: Back Up Database (Full) Execute SQL Task
Description: Executing the query „BACKUP DATABASE [my_db] TO DISK = N’U:\Backup\Full\mydb\mydb_201311221514.bak’ WITH NOFORMAT, NOINIT, NAME = N’Mydb_backup_20131122151402′, SKIP, REWIND, NOUNLOAD, STATS = 10
” failed with the following error: „Cannot open backup device 'U:\Backup\Full\mydb\mydb_backup_201311221514.bak’. Operating system error 3(error not found).
BACKUP DATABASE is terminating abnormally.”. Possible failure reasons: Problems with the query, „ResultSet” property not set correctly, parameters not set correctly, or connection not established correctly.
End Error
Rozwiązanie było proste. Uprawnienia do tego katalogu musiałem nadać także kontu na którym pracuje SQL server.
Pomoc nadeszła z http://serverfault.com/questions/477752/permission-issue-with-sql-server-backup-via-mintenance-plan