Category: SQL Server

What version of Azure SQL makes sense for you?

This question continues to come up, as more workloads and applications move to the Azure cloud, every solution architect needs to understand what options are available with regards to Azure SQL, and what is the difference between SQL IaaS, PaaS (Single DB and Managed Instance)…

Of course, there are many moving parts when it comes to make the right decision.. Should I lift and shift and rehost SQL as a VM? Should I migrate to a PaaS offering today or can I wait it out? Etc., etc.

Over the course the last 12-14 months, I have been presenting on how to go about migrating your on-premises SQL to Azure and the possible paths to get there. Below is an image I use quite often as it shows you want features and capabilities exist (or do not exist) when you decided to select, SQL Single DB PaaS, for example.

I hope this helps. For an updated link, please see Microsoft’s page here where you can view all the possible SQL deployment options: HERE.

Please note, this image is not mine as it was found on the web, courtesy of Ivan Kosyakov.

Step-by-Step – Installing System Center Operations Manager (SCOM) 2019 on Windows Server 2019 with SQL 2017

This post I will be installing System Center Operations Manager 2019 (SCOM) RTM, Build Number 10.19.10050.

Here is some of the background information. As this post will concentrate on the installation of SCOM 2019, I am going to omit the setup and configuration of the Domain Controller, Windows Server 2019 for the SCOM Management Server. Also to note, I am using a PaaS instance of SQL 2017 (hosted on Azure), likewise the entire environment lives on Azure in an IaaS and PaaS configuration.

Service Accounts and Local Administrator:

DomainAccount Description Local Admin on…
domainSCOM_AA SCOM Action Account SCOM
domainSCOM_DA SCOM Data Access/SDK Account SCOM
domainSCOM_SQL_READ SCOM SQL Reader n/a
domainSCOM_SQL_WRITE SCOM SQL Writer n/a
domainSCOM_Admins SCOM Administrators Group SCOM
domainSQL_SA SQL Service Account n/a

Now, if you’re lazy like me, or are tired of doing this setup for environments, I have scripted the automation of these accounts. You can find that link here, Microsoft TechNet Gallery.


Let’s Begin:

Since I am hosting SQL on a dedicated server, I will install SSRS (SCOM Reporting) on that server.

Well, that’s not new… Prerequisites. Since this is a clean, vanilla Windows 2019 server, we will need to install all the necessary Web Console components, along with Report Viewer Controls (probably SQL CLR Types too..).

  • For the Report Viewer Prerequisites, go HERE.
  • Here is the PowerShell command I ran to install the necessary IIS features/roles:
Import-Module ServerManager
Add-WindowsFeature Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Health, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Windows-Auth, Web-App-Dev, Web-Net-Ext45, Web-Asp-Net45, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Mgmt-Compat, Web-Metabase, NET-Framework-45-Features, NET-Framework-45-Core, NET-Framework-45-ASPNET, NET-WCF-Services45, NET-WCF-HTTP-Activation45, NET-WCF-TCP-PortSharing45, WAS, WAS-Process-Model, WAS-Config-APIs -restart

 

Once the server is back online, you will need to register ASP.Net.

6

You will need to apply the following using Command Prompt (as Administrator)). Yes, this is a screenshot from a previous post…Forgot to capture the screenshot when running it this time..

  1. cd %WINDIR%Microsoft.NETFramework64v4.0.30319
  2. aspnet_regiis.exe -r
  3. IISRESET
  4. Reboot your server…

Once the server is back online, let’s try that Prerequisites check again….

Great! Now all of Prerequisites have been met!

Provide a meaningful Management Group Name (there’s no going back after this…)

SQL Server will be where your SCOM SQL instance(s) were installed. Remember, to either disable the Windows Firewall, or open SQL TCP Ports 1433.

 

I recommend always keeping this off, and manually updating your SCOM infrastructure.

One quick review. Looks good. Hit Install, and get some fresh air!

A few minutes later….

Sweet! All good. I hope this helps. If you have any questions or issues, please drop me a line.

Happy 2019 SCOM’ing!

