Oracle

create pluggable database from dblink error: ORA-17628 ORA-16032: parameter destination string cannot be translated; Source DB error: ORA-01264 ORA-07217: sltln: environment variable cannot be evaluated.

Create PDB from dblink hitting error ORA-16032: parameter destination string cannot be translated.

While trying create PDB, found the datafiles get cloned, however the command at the end returned error, and the PDB can not be open:


SQL> CREATE PLUGGABLE DATABASE PDB$1 from PDB$1@clone_link;
#After a while returns:
CREATE PLUGGABLE DATABASE PDB$1 from PDB$1@clone_link
*
ERROR at line 1:
ORA-17628: Oracle error 16032 returned by remote Oracle server
ORA-16032: parameter  destination string cannot be translated

SQL> show pdbs;
    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 PDB$1 			  MOUNTED

SQL> alter pluggable database PDB$1 open;
alter pluggable database PDB$1 open
*
ERROR at line 1:
ORA-65104: operation not allowed on an inactive pluggable database

Checked Source DB alert log showing error: ORA-07217: sltln: environment variable cannot be evaluated.

2021-07-14T13:56:51.008107+08:00
Errors in file /u01/app/oracle/diag/rdbms/cshidcpd/CSHIDCPD/trace/CSHIDCPD_ora_15869.trc:
ORA-16032: parameter LOG_ARCHIVE_DEST_1 destination string cannot be translated
ORA-01264: Unable to create archived log file name
ORA-07217: sltln: environment variable cannot be evaluated.

Search ORA-07217, Found a MOS doc 1949621.1 stating a similar case that the datafile path containing a $ dollar sign. In our case the dollar sign is not in the path but in the PDB name…

Solution:

Rename the PDB without a dollar sign referring Mike Dietrich’s Blog.

#Source DB
SQL> alter pluggable database PDB$1 close;
Pluggable database altered.
SQL> alter pluggable database PDB$1 open restricted; 
Pluggable database altered.
SQL> alter session set container=PDB$1;
Session altered.
SQL> alter pluggable database rename global_name to PDB1;
Pluggable database altered.
SQL> alter pluggable database PDB1 close;
Pluggable database altered.
SQL> alter pluggable database PDB1 open;
Pluggable database altered.

#Target DB
SQL> CREATE PLUGGABLE DATABASE PDB1 from PDB1@clone_link;
Pluggable database created.
SQL> alter pluggable database PDB1 open;
Pluggable database altered.

Problem resolved, PDB clone able to complete.

Reference:

ORA-07217: Sltln: Environment Variable Cannot Be Evaluated (Doc ID 1949621.1)

How to rename a Pluggable Database

Oracle

create pluggable database from dblink error: ORA-17628 ORA-01031: insufficient privileges

From source DB created dblink user and granted necessary privileges. However from target DB running create pluggable database from dblink still getting error ORA-01031.

#Source DB
SQL> CREATE USER c##remote_clone_user IDENTIFIED BY remote_clone_user CONTAINER=ALL;
SQL> GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##remote_clone_user CONTAINER=ALL;

#Target DB
SQL> CREATE DATABASE LINK clone_link CONNECT TO c##remote_clone_user IDENTIFIED BY remote_clone_user USING '//SourceHost:1521/SourceDBService';
#Test DB link Okay:
SQL> select 1 from dual@clone_link;
	 1
----------
	 1
SQL>  CREATE PLUGGABLE DATABASE PDB1 from PDB1@clone_link;
ERROR at line 1:
ORA-17628: Oracle error 1031 returned by remote Oracle server
ORA-01031: insufficient privileges

Solution:

Found source side the PDB status was “Open Read Only”, tested it must be “open read write”.

#Source DB
SQL> show pdbs  
    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 PDB1				  READ ONLY  NO
SQL> alter pluggable database PDB1 close immediate;
Pluggable database altered.
SQL> alter pluggable database PDB1 open;
Pluggable database altered.
SQL> show pdbs  
    CON_ID CON_NAME			  OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 PDB1				  READ WRITE NO

#Target DB
CREATE PLUGGABLE DATABASE PDB1 FROM PDB1@clone_link;
Pluggable database created.

PDB clone command works now.