SQL Server VDB Refresh or Provision Fails with Database 'database_name Already Exists' (KBA5598)
KBA
KBA# 5598
Issue
Provisioning or refreshing a SQL Server VDB fails with the Error:
| Mode LastWriteTime Length Name
| ---- ------------- ------ ----
| d---- 3/24/2020 9:40 AM _delphix
| Changed database context to 'master'.
| Msg 1801, Level 16, State 3, Server <SERVER>, Line 2
| Database '<DATABASE>' already exists. Choose a different database name.
| die : Error: Failed to create seed database.
| At C:\Program Files\Delphix\DelphixConnector\#################-vdb-##\SCRIPT\CreateSeedDB.ps1:101 char:8
| + die <<<< "Failed to create seed database."
| + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
| + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,die
| die : Error: create_seed_vdb failed
| At C:\Program Files\Delphix\DelphixConnector\#################-vdb-##\SCRIPT\Provision.ps1:26 char:12
| + die <<<< "$($args[0])"
| + CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
| + FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,die
Applicable Delphix Versions
- Click here to view the versions of the Delphix engine to which this article applies
-
Major Release All Sub Releases 6.0 6.0.0.0, 6.0.1.0 5.3
5.3.0.0, 5.3.0.1, 5.3.0.2, 5.3.0.3, 5.3.1.0, 5.3.1.1, 5.3.1.2, 5.3.2.0, 5.3.3.0, 5.3.3.1, 5.3.4.0, 5.3.5.0 5.3.6.0, 5.3.7.0, 5.3.7.1, 5.3.8.0, 5.3.8.1 5.2
5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1
Resolution
In some cases, the SQL Server instance may have something held in memory/cache pertaining to this database which then causes provision/refresh jobs to fail in this manner. At first, check that there is not a database with this name, as in this phase there should not be such a database. It might be in reference to the mentioned memory/cache that the SQL Server instance has not removed a reference to the database name (in the case of a refresh).
If this is a possibility, and you are able to do so without causing too much disruption, please restart the SQL Server instance and retry the operation. In this case, a SQL Server restart may need to be scheduled off-hours so there is potential for some "wait" time to determine if such a restart is successful.
If the VDB operation still reports the same error please raise a case with Delphix for further assistance.
Related Articles
The following articles may provide more information or related information to this article:
- N/A