(more…)

Installing SQL 2016 for System Center Operations Manager (SCOM) 2016 – Step-by-Step

The following is a guide on how to install SQL 2016 for your System Center Operations Manager (SCOM) 2016 environment. I will be installing SQL 2016 on a brand-new server with Windows Server 2016 installed.


To begin, I am going to set the following accounts as a Local Administrator on the server. Also, I am going to be creating two SQL instances, one for the Operations database, and the other for the Data Warehouse. Since this is for my personal lab, I am not dedicated storage/drives for the databases.

 

Domain\Account Description
domain\SCOM_AA SCOM Action Account
domain\SCOM_DA SCOM Data Access/SDK Account
domain\SCOM_SQL_READ SCOM SQL Reader
domain\SCOM_SQL_WRITE SCOM SQL Writer
domain\SQL_SA SQL Service Account

1

Next, let’s run the setup wizard as the SQL_SA account to make life easier down the road…

2

First thing I noticed, between SQL 2012/2014 and SQL 2016, a few changes/features have been removed/added. One that stands out is, the SQL Server Management Studio (SSMS) console is no longer here. Hmm.. I guess we can always connect to the databases from a console on another server/PC.

3

As mentioned, I am dedicated an instance for the Operations DB, and one for the Date Warehouse DB.

4

Setting the  SQL Server Agent to Automatic, and specifying the service accounts for the two services.

5

Keeping the database engine collation as default, “SQL_Latin1_General_CP1_CI_AS“.

6

Here, I am adding all the SCOM/SQL service accounts and SQL service accounts as SQL server administrators.

7

Nice! This is new for SQL 2016 — being able to create TempDB‘s. Since my VM has 8 vCPU’s, looks like SQL 2016 picked up on that, and has decided to create a one-to-one relationship. Great, let’s get started within the installation…

8

Perfect! No errors. Keep in mind, we will need to repeat these steps to create the Data Warehouse instance.

15

16

Great! Now we can go ahead with the SCOM 2016 installation! See HERE, for that post.

If you need to install the SQL Server Management Studio (SSMS), continue reading…

(more…)

Step-by-Step – Upgrading to SCOM 2016 from SCOM 2012 R2

So you’ve decided to take the jump and upgrade to System Center Operations Manager 2016? Assuming you are running a SCOM 2012R2 (UR11) environment, this post will be exactly what you need to have a successful SCOM 2012 R2 to SCOM 2016 upgrade. **Although the recommended path is to upgrade from UR9**

In my environment, here is the quick breakdown:

  • SCOM 2012 R2 environment has two Management Servers.
    • Handful of clients (Windows 2012R2) being monitored.
  • Both Management Servers live on a Windows 2012 R2 operating system.
    • Both Management Servers are running with UR 11 (Update Rollup) **Microsoft recommends upgrading the environment at latest version number minus one (latest – 1), so in this case, UR9 (UR10 was never issued for SCOM 2012R2)**.
  • The SQL environment is a SQL Server 2014 SP2 also running on Windows 2012 R2.
    • The Operations and Data Warehouse live on dedicated SQL instances, however reside on the same server.

Pre-Upgrade Tasks

Let’s get started!

First, we need to do some “Pre-Upgrade” Tasks. Follow these in order.

  1. Back up the Operations Manager Databases
  2. Review the Operations Manager Event Logs
  3. Cleanup the Database (ETL Table)
  4. Remove Agents from Pending Management
  5. Disable the Notification Subscriptions
  6. Stop the Services or Disable any Connectors
  7. Verify that the Operational Database Has More Than 50 Percent Free Space
  8. Back up the Operations Manager Databases

To Cleanup the ETL Tables, you will need to run the following script:

  • The following script will determine the number of rows that will (need) be deleted:

DECLARE @SubscriptionWatermark bigint = 0;

SELECT @SubscriptionWatermark = dbo.fn_GetEntityChangeLogGroomingWatermark();

