Azure cloud file storage rocks!
But in my batch file, most (over 75%) of net use commands fail with error:
System error 1312 has occurred.
A specified logon session does not exist. It may already have been terminated.
What are we doing?
In our data center, we fire a task every few minutes from a scheduled task. The task is a simple powershell script, that does a "net use" and then a "robocopy." The goal is to have our local data (SQL TLOGs in this case) up in Azure storage, and for Azure to be within 5 min or so of current at all times.
So, this NET USE command, that is a problem, is in the following environment:
- Win2012-R2 virtual machine
- On VMWare ESX
- In our data center
It works sometimes (once every 5-10 iterations).
The net use command is:
net use \\my-sharename.file.core.windows.net\myname /u:username <crypto>
And we mostly get the System error noted above.
We have tried doing:
net use \\my-sharename.file.core.windows.net\myname /delete
net use \\my-sharename.file.core.windows.net\myname /u:username <crypto>
but see no change in behavior.
How do we solve?
Best Answer
you should cahnge /u:username to /u:.\username