Thursday, September 15, 2016

Azure Deployment Experience - Series 4 - Getting SQL Stats for Azure SQL DB calculation

At my work-place, hosting our web-Application and Database in a VM (with Windows or Windows + SQL) has been the usual practice. Though we want to move to Azure SQL DB, there are quite a few factors which makes us step back, for the simple fear of "which DTU we actually need". 

After some searching, I came across this blog (Choosing Right Tier for Azure SQL DB), which explained the basics of Service tiers, business continuity options, importantly the DTU calculator (Azure SQL DB DTU Calculator). It was like all unknown or little known pieces put together.

I am not getting into how-to-do, as it is very clearly explained in the blog. I struggled while executing the Powershell script which collects the performance data in the VM-with-SQL server.
Listing them down, so that, it is helpful for someone or even it could be for me in future !
  • Install the Windows Powershell ISE, run it as administrator, and open the Ps1 file (download from the blog)
  • Check if the file needs to be 'Unblocked' to allow it to be run (as it is a downloaded file from other source). 
  • The SQL Server name is the catch in the parameter list for the "Get -Counter". For a long time, I struggled and could not figure out how to give the name. 
  • If you wish to provide the SQL Server which is installed as "default" instance, then provide the name as "'\SqlServer:Databases(*)\Log Bytes Flushed/sec".
  • If you have SQL installed as a named instance, find out the account name under which the instance is running. This is NOT the SQL Instance name. In my case, I had given the instance name as 'Sql2016' but it was running under 'MSSQL$SQL2016'. This can be found easily either via Services.msc or 'Sql Configuration Manager'. The SQL server has to be specified as "\MSSQL`$SQL2016:Databases(KIDB)\Log Bytes Flushed/sec". Note the symbol ` before the $.



No comments:

Post a Comment