dixxon
dixxon

Reputation: 3

How do i change the USERS tablespace name in a pluggable database during a silent install using dbca?

We are trying to build out a set of new Oracle database environments using multitenant & ASM for the first time. We have the basic build down using Ansible, however our pdb's are being created using Oracle standard tablespaces, rather than the tablespaces we are specifying in our CDB (our CDB tablespace names are changing as expected). Which config file do we need to change to touch the PDB tablespaces as well?

For example; we create our CDB with USER_AUTO_01 rather than USERS. We would expect our pluggable to be the same, however it is retaining USERS.

We are able to rename them along with the datafiles after they are built, however with ASM, this is time consuming in the environments we are building.

Upvotes: 0

Views: 540

Answers (1)

kfinity
kfinity

Reputation: 9091

Are you creating these PDBs from seed using CREATE PLUGGABLE DATABASE? If so, my understanding is that the tablespaces are cloned from PDB$SEED, not the CDB.

You could modify PDB$SEED to rename the USERS tablespace.

But if it's possible, I think it would be easier to try using the extra CREATE PLUGGABLE DATABASE clauses to specify DEFAULT TABLESPACE USER_AUTO_01 and USER_TABLESPACES=ALL EXCEPT('USERS')

Edit: Oh, I see you said you want to use dbca silent mode. Well, dbca has less options, but you could:

  1. call dbca with your parameters
  2. and -createUserTableSpace false
  3. and -customScripts to call a short SQL script to create your USER_AUTO_01 tablespace and run ALTER DATABASE DEFAULT TABLESPACE USER_AUTO_01;

Upvotes: 1

Related Questions