I'm just starting simple for now. I have SQL Server Express 2014 and want to launch the stored procedure to use a UNC. I've tried to a mapped drive using a letter and also @backupLocation=N'\\server\data2\sqlbackup\'
C:\SQLSCRIPTS>sqlcmd -S .\SQLEXPRESS -Q "EXEC sp_BackupDatabases @databaseName='
ROSE', @backupLocation=\\server\data2\sqlbackup\, @backupType='F'"
Msg 102, Level 15, State 1, Server SQLSERVER\SQLEXPRESS, Line 1
Incorrect syntax near '\'.
Or is there a better way like in PS script?
Thank You!