You can't backup to network drives or shares. Your only option would be to run a backup to the local disk and then copy the file to the network share.
For the copy you have a few choices. A couple that spring to mind are:-
1. Call xp_cmdshell
Code:
EXEC xp_cmdshell 'COPY localbackup.bak \\myserver\sharename\remotebackup.bak'
There are a number of things to consider with this. Firstly, your SQL server service account will need to have network access. Usually this is not the case because it runs under the LocalSystem account. Secondly, by default the only people who can run xp_cmdshell are members of the sysadmin fixed server role.
2. Create a SQL Agent job that copies the file.
This is similar to the above except that you specify that the job step is an 'Operating System Command (CmdExec)'.
This command runs under the context of the SQL Server Agent, so that service would need to be running as an account with network access.
Then you would use:-
Code:
EXEC msdb..sp_start_job 'Copy job name'
I use this solution to move backups to a remote location, just in case something happens locally (like a fire in the server room).
My SQLAgent is also part of replication so it needs network access for that, therefore it runs under a domain account. We called it SQLAgent and we only allow it to log on as a service.
Another option is ActiveX scripts but you'll still end up with the issue of service accounts and network access.
Kep.