Reputation: 688
I have created manage instance in azure using UTC timezone at time of creation. Now I want to change timezone to GMT. So is this any way to make timezone change of Manage instance SQL server?
Upvotes: 0
Views: 3294
Reputation: 142
This can't be changed once managed instance is created. You need to redeploy managed instance with correct timestamp and use cross instance PITR to move databases.
Upvotes: 1
Reputation: 16431
The date/time is derived from the operating system of the computer on which the instance of SQL Server is running.
I searched a lot and according my experience , we can not change the timezone once the SQL server instance is created.
The only thing we can to is convert the UTC timezone to GMT. Many people has post similar problem on Stack overflow. Such as:
Azure gives the built-in function AT TIME ZONE (Transact-SQL) applies to SQL Server 2016 or later. AT TIME ZONE implementation relies on a Windows mechanism to convert datetime values across time zones.
inputdate AT TIME ZONE timezone
For example, Convert values between different time zones:
USE AdventureWorks2016;
GO
SELECT SalesOrderID, OrderDate,
OrderDate AT TIME ZONE 'Pacific Standard Time' AS OrderDate_TimeZonePST,
OrderDate AT TIME ZONE 'Central European Standard Time' AS OrderDate_TimeZoneCET
FROM Sales.SalesOrderHeader;
I don't have the Azure SQL MI, so I could test it for you.
Hope this helps.
Upvotes: 0