Error "The Database Name Provided Is Already Used By An Existing Database"

While trying to perform an install or upgrade, the error "The database name provided is already used by an existing database" is obtained. How to resolve?

Issue Description : While trying to perform an install or upgrade we get an error " The database name provided is already used by an existing database "

Error Screenshot :



Root Cause : When doing a fresh install or adding in a component, the database needs to be created. As a check, the installer will either create the database, or check that the database to be used is empty.


Resolution :
  1. If this is an upgrade where a new component is being added, (For example, an upgrade from 19.x to 20.x adds the Identity Server. The Identity Server may have its own database.) make sure that the new components database is empty. If the new component is the IdentityServer and it is connecting to the Orchestrator database, this error should not be encountered and a ticket with UiPath Support should be raised. The IdentityServer and Orchestrator can share a database.
  2. If the new database is empty, try running the following command on the database:
  • Select Count(1) From [%DATABASE NAME%].[INFORMATION_SCHEMA].[TABLES] Where TABLE_SCHEMA='dbo'
    • If the above command does not return zero, then the database is not considered empty
    • If the above does return zero, then double check the names being used.
  1. Finally if the above does not work, open a UiPath Support ticket.
  2. Additionally, as a work around, try deleting and recreating the database.