Select COUNT (*)
FROM EntityTransactionLog ETL with(nolock)
WHERE NOT EXISTS (SELECT 1 FROM EntityChangeLog ECL with(nolock) WHERE ECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND NOT EXISTS (SELECT 1 FROM RelatedEntityChangeLog RECL with(nolock) WHERE RECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND EntityTransactionLogId < @SubscriptionWatermark;

etl-cleanup-1

  • Now we can go ahead and clean up the ETL table running the script below:

DECLARE @RowCount int = 1;
DECLARE @BatchSize int = 100000;
DECLARE @SubscriptionWatermark bigint = 0;
DECLARE @LastErr int;

SELECT @SubscriptionWatermark = dbo.fn_GetEntityChangeLogGroomingWatermark();
WHILE(@RowCount > 0)
BEGIN
DELETE TOP (@BatchSize) ETL
FROM EntityTransactionLog ETL
WHERE NOT EXISTS (SELECT 1 FROM EntityChangeLog ECL WHERE ECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND NOT EXISTS (SELECT 1 FROM RelatedEntityChangeLog RECL WHERE RECL.EntityTransactionLogId = ETL.EntityTransactionLogId)
AND ETL.EntityTransactionLogId < @SubscriptionWatermark;

SELECT @LastErr = @@ERROR, @RowCount = @@ROWCOUNT;

END

etl-cleanup-2

Great! Let this run, which may take a few minutes, or hours depending on your environment..

Now we are ready to get started with the upgrade. (Don’t get to backup your databases (Report Server, Operations, Data Warehouse!!)

1


Upgrading to SCOM 2016

After you have downloaded the RTM image file, as you may have noticed, it is not an ISO file. So let’s extract the file contents locally…

2

Before moving on with the install, I stopped the following SCOM services on all of the Management Servers:

  1. Microsoft Monitoring Agent (healthservice)
  2. System Center Data Access Service (OMSDK)
  3. System Center Management Configuration (cshost)

Now we can run the installer (Run As Administrator or, SCOM Data Access/SDK account)

3

4

5

6

7

Sweet! Although this was expected, since no new changes were required for Windows Server 2012 R2.

8

I cannot stress how useful it is to use dedicated service accounts. Here input your Data Access/SDK account.

9

Once quick review before we begin the Upgrade..

10

Let this run… For me, the upgrade took around 50 minutes for the first Management Server..

11

Sweet! All good. Remember to install the license key before the 120 days are up.

Let’s launch the console just to make sure we are in all working order.

12

Great! Now we will need to repeat the process for the second/other Management servers…

Once complete, let’s upgrade our client agents to SCOM 2016 (v 8.0.10918.0)

13

At this time we can make use of the SCOM 2016 features, and update our out-dated Management Packs. Remember this feature really only works for Microsoft based Management Packs, ie. SQL, Windows Server, Client OS, etc.

14

 

I hope this helped! For additional information, and or upgrading other items such as Gateways, ACS (Audit Collection Services), etc. Please visit Microsoft’s guides HERE.

 

Lastly, it is highly recommended to upgrade to SCOM 2016 Update Rollup 1 (UR1). For that guide, please visit this LINK.

 

Happy SCOM’ing 2016!

(more…)

Step-by-Step – Installing System Center Operations Manager (SCOM) 2016 on Windows Server 2016 with SQL 2016

This post I will be installing System Center Operations Manager 2016 (SCOM) RTM, Build Number 7.2.11719.0.

Here is some of the background information. As this post will concentrate on the installation of SCOM 2016, I am going to omit the setup and configuration of the Domain Controller, Windows Server 2016 for both SCOM Management Server and SQL Server (Please note, I am using SQL Server 2016, both servers on Windows 2016).

If you need help setting up SQL 2016 for SCOM 2016, please visit HERE.

Environment:  Virtual; ESX 6.0 Hypervisor

SCOM Management Server:

  • Windows Server 2016
  • 4 vCPU (2.00GHz)
  • 12 GB memory
  • 100GB Diskspace
  • 1GB vNIC

SQL Server:

  • Windows Server 2016
  • SQL Server 2016
  • 4 vCPU (2.00GHz)
  • 24 GB memory
  • 300GB Diskspace
  • 1GB vNIC

Service Accounts and Local Administrator:

Domain\Account Description Local Admin on…
domain\SCOM_AA SCOM Action Account SCOM & SQL
domain\SCOM_DA SCOM Data Access/SDK Account SCOM & SQL
domain\SCOM_SQL_READ SCOM SQL Reader SQL
domain\SCOM_SQL_WRITE SCOM SQL Writer SQL
domain\SCOM_Admins SCOM Administrators Group SCOM
domain\SQL_SA SQL Service Account SQL
domain\SQL_SSRS SQL Service Reporting Services Account SCOM

 

Now, if you’re lazy like me, or are tired of doing this setup for environments, I have scripted the automation of these accounts. You can find that link here, Microsoft TechNet Gallery.


Let’s Begin:

2

3

For completeness, let’s install all the features of SCOM 2016. (I am hosting a default SQL 2016 instance on the SCOM Management Server for SSRS)

4

5

Well, that’s not new… Errors. Since this is a clean, vanilla Windows 2016 server, we will need to install all the necessary Web Console components, along with Report Viewer Controls (probably SQL CLR Types too..).

  • For the Report Viewer Prerequisites, go HERE.

Note, oddly I was unable to install with CLR SQL 2016, Reports Viewer still complained and required CLR SQL 2014.

  • Here is the PowerShell command I ran to install the necessary IIS features/roles:
Import-Module ServerManager
Add-WindowsFeature Web-Server, Web-WebServer, Web-Common-Http, Web-Default-Doc, Web-Dir-Browsing, Web-Http-Errors, Web-Static-Content, Web-Health, Web-Http-Logging, Web-Log-Libraries, Web-Request-Monitor, Web-Performance, Web-Stat-Compression, Web-Security, Web-Filtering, Web-Windows-Auth, Web-App-Dev, Web-Net-Ext45, Web-Asp-Net45, Web-ISAPI-Ext, Web-ISAPI-Filter, Web-Mgmt-Tools, Web-Mgmt-Console, Web-Mgmt-Compat, Web-Metabase, NET-Framework-45-Features, NET-Framework-45-Core, NET-Framework-45-ASPNET, NET-WCF-Services45, NET-WCF-HTTP-Activation45, NET-WCF-TCP-PortSharing45, WAS, WAS-Process-Model, WAS-Config-APIs -restart

 

Once the server is back online, you will need to register ASP.Net.

6

You will need to apply the following using Command Prompt (as Administrator)).

  1. cd %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\
  2. aspnet_regiis.exe -r
  3. IISRESET
  4. Reboot your server…

Once the server is back online, let’s try that Prerequisites check again….

7

Great! Now all of Prerequisites have been met!

8

Provide a meaningful Management Group Name (there’s no going back after this…)

9

SQL Server will be where your SCOM SQL instance(s) were installed. For me, I have built two instances on my SQL2016 server (SCOM_OPSMGR & SCOM_DW).

10

11

12

13

14

15

16

17

I recommend always keeping this off, and manually updating your SCOM infrastructure.

18

One quick review. Looks good. Hit Install, and get some fresh air!

19

A few minutes later….

20

Sweet! All good. I hope this helps. If you have any questions or issues, please drop me a line.

Please note, it is STRONGLY ADVISED to install the Update Rollup 1 once you have deployed SCOM 2016. For that walk-through, please visit the following post, HERE.

Happy 2016 SCOM’ing!

(more…)

Installing & Configuring SCOM 2016 Reporting Feature

Some prerequisites and things to know… In my environment I am using SCOM 2016 (Technical Preview 5 (TP5)) and SQL 2014 SP1 running on Windows Server 2012 R2. On this local server (I am installing this on my SCOM SQL server) I have already deployed a default (not named) SQL instance, with Reporting Services (SSRS) installed (and already configured). If you run into issues here, please let me know.

On your local server, ensure your SQL service account and SQL SSRS account have local administrative rights on the server. Launch the SCOM 2016 installer and run as the SCOM SDK (Data Access) account.

So let’s begin:

2

3

4

5678

Let this run for a few minutes, grab a coffee, get some fresh air, etc. 🙂

9

Yay, no errors!

You should now have the Reporting function within you SCOM 2016 console. Happy (SCOM) reporting!

 

Installing System Center Operations Manager (SCOM) 2016 Step by Step (Technical Preview 5)

IF YOU ARE LOOKING FOR INSTALLING SCOM 2016 [RTM] ON WINDOWS SERVER 2016 WITH SQL SERVER 2016, GO HERE.


This post I will be installing System Center Operations Manager 2016 (SCOM) –  Technical Preview 5 (TP5). Technical Preview for both System Center 2016 and Windows Server 2016 was recently released, April 27th.

Here is some of the background information. As this post will concentrate on the installation of SCOM 2016 TP5, I am going to omit the setup and configuration of the Domain Controller, Windows Server 2012R2 for both SCOM Management Server and SQL Server (Please note, I am using SQL Server 2014 SP1, both servers on Windows 2012R2).

Environment:  Virtual; ESX 5.5 Hypervisor

SCOM Management Server:

  • Windows Server 2012 R2 — SCOM2016TP5
  • 4 vCPU (2.00GHz)
  • 12 GB memory
  • 100GB Diskspace
  • 1GB vNIC

SQL Server:

  • Windows Server 2012 R2 — SCOMSQLTP5
  • SQL Server 2014 SP1
  • 4 vCPU (2.00GHz)
  • 12 GB memory
  • 200GB Diskspace
  • 1GB vNIC

Service Accounts:

Domain\Account Description
RAVILOCAL\scom_aa SCOM Action Account
RAVILOCAL\scom_da SCOM Data Access/SDK Account
RAVILOCAL\scom_sql_read SCOM SQL Reader
RAVILOCAL\scom_sql_write SCOM SQL Writer
RAVILOCAL\scom_admin SCOM Administrators Group
RAVILOCAL\sql_sa SQL Service Account
RAVILOCAL\sql_ssrs SQL Service Reporting Services Account

 

Let’s begin:

1

2

I will not be installing Reporting on this server, as I will install this on the SQL Server (I will create a post for this later…)

3

Well, looks like I will need to install the Report Viewer Controls and need to install some IIS components for the Web Console.

  • For the Reports Viewer Controls prerequisites, you can visit the following post for the instructions, HERE.
  • For the Web Console/IIS components prerequisites,  you can visit the following post for the instructions, HERE.

4

Looks like I still need to meet a few more prerequisites…

5

You will need to apply the following commands (unfortunately I could not execute in PowerShell, so you will need to use Command Prompt (as Administrator)).

  1. cd %WINDIR%\Microsoft.NET\Framework64\v4.0.30319\
  2. aspnet_regiis.exe -r
  3. IISRESET
  4. Reboot your server…

Back to to installation…..

6

7

8

9

Since this is a lab, I installed the databases on the same SQL instance. Best practice, use dedicated instances or better yet, dedicated servers…

10

11

12

13

Whoops, I forgot to add the SCOM service accounts as local administrators on the SCOM Management Server….

14

Okay, back to the installation…

15

16

I recommend always keeping this off, and manually updating your SCOM infrastructure.

17

18

Let this run, go for a break, coffee, smoke, whatever….

20

Yay! All good!

22

23

24

Right off the bat, looks like there are a new features, like, “Tune Management Packs” I will get into this in another post…

 

ThoughtsAs you may have noticed, the install is almost identical to the 2012R2 and it appears not much has changed in terms of the install.

 

(more…)

SCOM 2012 SP1 to SCOM 2012R2 Upgrade Prerequisites

When upgrading from SCOM 2012 SP1 to 2012R2, you will need to install the following prerequisites:

  1. MICROSOFT® REPORT VIEWER 2012 RUNTIME
  2. Microsoft System CLR Types for SQL Server 2012

Of course you can also download them straight from Microsoft. The links are provided below.