locked
Error creating audit in SSMS 18.1 for an Azure Managed Instance. RRS feed

  • Question

  • Hello,

    I'm using SSMS version V 18.1. I'm connecting to my Azure SQL Managed Instance. On the Create Audit screen, I successfully connect to my Azure account and select my storage account and blob container. When I click ok, I get the following error:

    ===================================
    The UTC time represented when the offset is applied must be between year 0 and 10,000.
    Parameter name: offset (mscorlib)

    Program Location:
    at System.DateTimeOffset.ValidateDate(DateTime dateTime, TimeSpan offset)
    at System.DateTimeOffset..ctor(DateTime dateTime)
    at Microsoft.SqlServer.Management.SqlMgmt.UrlUtils.CreateSharedAccessPolicyOnContainer(CloudBlobContainer container, String policyName, DateTime selectedSaredAccessExpiryTime)
    at Microsoft.SqlServer.Management.SqlMgmt.AzureStorageContainerAccessBase.CreateSASCredential(Credential& createdCredential)
    at Microsoft.SqlServer.Management.SqlMgmt.AzureStorageContainerController.CreateCredential()
    at Microsoft.SqlServer.Management.SqlMgmt.AzureStorageContainerDialog.btOK_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.RunDialog(Form form)
    at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
    at Microsoft.SqlServer.Management.RelationalEngineTasks.ManageUrlAuditView.buttonBrowsePath_Click(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnClick(EventArgs e)
    at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ButtonBase.WndProc(Message& m)
    at System.Windows.Forms.Button.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
    at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
    at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
    at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
    at Microsoft.SqlServer.Management.ActionHandlers.DialogBasedActionHandler.RunTaskFormThread(Object contextObject)

    I don't have any issues creating a credential for backing up my databases to azure storage.

    Any information you can provide will be greatly appreciated.


    Friday, June 14, 2019 1:27 PM

All replies

  • FYI...I did get this to work by using T-SQL, however, it should probably be looked into as a bug in SSMS.
    Monday, June 17, 2019 1:40 PM
  • Good day jdneilso,

    We did not ignore you :-)
    I passed your issue in internal channels to the developing team (these who develop the server), and waiting for their conclusions.


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Monday, June 17, 2019 4:01 PM
  • Hi,

    We did identify a bug in SSMS that fails auditing creation on managed instances.

    The bug affects customers with negative UTC offset.

    A workaround is to change the local clock or enable auditing via TSQL.


    This  will be fixed in one of the next versions of SSMS.

    Thanks!

    - Ronit@MS

     

    Thursday, June 20, 2019 7:53 AM
  • Thanks Ronit 👍


    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Friday, June 21, 2019 7:43 AM