Using Azure protal I have created a folder(backup) under fileshare(abcFileShare) and then mounted this on one of the azure virtual machine.
I can copy /paste file on to this drive, but when I try to backup a database on to this shared drive, using sql server query or job, it gives me an error:
Cannot open backup device '\xxxstorage.file.core.windows.net\abcfileshare\backup\AdventureWorks2012.BAK'. Operating system error 1326(The user name or password is incorrect.)
I am using this TSQL to backup:
DECLARE @name VARCHAR(50)
DECLARE @path VARCHAR(256)
DECLARE @fileName VARCHAR(256)
SET @name = 'AdventureWorks2012'
SET @path = '\\xxxstorage.file.core.windows.net\abcfileshare\backup\'
SET @fileName = @path + @name +'.BAK'
BACKUP DATABASE @name TO DISK = @fileName WITH INIT, COMPRESSION
Not sure what I am doing wrong?