sa login, sysadmin members, and logins that can impersonate any other login.
This integration supports self-managed SQL Server (VM or on-premises), AWS RDS for SQL Server, Azure SQL Database, Azure SQL Managed Instance, and Google Cloud SQL for SQL Server. Pick the setup path that matches your deployment below.
What Oleria discovers
Risk signals
Oleria reports these risks for SQL Server:- SQL Server sysadmin - fixed
sysadminorCONTROL SERVER, including members of a Windows group login. - sa login enabled
- TRUSTWORTHY database owned by a sysadmin
- Can impersonate any login
- SQL login without password policy (
CHECK_POLICY = OFF) - SQL login password never expires (
CHECK_EXPIRATION = OFF) - SQL login password expired
- Orphaned database user
- guest enabled in a user database
- Permission granted WITH GRANT OPTION - including members of a role that holds the permission.
- Explicit grant to public - excluding SQL Server’s built-in defaults.
Prerequisites
- A dedicated SQL Server login for Oleria, with the read permissions listed for your deployment below.
- Network access from Oleria to your instance on the configured port (default
1433). Google Cloud SQL is the exception: Oleria connects through the Cloud SQL connector, so you don’t need to allowlist IP addresses. - Self-managed instances: SQL Server 2012 or later. SQL Server 2016 or later gives the most complete activity data.
- Optional: additional permissions on that login, if you also want to run remediation actions. See Remediation actions.
SQL Server silently hides catalog rows that a login can’t see. A login without the read permissions below connects successfully but sees almost nothing. To avoid syncing a partial view, Oleria refuses the connection with an error that names the missing permission. Oleria re-checks permissions on every sync. If you later revoke them, the sync stops with an error instead of removing accounts and access from Oleria.
Set up the integration
- Self-managed
- AWS RDS
- Azure SQL Database
- Azure SQL Managed Instance
- Google Cloud SQL
1
Create a connector login
Connect as an administrator and create a dedicated login for Oleria. Set
CHECK_POLICY = ON so the login follows your password policy.VIEW ANY DEFINITIONis required. It exposes all object and security metadata.CONNECT ANY DATABASEis required. It is available on SQL Server 2014 and later. On older versions, create a user for the login in every database instead.VIEW SERVER STATEis needed to read audit status for activity.
VIEW ANY SECURITY DEFINITION alone isn’t enough. It hides databases, schemas, and tables from the login.2
Expand Active Directory groups (optional)
On a domain-joined instance, let Oleria expand the members of Windows group logins. Run this in the Without this grant, Windows group logins still appear, but Oleria doesn’t list their members.
master database:3
Use Windows authentication (optional)
To connect with Windows authentication instead of a SQL login, create the login from a Windows account:Then grant it the same permissions as above. Oleria uses NT LAN Manager (NTLM) authentication with an explicit domain password. Kerberos-only setups (keytab) aren’t supported.
4
Enable SQL Server Audit for activity (optional)
Create and enable a server audit and a server audit specification. Follow Set up SQL Server Audit below. Oleria reads the files of the enabled audit automatically.
Set up SQL Server Audit
Complete this section only if you want Oleria to show activity. Activity appears within about 5 minutes of the event. This section applies to self-managed SQL Server, AWS RDS, and Google Cloud SQL. Azure SQL Database and Azure SQL Managed Instance can’t write audits to a local folder. Use the Azure auditing options in their setup tabs instead.1
Create the server audit
Create an audit that writes to a file. Use
/var/opt/mssql/audit on Google Cloud SQL, D:\rdsdbdata\SQLAudit\ on AWS RDS, or any folder you choose on self-managed instances. Use these settings:MAXSIZE = 50 MBQUEUE_DELAY = 1000ON_FAILURE = CONTINUE
OleriaAudit.2
Create the server audit specification
Create a server audit specification named
OleriaAuditSpec for OleriaAudit. Add the action groups in this table.The data access groups generate a high volume of events. Omit them if you don’t need data access activity.
BATCH_COMPLETED_GROUP (SQL Server 2022 and later) is also available, but it is very high volume.3
Exclude the connector login (optional)
To reduce audit volume, exclude the Oleria login from the audit. Run this before you turn the audit on, because SQL Server doesn’t allow changing an enabled audit:This isn’t required. Oleria already drops its own sessions when it reads the audit.
4
Turn on the audit
Enable the specification and the audit:
Oleria reads the enabled audit automatically. You only need the Audit File Path (optional) field to override the location, or for Azure SQL Database file (blob) auditing.
Connect Microsoft SQL Server to Oleria
1
Open the integration
Sign in to your Oleria workspace and navigate to Integrations -> Microsoft SQL Server -> Connect.
2
Complete the connection form
Select your Deployment first. The form updates to show only the fields that deployment needs.
- Self-managed
- AWS RDS
- Azure SQL Database
- Azure SQL Managed Instance
- Google Cloud SQL
Managed services and Microsoft Entra authentication reject the Login only and Disabled (not recommended) encryption options.
3
Complete the connection
Select Authenticate. Oleria validates the connection and its permissions, discovers your SQL Server accounts, resources, and access, and begins the first sync.
Verify the integration
Confirm Microsoft SQL Server appears on the Connected tab of your Oleria Integrations page. After the first sync completes, you can review the discovered accounts, roles, resources, access grants, and activity in your Oleria workspace. If the connection is refused with an error that names a missing permission, grant that permission to the connector login and try again.Remediation actions
Oleria validates the connector login’s permissions before it runs each action. Disable SQL Server Login also requires approval in Oleria.Oleria never changes its own connector login or that login’s role memberships. Oleria also refuses a name that matches more than one principal, which can happen with case-sensitive collations.
Known limitations
- No account creation or deletion: Oleria assigns and removes roles, and disables or re-enables logins. It can’t create or delete accounts.
- Disable SQL Server Login scope: Disable SQL Server Login works only on server logins. It can’t disable contained database users. On Azure SQL Database, Oleria can’t end existing sessions, so they keep access until they disconnect. The action output says so.
- Statement text is redacted: Oleria removes data from audited statements and keeps their shape, such as keywords and table and column names. Literal values become
<redacted>, so personal data never reaches Oleria. - Synthetic email: SQL Server principals have no email field. Oleria synthesizes one, which may not match a real address. Windows and Microsoft Entra principals correlate through their directory identifiers, so they match your Active Directory and Microsoft Entra ID integrations.
- Group membership: Oleria expands the members of Windows group logins only on domain-joined instances where the connector login can run
xp_logininfo. Microsoft Entra group membership comes from the Microsoft Entra ID integration, not from SQL Server. - DENY evaluation: A member denied a permission doesn’t inherit it from a role on the same object. A
DENYat a broader scope, such as a schema, appears as its own denial. Oleria doesn’t subtract it from a narrower grant, such as a table inside that schema. - Impersonation in non-TRUSTWORTHY databases: Oleria shows it only for database-scoped accounts, because SQL Server confines it to that database.
- System and provider databases:
master,msdb,model,tempdb,rdsadmin*, andgcloud_cloudsqladmindon’t appear as resources. SQL Agent jobs and proxies aren’t covered. - Offline or restoring databases: Oleria lists them as skipped, with their state, and doesn’t scan them.
- Azure SQL Database login visibility: Seeing SQL logins requires
##MS_LoginManager##, which also allows login management. See the setup steps above. - Azure Log Analytics: Oleria reads only the
AzureDiagnosticstable. Auditing set to the Resource specific destination table isn’t supported.

