Qery about oracle and SDE!

1296
3
Jump to solution
07-30-2022 05:41 PM
GeoAmer87
New Contributor

Hello Every one

i have query about creating sde geodatabase in Oracle 19c

as you know when you create sde GDB the user name is automatically have to be sde

while in oracle refuse all common users names in the Container database [ORA-65096]

what is the best practice that you following to fix this issue

much respect and appreciate you all

Tags (1)
0 Kudos
2 Solutions

Accepted Solutions
MarceloMarques
Esri Regular Contributor

oracle12c - error: ORA-65096: invalid common user or role name in oracle - Stack Overflow

99.9% of the time the error ORA-65096: invalid common user or role name means you are logged into the CDB when you should be logged into a PDB. For example, if you used the default 19c installation settings, you should login to ORCLPDB (the PDB) instead of ORCL (the CDB).

  1. You can create a "container user" aka "common user".
    Common users belong to CBDs as well as to current and future PDBs. It means they can perform operations in Container DBs or Pluggable DBs according to assigned privileges.

    create user c##username identified by password;

  2. You can create a "pluggable user" aka "local user".
    Local users belong only to a single PDB. These users may be given administrative privileges, but only for that PDB inside which they exist. For that, you should connect to pluggable datable like that:

    alter session set container = nameofyourpluggabledatabase;

    and there, you can create user like usually:

    create user username identified by password;

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov

View solution in original post

0 Kudos
MarceloMarques
Esri Regular Contributor

Best practice, do not use a "common user" for the sde repository owner e.g. "c##sde",  instead use only PDBs and create a local user named "sde" in the PDB.
For more best practices visit the links below.
Mapping and Charting Enterprise Databases - Esri Community
Mapping and Charting Solutions (MCS) Enterprise Databases Best Practices - Esri Community
in this link you will find my database template scripts for oracle

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov

View solution in original post

0 Kudos
3 Replies
MarceloMarques
Esri Regular Contributor

oracle12c - error: ORA-65096: invalid common user or role name in oracle - Stack Overflow

99.9% of the time the error ORA-65096: invalid common user or role name means you are logged into the CDB when you should be logged into a PDB. For example, if you used the default 19c installation settings, you should login to ORCLPDB (the PDB) instead of ORCL (the CDB).

  1. You can create a "container user" aka "common user".
    Common users belong to CBDs as well as to current and future PDBs. It means they can perform operations in Container DBs or Pluggable DBs according to assigned privileges.

    create user c##username identified by password;

  2. You can create a "pluggable user" aka "local user".
    Local users belong only to a single PDB. These users may be given administrative privileges, but only for that PDB inside which they exist. For that, you should connect to pluggable datable like that:

    alter session set container = nameofyourpluggabledatabase;

    and there, you can create user like usually:

    create user username identified by password;

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov
0 Kudos
MarceloMarques
Esri Regular Contributor

Best practice, do not use a "common user" for the sde repository owner e.g. "c##sde",  instead use only PDBs and create a local user named "sde" in the PDB.
For more best practices visit the links below.
Mapping and Charting Enterprise Databases - Esri Community
Mapping and Charting Solutions (MCS) Enterprise Databases Best Practices - Esri Community
in this link you will find my database template scripts for oracle

| Marcelo Marques | Principal Product Engineer | Esri |
| Cloud & Database Administrator | OCP - Oracle Certified Professional |
I work with Enterprise Geodatabases since 1997.
“ I do not fear computers. I fear the lack of them." Isaac Isimov
0 Kudos
GeoAmer87
New Contributor

MarceloMarques i am thankful, really appreciated - thank you for your support

0 Kudos