Skip to main content
Planview Customer Success Center

The database principal owns a schema and cannot be dropped V2014

Symptoms

When upgrading a database to V2014, an error occurs. The latest entry in the versionhistory table is

Upgrading Changepoint database structure to version 17.00.179.000 completed

Error 1:

The database principal owns a schema in the database, and cannot be dropped.

After trying to change schema ownership of cpdep to sa, we no longer have this error, but there is a new one:

Error 2:

Cannot use the special principal 'sa'.
The file name 'CPTempDB' has been set.
The file name 'CPTempDB_Log' has been set.


Reason

These errors occur when Changepoint attempts to create the CPTempDB.

Resolution

 To solve these errors:

1. Please make sure that in the Changepoint database there is only one user that owns the cpdep schema and has cpded has default schema. This is typically the user used by the website to connect to the database, like CPSQLUser, CPAdmin or CPUSER. Do not make sa/dbo owner of the cpdep schema and don't make cpdep the default schema for sa/dbo.

2. Please ensure that in the system database 'model' the user CPSQLUser, CPAdmin or CPUSER (same as in step 1) does not exist.