SQL Server (Not Synchronizing) Monitor

If it happened on the Primary DB server and DB cannot be accessed. Restart secondary first then primary. See if the Not synchronizing changed to Not synchronizing / in recovery. After there, its a waiting process.

It may change to revert / in recovery or synchronized depending on DB and DB log size.

Checking synchronization state

SELECT @@servername as SQLName,db_name(database_id) as DBName,synchronization_state_desc,database_state_desc
from sys.dm_hadr_database_replica_states where is_local=1

Checking performance counter for redone, undone, recovering queue.

SELECT instance_name, [object_name],
[counter_name],
[cntr_value] FROM sys.dm_os_performance_counters WHERE [object_name] LIKE ‘%Database Replica%’

Read more

Upgrading Ubuntu 16 to 18

sudo apt-get update && sudo apt-get upgrade

sudo apt autoremove

sudo apt dist-upgrade

Make sure that’s nothing pending and everything up to date

sudo apt install update-manager-core

sudo do-release-upgrade

Throughout the installation there will be prompts to ask to overwrite or use the existing.

the first one will be PAM configuration override local changes to /etc/pam.d/common-*/ select “override

The rest can be default.

After a few hours the installation will be done.

After restart there’s a chance that a ubuntu is unable to access network.

Go to /etc/resolv.conf change the existing nameserver from 127.0.0.53 to something either your own DNS IP.

Playing with SSL pfx file

Conversion to a combined PEM file

To convert a PFX file to a PEM file that contains both the certificate and private key, the following command needs to be used:
# openssl pkcs12 -in filename.pfx -out cert.pem -nodes

Conversion to separate PEM files

We can extract the private key form a PFX to a PEM file with this command:
# openssl pkcs12 -in filename.pfx -nocerts -out key.pem

Exporting the certificate only:
# openssl pkcs12 -in filename.pfx -clcerts -nokeys -out cert.pem (or .crt)

Removing the password from the extracted private key:
# openssl rsa -in key.pem -out server.key