While I’m sure there are probably plenty of reasons that could cause the following error:
Error 29120. Database schema already exists
I’ve encountered this error twice while installing vSphere 5.1 (Build 880146) and thought I’d write a blog post in case someone comes across the same situation as I did and as a reminder for myself in the future. As most would know, the scripts used to set up the RSA database for the SSO service are the ones located in the following directory:
C:\VMware-VIMSetup-all-5.1.0-880471\Single Sign On\DBScripts\SSOServer\schema\mssql
The 3 scripts used to set up the RSA database on an existing database are:
rsaIMSLiteMSSQLSetupTablespaces.sql<— Use to create the actual database
rsaIMSLiteMSSQLSetupUsers.sql<— Use to create the user RSA_USER and RSA_DBA accounts and assign permissions to the database
rsaIMSLiteMSSQLCreateSchema.sql<— Used to creates the specific schema requirements for the database and user accounts
Scenario #1 – Error is presented while installing the first vCenter SSO instance in the environment:
I ran into this error as I was installing the first vCenter SSO in the environment where I ran the scripts in the following order:
- rsaIMSLiteMSSQLSetupTablespaces.sql
- rsaIMSLiteMSSQLSetupUsers.sql
- rsaIMSLiteMSSQLCreateSchema.sql
… then proceeded with the SSO install. What I ended up doing to get the install to continue without throwing that error was to manually go into SQL Server Management Studio, delete the RSA database, the users RSA_USER and RSA_DBA, then rerun the scripts in the same order. I’m not exactly sure why this worked since I was doing the exactly same thing during the first run but the install completed without errors the second try.
Scenario #2 – Error is presented while installing the second vCenter to join an existing vCenter Single Sign On installation:
I noticed that I would also receive this error if I run rsaIMSLiteMSSQLCreateSchema.sql after executing the following scripts for the second vCenter node I wanted to Join an existing vCenter Single Sign On installation and configure SSO for Multisite:
- rsaIMSLiteMSSQLSetupTablespaces.sql
- rsaIMSLiteMSSQLSetupUsers.sql
To fix this, I went into SQL Server Management Studio to delete the RSA database, the users RSA_USER and RSA_DBA, then rerun the following 2 scripts:
- rsaIMSLiteMSSQLSetupTablespaces.sql
- rsaIMSLiteMSSQLSetupUsers.sql
… to create the database and create the accounts with the proper permissions but DID NOT execute rsaIMSLiteMSSQLCreateSchema.sql.