Skip to content

Manage Cloud Database Access

⏱ 20 minutes intermediate
📜Corecms

Sometimes you need to look beyond your application code. Debugging a content issue, analyzing performance, or migrating data all require direct access to the database. Optimizely Cloud provides secure access to your environment databases through standard SQL Server tooling.


  1. Log into the Optimizely Cloud management portal
  2. Select your project
  3. Navigate to Databases (or Settings > Database Access)
  4. Select the environment (Integration, Preproduction, or Production)
  5. Copy the connection details:
    • Server hostname
    • Database name
    • Username
    • Password (click to reveal or generate a new one)

  1. Open SQL Server Management Studio (SSMS)
  2. In the Connect dialog:
    • Server name: Paste the hostname from the portal
    • Authentication: SQL Server Authentication
    • Login: Paste the username
    • Password: Paste the password
  3. Click Options > Connection Properties
  4. Set Encrypt connection to Yes
  5. Click Connect

  1. Open Azure Data Studio
  2. Click New Connection
  3. Fill in:
    • Server: Hostname from portal
    • Authentication type: SQL Login
    • User name: From portal
    • Password: From portal
    • Database: Your database name
  4. Click Connect

The CMS stores content in the tblContent, tblContentProperty, and tblContentLanguage tables. For read-only queries against content:

SELECT c.pkID, c.Name, cl.URLSegment
FROM tblContent c
JOIN tblContentLanguage cl ON c.pkID = cl.fkContentID
WHERE cl.LanguageBranch = 'en'
ORDER BY c.pkID DESC;

View scheduled job status and history:

SELECT Name, IsRunning, LastExec, NextExec
FROM tblScheduledItem
ORDER BY NextExec;

Monitor your database size to stay within your subscription limits:

SELECT
DB_NAME() AS DatabaseName,
SUM(size * 8 / 1024) AS SizeMB
FROM sys.database_files;

Refresh lower environments from Production

Section titled “Refresh lower environments from Production”

To copy production content to Integration or Preproduction for realistic testing:

  1. In the management portal, navigate to Databases
  2. Select the target environment (Integration or Preproduction)
  3. Click Refresh from Production (or Import Database)
  4. Confirm the operation — this overwrites the target database
  5. Wait for the import to complete (this can take several minutes depending on database size)

After refreshing:

  • Update any environment-specific data (test API keys, webhook URLs)
  • Clear caches in the refreshed environment
  • Notify your team that the environment data has been reset

Production databases are backed up automatically:

  • Full backup — Weekly
  • Differential backup — Daily
  • Transaction log — Every 5-10 minutes
  • Retention — 35 days of point-in-time restore

If you need to restore to a specific point in time:

  1. Contact Optimizely support with your project ID and the desired restore time
  2. Support can restore to a new database or replace the existing one
  3. Restores for Integration and Preproduction can be self-service through the portal

  • Never share database credentials in chat, email, or code repositories
  • Regenerate passwords periodically through the management portal
  • Use read-only queries whenever possible in production
  • Avoid DDL changes (CREATE, ALTER, DROP) directly in the database — use code-first migrations instead
  • Limit production access to senior team members with operational need