Commit acd25c61 authored by carplaptop's avatar carplaptop

merging README.md from SQLAzure to master

parent f700fe19
......@@ -5,8 +5,8 @@ This utility captures a series of performance metrics and logs them to various t
Git Branches
================
# master: this code works through SQL 2016
# SQLAzure: this is the same code as master except it does not use SQL Agent nor any of the DMVs that are not available in Azure.
* master: this code works through SQL 2016
* SQLAzure: this is the same code as master except it does not use SQL Agent nor any of the DMVs that are not available in Azure.
More on this below.
......@@ -16,10 +16,22 @@ How to Install Performance Collector
2. Create the PerformanceCollector database on your server using your preferred file layouts. If you don't do this the Installer script will do this for you using the default data file and log placement.
3. Run PerformanceCollectorInstaller.sql as sysadmin.
SQLAzure Branch
================
Running Performance Collector on SQLAzure
==========================================
If you want to run PC on SQL Azure you need to switch to the SQLAzure branch.
SQLAzure is a PaaS offering for SQL Server (if you are running SQL Server in a VM in Azure, known as IaaS, then continue to use the master branch code). For the most part PC works great on SQL Azure but there are some differences regarding how SQL Azure databases work:
* There is no concept of SQL Agent (asynchronous job scheduler). We have to use something else. This is not coded, you'll need to find the solution. There are multiple Azure tools that accomplish scheduled tasks, but nothing works really well given the unique requirements of PC. For instance, Azure Functions is the "cron for Azure" solution but it isn't meant to launch a task that never completes. Using AF for this is VERY expensive. Azure Scheduler and Azure Automation have similar limitations as of when this was written.
* SQL "Servers" are used for logical groupings of SQL "Databases" only. You can theoretically put EVERY SQL Database on the same Server and Azure's "fabric" will manage resources for you. You declare how many DTUs (Database Throughput Units) you need for a given database, not for a server. For PC, this means that having a separate PerformanceCollector db on your SQLAzure Server is meaningless. Instead, PC installs as a schema on your existing SQLAzure db and monitors that. The side effect is that if you have 50 databases you are running 50 PerformanceCollector schemas and jobs. There is no good way around this.
* In the future it may be worth snapping sys.dm_db_resource_stats to track approximate DTUs for elastic scaling of SQLAzure.
* I have not tested this with SQL Azure Data Warehouse (SQLDW) but it should work mostly as expected. [Monitor Your Workload Using DMVs](https://azure.microsoft.com/en-us/documentation/articles/sql-data-warehouse-manage-monitor/)
Caveats
------------
PerformanceCollector has not been tested with Azure SQL Datawarehouse (SQLDW).
Making Changes to Performance Collector
=========================================
PC is installed using PerformanceCollectorInstaller.sql. However, that's a big file to update so it's easier to add new files and change existing code in the actual .sql files in the various folders. Change whatever you need to change and then run `powershell .\BuildSQL.ps1`. This command will rebuild PerformanceCollectorInstaller.sql with your latest edits.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment