en-UShe-IL
You are here:   Blog
Register   |  Login

Blog Archive:

Maximize
* Can be used in order to search for older blogs Entries

Search in blogs


Blog Categories:

Maximize
* Can be used in order to search for blogs Entries by Categories

Blog Tags:

Maximize
* Can be used in order to search for blogs by keywords

TNWikiSummit


Awared MVP 


 


Microsoft® Community Contributor 


Microsoft® Community Contributor


 Read first, before you you use the blog! Maximize
יונ21

Written by: ronen ariely
21/06/2019 09:49 RssIcon

Hi guys,

Let's start with the story... You can always skip it and jump to the technical information, if I am boring you with some history, but this is not just another bug report👀. This time I had a tiny part in the story, so now I have the pleasure to present the updated information.

Well... it all started with a question in the forum, asked by jdneilso about an error that he get, asking for any information we can provide: 

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...
Any information you can provide will be greatly appreciated.

Since this case was not familiar to me, and I do not have the means to reproduce it issue this month, I contacted Microsoft team using internal channels, and reported this issue. I know... I did not do a lot, but still I feel like I have a tiny part in the story😃

The question in the MSDN forum, turned out to be an unknown (until this report) bug in the SQL Server Management Studio SSMS (relevant to SSMS 18.1 and before).

If you are in Israel then you are probably fine😃, in fact anyone who use UTC/GMT Time Zone or positive offset in time (Meaning, location east to Greenwich England) is fine... But if you are in US for example, then you must know about this.

The Technical issue

Error: The UTC time represented when the offset is applied must be between year 0 and 10,000.

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)

 


Microsoft team identified a bug in SSMS that fails auditing creation on managed instances. The bug affects customers which use negative UTC offset.

Workaround

A workaround presented by Microsoft team is to change the local clock, or enable auditing via TSQL.

Conclusions

At this time the SSMS does not support auditing creation on managed instances if your local time zone is negative (west of time zone UTC). This will be fixed in one of the next versions of SSMS.

The moral of the story

This shows the power of the forums and the power of the individual person who report a bug. Do not feel like "someone else will already report it"! If you encounter a strange behavior or a message error, then your report can lead to the solution.

Tags: SQL , sql server , SSMS , bug
Categories: SQL