We've all done this a hundred times (backup to a file share). But this one isn't working.
I'm backing up to share thats on Windows Server 2019 from another server.
BACKUP DATABASE DBA TO DISK = '\MyServer\Backups\DBA.bak' with compression, init, copy_only;
I have granted EVERYONE Full access to the folder but it still fails with
Cannot open backup device '\MyServer\Backups\DBA.bak'. Operating system error 5(Access is denied.).
@mike01emphasized textI just missed that extra slash when I copied and pasted.
This is what I'm running.
BACKUP DATABASE DBA TO DISK = '\MyServer\Backups\DBA.bak' with compression, init, copy_only;
I have granted my login full permissions to that folder. Not yet running it as a job, I'm running the backup from query window.
Thanks
@ScottPletcher Not sure. Everyone was an option in older Windows versions. I entered Everyone and it accepted it then I granted it Full. When I tried to add NT Service\MSSQLServer, (the account the SQL service runs under), it cannot find that account.
The NT Service\MSSQLServer is a local account on the sql server.
You need a dedicated service account for the sql service if you want to push to another resource in the network.
Your other option might be to backup to the sql server itself then move it to the network share via powershell