I'm running SQL Server 2008 and want to setup an agent job to backup all databases. The machine running SQL Server is part of a Windows domain. The destination for the backup files is on another machine, which is not in the domain, so I need different credentials to access it.
I've created a new domain account (SqlBackup), added it as a new SQL account (granted it "backup database") and use that to run the agent job. I logged in locally as that user to map the target network share to a drive (providing it with the necessary credentials).
The script I'm using to backup all databases just calls "backup database" (in a cursor loop across all databases) and writes the backup file to the mapped drive. The problem is: When the SQL agent is running the job as the SqlBackup user, the drive is not mapped.
What did I miss?