Re: 18c Service Names

From: Mladen Gogala <gogala.mladen_at_gmail.com>
Date: Sun, 5 Jul 2020 21:10:05 -0400
Message-ID: <77e593fa-b183-aafc-c8e7-613459a0b8c5_at_gmail.com>



Hi Jack!

Check the listener services and see what is available. You can also rename the PDB using 'alter database rename global_name to 'mydb.company.com'; The pluggable database name is the global name.

SQL> show pdbs

     CON_ID CON_NAME OPEN MODE RESTRICTED

---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  MOUNTED
	 3 ORCLPDB			  MOUNTED

SQL> alter session set container=ORCLPDB;

Session altered.

SQL> show parameter global_name;

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------
global_names			     boolean	 FALSE

SQL> alter database rename global_name to yoda; alter database rename global_name to yoda *
ERROR at line 1:
ORA-65045: pluggable database not in a restricted mode

SQL> alter system enable restricted session;

System altered.

SQL> alter database rename global_name to yoda;

Database altered.

SQL> connect / as sysdba
Connected.
SQL> show pdbs

     CON_ID CON_NAME OPEN MODE RESTRICTED

---------- ------------------------------ ---------- ----------
	 2 PDB$SEED			  READ ONLY  NO
	 3 YODA 			  READ WRITE YES

SQL> Of course, you can use any other name, like Aniken, Vader, Palpatine, Obivan, or Skywalker.

May the force be with you!

On 7/5/20 5:01 PM, Jack Applewhite wrote:
> New environment: 18c EE on X8-2M Bare Metal at ODA 18.8 - Single Instances
>
> I've been testing for migration of 11.2.0.4 DBs on an X5 ODA to the
> new environment above, multi-tenant. We have ThisDB and ThatDB on the X5.
>  -- I created CDB1 on the X8 with ThisDBX and ThatDBX PDBs. Did
> exports from 11g DBs and imported them into 18c DBs. Opened them for
> testing by Users, which is why I wanted the X suffix so they'd know
> where they were.
> -- In the iterative process, I created CDB2 as well and cloned ThisDBX
> and ThatDBX to it as ThxxDBX1,2,3,etc. and ThxxDBX1,2,3,etc., each
> time then unplugging ThxxDBX1,2,3 to separate .pdb files. I used those
> to plug in to CDB1 for startover points. It all worked great.
> -- Now, when I want to do the final cutover from 11g ThisDB and
> ThatDB, I drop the current 18c ThxxDBX PDBs and attempt to create new
> PDBs from the last .pdb files. I want to name them ThisDB and ThatDB,
> and can create them OK. However, when I attempt to open them I get:
>
> Alter Pluggable Database ThisDB Open Read Write ;
> Error report -
> ORA-44303: service name exists
> ORA-44775: Pluggable database service cannot be created.
> 44303. 0000 -  "service name exists"
> *Document: Yes
> *Cause:    This service name was already in existence.
> *Action:   Provide a new unique service name.
>
> I query v$Services and there is no ThisDB service. I've looked through
> the 18c docs and on MOS, but can't find anywhere that there's a
> restriction on Service Names. It looks to me like I can have ThisDBX
> and ThisDBY, but can't have the subset ThisDB. Is that a fact? If so,
> where is it documented? If not, can I fix this?
>
> I've tried it by using the Service_Name_Convert function, but that
> didn't work either and the error message said to try to use the
> "appropriate" Service_Name_Convert string but, of course, no clue as
> to what that might be.
>
> I'm at a loss.
> Thanks.
> --
> Jack C. Applewhite - Database Administrator
> Austin I.S.D. - MIS Department
> 512.414.9250 (wk)
>
> I cannot help but notice that there is no problem between us that
> cannot be solved by your departure.  -- Mark Twain
> Confidentiality Notice: This email message, including all attachments,
> is for the sole use of the intended recipient(s) and may contain
> confidential student and/or employee information. Unauthorized use of
> disclosure is prohibited under the federal Family Educational Rights &
> Privacy Act (20 U.S.C. §1232g, 34 CFR Part 99, 19 TAC 247.2, Gov’t
> Code 552.023, Educ. Code 21.355, 29 CFR 1630.14(b)(c)). If you are not
> the intended recipient, you may not use, disclose, copy or disseminate
> this information. Please call the sender immediately or reply by email
> and destroy all copies of the original message, including attachments.

-- 
Mladen Gogala
Database Consultant
Tel: (347) 321-1217


--
http://www.freelists.org/webpage/oracle-l
Received on Mon Jul 06 2020 - 03:10:05 CEST

Original text of this message