You must change your password before logging on the first time. Please update your password or contact your system administrator or technical support.

-> I have created an Azure Virtual machine. I was able to login to the Virtual machine without any issues.

-> After 2 days I got below message when I was trying to login to the Virtual machine,

[Window Title]
Remote Desktop Connection

[Content]
You must change your password before logging on the first time. Please update your password or contact your system administrator or technical support.

[OK] [Help]

-> While creating the virtual machine in Azure portal. I just mentioned the admin username and password. But never saw an option to change the password at any time.

-> I decided to reset the password for my account. Clicked on the Virtual Machine -> Under “Support + troubleshooting” -> Selected “Reset password” as shown in below screenshot.

-> I performed a reset of my existing account. Read the info next to Username as shown below,

-> You can also create a new account here and will be added as an admin account.

-> In my case I reset the password for an existing account. I provided the username and then the password to reset the account.

-> I tried logging in and it worked out well.

-> But still I dont know the reason why this happened? I will troubleshoot this further in case this happens again.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

Why 4 Core is better than 1 Core IaaS Virtual machine with SQL Server in Azure

-> I see not much of a difference in terms of cost when you provision an 1, 2 or 4 Core Azure IaaS Virtual machine with SQL Server Enterprise or Standard edition.

-> I am using Azure pricing calculator to check this.

-> I am checking below IaaS Virtual Machines,

DS1 v2 (1 vCPU(s), 3.5 GB RAM) x 730 Hours
DS2 v2 (2 vCPU(s), 7 GB RAM) x 730 Hours
DS3 v2 (4 vCPU(s), 14 GB RAM) x 730 Hours

-> Checking DS1 v2 (1 vCPU(s), 3.5 GB RAM) x 730 Hours,

Blog92_1

-> Checking DS2 v2 (2 vCPU(s), 7 GB RAM) x 730 Hours
Blog92_2

-> Checking DS3 v2 (4 vCPU(s), 14 GB RAM) x 730 Hours
Blog92_3
-> If you compare SQL Server Enterprise Edition cost for 1 Core, 2 Cores or 4 Cores. It is all same. This is due to the fact that SQL Server license starts with a pack of 4 cores. Even though we use 1 or 2 cores you will be charged for 4 cores. This is applicable for Standard Edition.
-> There is a difference in overall cost between these servers, but to me it is worth to consolidate database Servers to a one (1) – 4 Core Virtual machine rather than provisioning 4 – 1 Core Virtual machines or 2 – 2 Core Virtual machines.
Please let me know your views on comments section.

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.

Restore a database backup to an Azure Managed Instance

1) Creating Azure storage account and upload backup file

-> Click “Create a resource”. Select “Storage” and click “Storage Account”.

Blog45_1.PNG

-> Complete “Create storage account” and click “Create”.

Blog45_2.PNG

-> Once the Storage Account deployment completes. Click on Resource group JB_RG, select jbmistorage. Under settings, click “Shared Access Signature”. Check the details and modify accordingly to your needs. I am leaving the default and clicking on”Generate SAS and connection string”.

Blog45_3.PNG

-> Copy the SAS Token and BLOB Service SAS URL and place it in carefully,

Blog45_4.PNG

-> Under “BLOB SERVICE”, click containers and Click “+ Container”.

Blog45_5.PNG

-> Provide the required details and click ok.

Blog45_6.PNG

-> Click on Resource group JB_RG, select jbmistorage. Click Conatiners under “BLOB SERVICE”. Click on “jbmibackupcontainer”. Click on properties.

Blog45_7.PNG

-> Copy the URL.

Blog45_8.PNG

-> Once the URL is copied, go back to the container page by clicking  on Resource group JB_RG, select jbmistorage. Click Conatiners under “BLOB SERVICE”. Click on “jbmibackupcontainer”. Click on “Upload”. Select the backup file you want to upload and click “Upload”. Wait for the upload to complete.

Blog45_9.PNG

-> Upload of backup file in progress.

Blog45_10.PNG

-> Upload completed.

Blog45_11.PNG

2) Restore the database JB_AQ on the Managed instance.

-> Create a SAS Credential using below query,

CREATE CREDENTIAL [https://<storage_account_name>.blob.core.windows.net/<container>]
WITH IDENTITY = ‘SHARED ACCESS SIGNATURE’
, SECRET = ‘<shared_access_signature_key_with_removed_first_?_symbol>’

https://<storage_account_name&gt;.blob.core.windows.net/ – Click on “Resource group” JB_RG and select “jbmistorage”. Copy the “Blob Service Endpoint” as indicated below and replace “https://<storage_account_name&gt;.blob.core.windows.net/” with the copied value.

Blog45_12.PNG

<container>- Click on “Resource group” JB_RG and select “jbmistorage”. Select “Container” under “BLOB SERVICE”. Copy the container name on the Right side. The container name in my case is “jbmibackupcontainer”.

Blog45_13.PNG

-> When you click on the container “jbmibackupcontainer”. You will be able to find the backup file uploaded.

WITH IDENTITY = ‘SHARED ACCESS SIGNATURE’ – Will remain as it is.

<shared_access_signature_key_with_removed_first_?_symbol> – Replace this with the SAS Token that was stored earlier. Please note that you should remove the leading ? from the SAS Token.

Blog45_18.PNG

-> My command is as below,

CREATE CREDENTIAL [https://jbmistorage.blob.core.windows.net/jbmibackupcontainer]
WITH IDENTITY = ‘SHARED ACCESS SIGNATURE’
, SECRET = ‘sv=2017-11-09&ss=b&srt=sco&sp=rwdlac&se=2018-06-13T09:33:37Z&st=2018-06-13T01:33:37Z&spr=https&sig=AWlMTj6MZ0M4ictY2nBJ4%2BfVr0kx0RWfpFU1xlJ76FU%3D’

-> Execute the query,

Blog45_16.PNG

-> Below query checks the SAS Credential and backup validity,

RESTORE FILELISTONLY FROM URL =
https://<storage_account_name&gt;.blob.core.windows.net/<container>/<Backup_File>.bak’

https://<storage_account_name&gt;.blob.core.windows.net/ – Click on “Resource group” JB_RG and select “jbmistorage”. Copy the “Blob Service Endpoint” as indicated below and replace “https://<storage_account_name&gt;.blob.core.windows.net/” with the copied value.

Blog45_12.PNG

<container>- Click on “Resource group” JB_RG and select “jbmistorage”. Select “Container” under “BLOB SERVICE”. Copy the container name on the Right side. The container name in my case is “jbmibackupcontainer”.

Blog45_13.PNG

<Backup_File>.bak – Replace it with the backup file we uploaded. When you click on the container “jbmibackupcontainer” . You will be able to find the backup file uploaded.

Blog45_15.PNG

-> My command is as below,

RESTORE FILELISTONLY FROM URL =
https://jbmistorage.blob.core.windows.net/jbmibackupcontainer/JB_AQP_MI.bak&#8217;

-> Execute the query,

Blog45_17.PNG

-> Use the below query to restore the database JB_AQ in Managed Instance.

RESTORE DATABASE [JB_AQ] FROM URL =
https://jbmistorage.blob.core.windows.net/jbmibackupcontainer/JB_AQP_MI.bak&#8217;

Thank You,
Vivek Janakiraman

Disclaimer:
The views expressed on this blog are mine alone and do not reflect the views of my company or anyone else. All postings on this blog are provided “AS IS” with no warranties, and confers no rights.