Install Oracle in docker

Install Oracle express

docker command in windows powershell (WSL installed):

download oracle sqldeveloper Windows 64-bit with JDK 11 included:

https://www.oracle.com/database/sqldeveloper/technologies/download/

Add read rights to all existing and new user databases

 

The following script add read user rights for every user databases and  system model databases for the new databases to readeruser  login.

 

Resolve SID to domain account

There are reasons you need to resolve SID. You can do it by powershell:

 

 

DBATools Get-DbaDatabase] Failure | The certificate chain was issued by an authority that is not trusted.

If  you get the error:

Get-DbaDatabase] Failure | The certificate chain was issued by an authority that is not trusted.

You can set in dbatools:

 

or

 

dbatools sql The certificate chain was issued by an authority that is not trusted.
dbatools sql The certificate chain was issued by an authority that is not trusted.

Docker build

 

Some usefull  docker command  in powershell windows :

Prerequisite: Visual Studio Code Remote Development Extension Pack

 

VS Code and Git and Docker

  1. Download a git project from github.
  2. Create Visual Studio project workspae
  3. Build containers

Commands in powershell (in the new empty project folder):

Docker Visual Studio Code
Docker Visual Studio Code

SQL Server using Active Directory Kerberos authentication on RedHat linux

This is an SSMS screenshot where a SQL user and two (windows) domain users connected to SQL Server:

SQL Server on Red Hat Linux using kerberos AD authentication
SQL Server on Red Hat Linux using kerberos AD authentication

some hint if you want to deploy it:
– at first you have to join the linux server to the Active Directory
sudo realm join SQLPLAYGROUND.COM -U ‘azureadmin’ -v
kinit and klist help you to check kerberos tickets
– you can use create -k /var/opt/mssql/secrets/mssql.keytab only in Ubuntu
– you have to use ktpass /princ MSSQLSvc/REDHATSQL2019.SQLPLAYGROUND.COM:1433@CONTOSO.COM /ptype KRB5_NT_PRINCIPAL /crypto aes256-sha1 /mapuser SQLPLAYGROUND\sqluser /out mssql.keytab -setpass -setupn /kvno /pass in Red-Hat linux

Index usage statistics

Do you have unused index? Do you have ineffective index? How many times was it used for select or update?
Is it used by scan , seeks or lookups?
Index usage statistics :