Skip to main content

Enable MSSQL dSource Fails Because a Database With the Same Name as the Staging Database Already Exists (KBA1499)





This topic has been Retired as the issue was fixed in

Applicable Delphix Versions


Major Release

All Sub Releases




3.1,,,, ,,,,,


Prior to Delphix Engine, attempts to enable a dSource in a Microsoft SQL server environment may fail with the error:

a database with the same name as the staging database "X" already exists


Attempts to enable a dSource in a Microsoft SQL Server environment fail with staging database with same name "already exists". 

This action (attempt to enable dSource) and this failure (already exists) are key to matching bug DLPX-31219 and providing quick resolution.

Confirm the symptoms and work to solution:

(i) In browser review failed jobs:  "Job 1234: Enable database source ... failed"

(ii) Details of the failed job will show:

"Database source ... could not be enabled because a database with the same name as the staging database "4206a0a8-7f5f-fbea-031e-fbf09331383a-staging-1" already exists on instance "MSSQLSERVER" on staging host "DC01DLPXDBDV33".


(iii) Open the dSource card and look at the "staging environment". Hover the mouse over this for the full name. In our case the full name is "4206a0a8-7f5f-fbea-031e-fbf09331383a-staging-1"

(iv) debug.log, this is optional as the symtoms "customer tried to enable dSource" and this failed with "already exists" is sufficient. Stack will appear as follows:

[2014-11-19 14:40:23,502][ERROR][wms.impl.WorkerManagerImpl#recordFailure:442][Worker-10903] worker 10903 com.delphix.appliance.server.jcm.impl.JobLauncher: failed.
        at com.delphix.appliance.server.exception.DelphixUserException.logMe(
        at com.delphix.appliance.server.exception.DelphixUserException.<init>(
        at com.delphix.appliance.server.mssql.staging.MSSqlStagingSourceEnableJob.setupStagingDB(
        at com.delphix.appliance.server.mssql.staging.MSSqlStagingSourceEnableJob.execute(
        at com.delphix.appliance.server.mssql.staging.MSSqlStagingDatabaseManagerImpl.enable(
        ... 6 more
        at com.sun.proxy.$Proxy50.enable(Unknown Source)
        at com.delphix.appliance.server.db.executor.BaseSourceProviderImpl.enable(
        at com.delphix.appliance.server.lifecycle.impl.SourceManagerImpl$1.execute(
        at com.delphix.appliance.server.jcm.impl.JobManagerImpl.runJob(
        at com.delphix.appliance.server.jcm.impl.JobLauncher.execute(

(v) Do due diligence and rule out some unusual other issue: 

  • Check the status of the staging server using SQL Server Management Studio. Confirm the staging server status as "Restoring..."
  • Check the mount point implied in the error message using the Delphix connector links. Check the device is mounted. In this example we'd need to check:

    D:\Program Files\Delphix\DelphixConnector\4206a0a8-7f5f-fbea-031e-fbf09331383a-staging-1

    If this is not mounted then the problem is a different one.


To confirm and remediate the issue from an MDS perspective: Find the container_id and container_name:

hercules=> select container_id,container_type from dlpx_container where name = 'QNXT_PLANDATA_MI_REB' ;
 container_id |   container_type   
            1 | MSSQL_DB_CONTAINER
(1 row)

Using the container_name find the staging_source:

hercules=> select staging_source from mssql_linked_source where container = 'MSSQL_DB_CONTAINER-1' ;
(1 row)

Using the staging_source, cross-check / confirm the "enabled" state and the mount base with what is visible in the browser:

hercules=> select staging_db_id,enabled,mount_base from mssql_staging_source where staging_db_id = 1 ;
 staging_db_id | enabled |                                        mount_base                                        
             1 | f       | D:\Program Files\Delphix\DelphixConnector\4206a0a8-7f5f-fbea-031e-fbf09331383a-staging-1
(1 row)


If you confirmed diagnosis

(i) Update MDS:

hercules=> update  mssql_staging_source set enabled = 't' where staging_db_id = 1 ;

NOTE: if the DE is running 3.x set enabled to 1 rather than 't'

(ii) Validate the change:

 hercules=> select staging_db_id,enabled,mount_base from mssql_staging_source where staging_db_id = 1 ;
 staging_db_id | enabled |                                        mount_base                                        
             1 | t       | D:\Program Files\Delphix\DelphixConnector\4206a0a8-7f5f-fbea-031e-fbf09331383a-staging-1
(1 row)

(iii) Enable the dSource using the browser interface

Additional Information

This issue is described in bug DLPX-31219 ("dsource failing staging db already exists"). It was fixed in 4.2 and backported to