SCCM – SQL Server Collation PreRequisites

Installing System Center Configuration Manger (SCCM) into my HomeLab environment to ensure that my Windows Servers are patched up to date.

During the SCCM installation, the prerequisite failed due to the wrong SQL Server Collation.

Screenshot #1 shows the failure. Because the prerequisite failed, you will noticed that the Begin Install button is greyed out.

SCCMCollation#1
Screenshot #1 – SCCM SQL Collation Issue

SQL Collation needs to be SQL_Latin1_General_CP1_CI_AS.

Mine was set to Latin1_General_CI_AS_KS as seen in Screenshot #2.

SCCMCollation#2
Screenshot #2 – SCCM SQL Collation Issue

Solution:

Change the SQL Server Collation via a rebuild.

Prerequsities:

  1. The sa account within SQL Server is enabled and password is known;
  2. Member of SysAdmins group within SQL Server.

SCCMCollation#3

Screenshot #3 – SCCM SQL Collation Issue

  1. Open Command Prompt as an Administrator;
  2. Navigate to setup.exe where your binaries are installed;
  3. Run the following command:
    .\Setup.exe /q /action=rebuilddatabase /instancename=MSSQLServer /sapwd=Password1 /SQLCollation=SQL_Latin1_General_CP1_CI_AS /SQLSYSADMINACCOUNTS=DEV\user1
  4. This will change the collation to SQL_Latin1_General_CP1_CI_AS.
SCCMCollation#4
Screenshot #4 – SCCM SQL Collation Issue

SQL Server Error – The media is Write Protected

Recently shut down my SQL Server cluster for maintenance. When I powered on the server and performed healthchecks, I noticed that the SQL Server instance was not started. Tried starting the service and it failed.

Investigated the logs and saw the below error in the logs:

The media is write protected on F:\…….

ReadOnlyDisk#1

Weird. Opened Disk Management and looked at the disks associated with this particular instance. As you can see below, the disk shows as Read Only.

ReadOnlyDisk#2

Solution:

The easiest solution to resolve this is to use DiskPart and clear the Read Only attribute.

Open Powershell as an administrator and run the following commands:

DISKPART

SELECT DISK 2

Where the Disk Number matches the disk number in Disk Manager.

Attributes disk

You will see that the option under Read-Only is Yes.

Attributes disk clear readonly

Attributes disk

You will see that the option under Read-Only is now No.

ReadOnlyDisk#3

Now that the disk is read/writeable, the SQL Server service will now start.

Cause:

The hardware provider in our case had set the disks to read-only on the SAN causing this issue.

Error – Change SQL Server Login Details Failed – Cannot Find Object or Property

Applicable To:
SQL Server 2008 R2
SQL Server 2012
SQL Server 2014

Recently tried to change a SQL Server service account details from Local System to a domain account as per best practices.
When I went to change the service account details I encountered the below issue:

 ObjectPropertyError#1

 Solution:

 Grant the new SQL Server service account Full Control on the following folders:

C:\Program Files\Microsoft SQL Server\MSSQL.MSSQLServer\MSSQL\
C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\

And grant full control to the registry key:

HKeyLocalMachine\System\CurrentControlSet\Services\WinSock2\Parameters