"ORA-65096: invalid common user or role name" error when creating Spotfire Server application database on Oracle 12c

"ORA-65096: invalid common user or role name" error when creating Spotfire Server application database on Oracle 12c

book

Article ID: KB0070084

calendar_today

Updated On:

Products Versions
Spotfire Server All

Description

When creating the Spotfire Server application database on Oracle Database 12c, you will be using the oracle_install scripts present in Spotfire Server downloaded package. After providing values to the variables like SERVERDB_USER = spotfiredb, DEMODB_USER=demodata, and ACTIONDB_USER =actionlogdb, when you execute the create_database.bat, you may encounter the following error:
ORA-65096: invalid common user or role name

Cause: An attempt was made to create a common user or role with a name that was not valid for common users or roles. 
In addition to the usual rules for user and role names, common user and role names must start with C## or c## 
and consist only of ASCII characters.

Action: Specify a valid common user or role name.
In Oracle 11g, with the same user names you will not get any error.

Issue/Introduction

This article shows how to overcome this error when setting up Spotfire Server application database on an Oracle 12c server

Environment

Oracle 12c and higher

Resolution

This is because starting with Oracle 12c, local users can only be created at the pluggable database (PDB) layer. So using those user names, the users are attempted to be created in the container database (CDB), when you should be creating them in a pluggable database (PDB).

To resolve, you can use either of the following 2 options:
  • Make sure that the service name in the database creation script matches a PDB in the Oracle database (see the \oracle\network\admin\tnsnames.ora file).
Or:
  • If you still want to use the container database for creating users through installation scripts, you can start the user names with a C## or c## prefixes.

For more information on this, please refer to the Oracle documentation.