I'm using SQL Server 2012 SP2 to backup my transaction logs directly into Azure Blob Storage using the BACKUP TO URL
statement.
I am then attemtpting to verify my transaction log as follows:
RESTORE VERIFYONLY FROM URL = 'https://mystore.blob.core.windows.net/logfile.trn'
WITH CREDENTIAL = 'azurecreds'
The RESTORE VERIFYONLY
operation puts a lease on the file in Azure which I can see using Azure Management Studio's blob browser (The last 2 I created without running RESTORE VERIFYONLY).
I can manually break the lease using Azure Management Studio but am I doing something wrong with RESTORE VERIFYONLY
that is leaving an active lease on the file?
Best Answer
This seems very similar to:
From that Microsoft Support article:
This is marked as first fixed in Cumulative Update 4 for SQL Server 2012 SP2. While the fix does not mention
RESTORE VERIFYONLY
explicitly, you should definitely check this out before reporting it as a bug.The latest Service Pack for SQL Server 2012 at the time of writing is SP3, which will also include the fix mentioned above.
Finally, just to document something GregGalloway originally left in a comment on the question, you can remove active leases using a script in the following MSDN article:
Deleting Backup Blob Files with Active Leases