Query the database with read-only SQL access
Use read-only SQL access to query the database of a DXP environment with your own SQL tools, without submitting a request to Optimizely Support. You request access from the Troubleshoot tab in the PaaS portal. Optimizely opens the database firewall to the IP address you enter for up to four hours.
Optimizely Support no longer handles read-only SQL scripts. You must run read queries yourself with read-only SQL access.
Read-only SQL access supports read operations only. To change data in the database, submit a ticket to Optimizely Support.
Note Read-only SQL access is not available for HIPAA projects or for projects where geofencing applies to your location.
Prerequisites
You need the following to use read-only SQL access:
- An Optimizely cloud account to access the self-services for Optimizely DXP. See Create an Optimizely Cloud Account.
- A CMS 12 or CMS 13 project on DXP.
- A SQL client tool that supports Microsoft Entra ID authentication, such as SQL Server Management Studio.
Request access
- Select your project in the PaaS portal.
- Open the Troubleshoot tab.
- In the Read-only SQL access section, select the environment in the Environment drop-down list. The list shows only the environments you have access to.
- Confirm the IP address in the IP address field. The field shows your detected IP address. Enter a different address if you connect from another network. Access works only from the address you enter.
- Click Request access.
- Click Grant access in the confirmation window.

The request displays in the Your access table with the status Being set up. When the status changes to Active, the table shows the connection details.
Connect to the database
When your access is Active, use the following connection details from the Your access table:
- Server – The database server address. Click Copy to clipboard to copy it.
- Database – The name of each database in the environment. You must specify a database name when you connect. Connections without a database name fail.
- Authentication – Microsoft Entra ID. Sign in with your Microsoft Entra ID account.

You can run read queries against the database as many times as you need until your access expires.
Extend or switch access
To keep working after your access expires, extend it before the time in the Expires (UTC) column.
- Select the environment in the Environment drop-down list.
- Enter the IP address in the IP address field.
- Click Extend access.
- Click Extend access or Switch access in the confirmation window. The confirmation window shows the new expiry time.
The result depends on the IP address you enter:
- Same IP address – Optimizely extends your access. Your existing connection is not interrupted.
- Different IP address – Optimizely switches your access to the new address. Open connections from the previous address are closed.
Revoke access
Revoke access when you finish your work.
- Click Revoke for the environment in the Your access table.
- Click Revoke access in the confirmation window.
Open connections from the granted IP address are closed. The status shows Being revoked until Optimizely removes the access.
If you do not revoke access, Optimizely revokes it automatically shortly after it expires.
Access status
The Status column in the Your access table shows one of the following values:
- Being set up – Optimizely is setting up your access.
- Active – You can connect to the database.
- Expired – Your access expired. Optimizely removes it shortly after, so a connection can keep working briefly.
- Being revoked – Optimizely is removing your access.
- Failed – Optimizely could not set up your access. Click Try again to request it again.
- Revoke failed – Optimizely could not remove your access, so it can still be usable. Click Revoke to try again.