Meta tags:
description= In the initial release of Oracle 12c (12.1.0.1c), a non-Container Database (non-CDB) could be converted to a pluggable database (PDB) using any of the following methods: Using DBMS_PDB Using datapump (expdb, impdp) Using GoldenGate replication The 12.1.0.2 patchset has introduced the ability to clone a remote non-CDB as a PDB directly over the network. Remote Cloning of a Non-CDB is a;
author= Anju Garg;
Headings (most frequently used words):
databases, oracle, in, for, database, 12, 2c, hot, cloning, of, non, container, policy, managed, rac, one, node, duplicate, point, time, recovered, pdb, using, backup, re, registering, cluster, with, srvctl, problems, and, solutions, demonstration, subscribe, more, share, to, social, media, recommended, about, the, author, register, simple, talk,
Text of the page (most frequently used words):
the (62), #database (47), strong (46), span (36), destcdb (35), cdb (32), non (30), pdb (25), oracle (23), orclclone (21), red (20), orcl (19), color (18), style (18), read (17), and (17), from (17), pluggable (16), create (14), databases (12), for (12), source (12), data (12), name (12), simple (11), datafile (11), select (10), container (10), that (9), talk (9), write (9), orcl_link (9), using (8), cloning (8), mode (8), link (8), new (8), hot (7), anju (6), garg (6), articles (6), about (6), your (6), this (6), open (6), will (6), remote (6), normal (6), seed (6), pdb1 (6), status (6), con_id (6), sql (6), oradata (6), app (6), u01 (6), are (5), not (5), need (5), let (5), only (5), asm (5), con_name (5), pdbs (5), sho (5), 389926412e383872e053b9c909c0c716 (5), statement (5), host01 (5), policy (4), hence (4), order (4), release (4), running (4), author (4), get (4), podcasts (4), more (4), can (4), clone (4), files (4), have (4), session (4), pdb_name (4), when (4), destination (4), dbf (4), created (4), host02 (4), system (4), open_mode (4), version (4), host (4), min (3), time (3), rac (3), one (3), node (3), instance (3), books (3), other (3), demonstration (3), now (3), state (3), article (3), google (3), feasible (3), network (3), cloned (3), over (3), must (3), altered (3), alter (3), restricted (3), changes (3), end (3), log (3), verify (3), omf (3), file_name_convert (3), create_file_dest (3), target (3), 12c (3), storage (3), register (3), 2016 (2), managed (2), cluster (2), with (2), 2017 (2), duplicate (2), production (2), point (2), introduced (2), latest (2), contributions (2), subscribe (2), information (2), industry (2), content (2), delivered (2), straight (2), inbox (2), recommended (2), comments (2), survey (2), all (2), into (2), you (2), out (2), error (2), our (2), search (2), copyright (2), gate (2), may (2), large (2), situations (2), involving (2), slow (2), unreliable (2), links (2), put (2), patchset (2), ability (2), process (2), since (2), been (2), count (2), set (2), user (2), cdb_pdbs (2), complete (2), its (2), procedure (2), then (2), begin (2), execute (2), noncdb_to_pdb (2), admin (2), rdbms (2), oracle_home (2), script (2), where (2), guid (2), location (2), specified (2), mounted (2), example (2), following (2), has (2), two (2), connect (2), which (2), both (2), later (2), having (2), file (2), share (2), contact (2), faqs (2), usage (2), contributors (2), series (2), resources (2), sysadmin (2), development (2), devops (2), analytics (2), career (2), security (2), privacy (2), compliance (2), cloud (2), nosql (2), snowflake (2), mongodb (2), mysql (2), postgresql (2), server (2), november, recently, wanted, flex, setup, but, free, servers, available, had, registering, srvctl, problems, solutions, january, times, might, past, without, disturbing, itself, recovered, backup, february, 11g, single, enabled, top, topics, selected, event, load, page, enter, join, thousands, professionals, sharing, their, views, entering, landscape, entries, submitted, 500, gift, card, prize, draw, touch, seen, something, needs, changing, whether, technical, inaccuracy, typo, please, know, reaching, team, spotted, follow, want, see, redgate, add, preferred, show, prominently, results, 2026, software, limited, rights, reserved, document, contains, proprietary, protected, law, introduces, summary, although, quite, depends, transporting, consider, size, speed, internet, connection, decide, migration, approach, case, were, migrated, remained, able, remotely, during, 107, employees, check, sysdba, conn, integration, after, opened, continue, sqlerror, whenever, completed, successfully, raise, 900, sqlcode, others, exception, open_sql, restricted_state, immediate, leave, same, was, started, prior, opening, first, sys, run, modify, some, metadata, convert, opens, performs, closes, o1_mf_example_csjqcowp_, o1_mf_users_csjqcowo_, o1_mf_sysaux_csjqcowo_, o1_mf_system_csjqcowk_, note, substitute, equivalent, above, use, employ, also, specifying, clause, addition, 259, 904565511, users, 266, 904565615, 260, 904565513, undotbs1, 257, 904565371, sysaux, 258, 904565437, specify, find, 65016, ora, line, previously, defined, currently, 1521, identified, used, make, sure, confirm, demonstrate, purpose, virtual, machines, directly, utilizes, transfer, part, command, moreover, cdbs, required, online, pre, requisite, goldengate, replication, datapump, expdb, impdp, dbms_pdb, initial, could, converted, any, methods, https, www, com, social, media, 5th, september, opinion, webinars, events,
Text of the page (random words):
oracle database 12 1 0 2c hot cloning of non container databases simple talk articles databases sql server postgresql mysql oracle mongodb snowflake nosql ai cloud security privacy compliance career data analytics devops development sysadmin resources other podcasts series books contributors about about simple talk author ai usage policy simple talk faqs contact us register log in register for simple talk get the latest opinion podcasts webinars and events delivered straight to your inbox register log in articles databases sql server postgresql mysql oracle mongodb snowflake nosql ai cloud security privacy compliance career data analytics devops development sysadmin resources other podcasts series books contributors about about simple talk author ai usage policy simple talk faqs contact us articles databases oracle oracle database 12 1 0 2c hot cloning of non container databases anju garg 5th september 2016 article recommended about the author comments 0 share share to social media https www red gate com simple talk databases oracle databases oracle 12 1 0 2c hot cloning of non container databases in the initial release of oracle 12c 12 1 0 1c a non container database non cdb could be converted to a pluggable database pdb using any of the following methods using dbms_pdb using datapump expdb impdp using goldengate replication the 12 1 0 2 patchset has introduced the ability to clone a remote non cdb as a pdb directly over the network remote cloning of a non cdb is a simple procedure which utilizes a database link to transfer the data as part of running the create pluggable database command moreover non cdbs can be hot cloned i e it is not required to put the source non cdb in read only mode for cloning so that it can be cloned online it is a pre requisite that both the cdb and the non cdb must be running oracle database 12c release 1 12 1 0 2 or later in this article i will demonstrate hot cloning of a remote non container asm database non cdb to create a new pluggable database pdb with file system storage in oracle database 12 1 0 2c for the purpose of this demonstration i have two virtual machines host01 and host02 we will clone the non cdb orcl on host host01 to pdb orclclone in the cdb destcdb on remote host host02 source host host01 non cdb orcl having asm storage destination host host02 container database destcdb pluggable database orclclone having file system storage demonstration let s confirm that our source database orcl is a non cdb 1 2 3 4 5 orcl select name open_mode cdb from v database strong name open_mode cdb strong strong span style color red orcl span read write span style color red no span strong we need to make sure that both the source non cdb orcl and the destination cdb destcdb are running oracle database 12c release 1 12 1 0 2 or later 1 2 3 4 5 6 7 8 strong orcl select version from v instance strong strong version strong strong span style color red 12 1 0 2 0 span strong strong destcdb select version from v instance strong strong version strong strong span style color red 12 1 0 2 0 span strong on the target container database destcdb we need to create a database link to connect to source non cdb orcl which will be used in the create pluggable database statement 1 2 3 strong destcdb create database link orcl_link strong strong connect to system identified by oracle using host01 1521 orcl strong strong database link created strong verify that target container database destcdb currently has two pdb s pdb seed and pdb1 1 2 3 4 5 6 strong destcdb sho pdbs strong strong con_id con_name open mode restricted strong strong 2 span style color red pdb seed span read only no strong strong 3 span style color red pdb1 span read write no strong 1 2 3 4 strong destcdb select name open_mode cdb from v database orcl_link strong strong name open_mode cdb strong strong orcl span style color red read write span no strong let s execute the create pluggable database statement using the previously defined database link orcl_link to create target pdb orclclone in cdb destcdb 1 2 3 4 5 strong destcdb create pluggable database orclclone from orcl orcl_link strong strong create pluggable database orclclone from orcl orcl_link strong strong strong strong span style color red error at line 1 span strong strong span style color red ora 65016 file_name_convert must be specified span strong in order to specify file_name_convert let s find out the location of database files for source non cdb orcl on host01 1 2 3 4 5 6 7 8 destcdb select name from v datafile orcl_link name data orcl datafile system 258 904565437 data orcl datafile sysaux 257 904565371 data orcl datafile undotbs1 260 904565513 data orcl datafile example 266 904565615 data orcl datafile users 259 904565511 since source database files are on asm and hence use omf we will have to employ omf for the destination pdb also by specifying create_file_dest clause in create pluggable database statement in addition to the database link orcl_link 1 2 3 destcdb create pluggable database orclclone from orcl orcl_link create_file_dest u01 app oracle oradata pluggable database created note that when the source database is a non cdb we can substitute non cdb for the name of the non cdb for example the following statement is equivalent to the above statement 1 2 destcdb create pluggable database orclclone from non cdb orcl_link create_file_dest u01 app oracle oradata verify that the new pluggable database orclclone is created in mounted state and its status is new destcdb sho pdbs 1 2 3 4 5 6 7 8 9 10 11 12 destcdb sho pdbs con_id con_name open mode restricted 2 pdb seed read only no 3 pdb1 read write no 4 span style color red orclclone mounted span destcdb select pdb_name status from cdb_pdbs pdb_name status pdb1 normal pdb seed normal span style color red orclclone new span verify that omf data files of orclclone have been created on host02 in the location specified using file_name_convert 1 2 3 4 5 6 7 8 9 10 11 12 13 14 destcdb select con_id name guid from v pdbs where name orclclone con_id name guid 4 span style color red orclclone 389926412e383872e053b9c909c0c716 span destcdb select name from v datafile where con_id 4 name u01 app oracle oradata destcdb span style color red 389926412e383872e053b9c909c0c716 datafile o1_mf_system_csjqcowk_ dbf span u01 app oracle oradata destcdb span style color red 389926412e383872e053b9c909c0c716 datafile o1_mf_sysaux_csjqcowo_ dbf span u01 app oracle oradata destcdb span style color red 389926412e383872e053b9c909c0c716 datafile o1_mf_users_csjqcowo_ dbf span u01 app oracle oradata destcdb span style color red 389926412e383872e053b9c909c0c716 datafile o1_mf_example_csjqcowp_ dbf span prior to opening the pdb for the first time we need to log in to the destination pdb orclclone as sys user and run the script oracle_home rdbms admin noncdb_to_pdb sql in order to modify some metadata and convert the non cdb to pdb the script opens the pdb performs changes and closes the pdb when the changes are complete 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 destcdb alter session set container orclclone session altered destcdb sho con_name con_name orclclone sql oracle_home rdbms admin noncdb_to_pdb sql destcdb leave the pdb in the same state it was when we started destcdb begin 2 execute immediate open_sql restricted_state 3 exception 4 when others then 5 begin 6 if sqlcode 900 then 7 raise 8 end if 9 end 10 end 11 pl sql procedure successfully completed destcdb destcdb destcdb whenever sqlerror continue we will now open the new pdb orclclone in read write mode to complete the integration of the new pdb into the cdb after the pdb is opened in read write mode its status changes from new to normal 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 destcdb conn as sysdba alter pluggable database orclclone open pluggable database altered destcdb sho pdbs con_id con_name open mode restricted 2 pdb seed read only no 3 pdb1 read write no 4 span style color red orclclone read write span no destcdb select pdb_name status from cdb_pdbs pdb_name status pdb1 normal pdb seed normal span style color red orclclone normal span let s check the user data in the new pdb 1 2 3 4 5 6 destcdb alter session set container orclclone session altered destcdb select count from hr employees count 107 hence we have been able to hot clone a non cdb remotely and during this process the source non cdb remained in read write mode data files were migrated from asm to non asm although the process is quite simple it may not be feasible for large databases or situations involving slow or unreliable network links since it depends on transporting the data over a database link hence you must consider the size of your source database and the speed of your internet connection in order to decide if it is a feasible migration approach in your case summary the 12 1 0 2 patchset introduces the ability to create a pdb as a clone of a remote non cdb over a database link non cdb s can be hot cloned i e the source non cdb need not be put in read only mode for cloning remote cloning of non cdb may not be feasible for large databases or situations involving slow or unreliable network links this document contains proprietary information and is protected by copyright law copyright 2026 red gate software limited all rights reserved get more simple talk in google search want to see more articles from simple talk and redgate add us as a preferred source and google will show our content more prominently in your search results follow on google spotted an error if you ve seen something in this article that needs changing whether it s a technical inaccuracy or a typo please let us know by reaching out to the team get in touch industry survey now open join thousands of database professionals sharing their views by entering the state of the database landscape survey all entries are submitted into a 500 gift card prize draw enter now on this page demonstration load comments recommended subscribe for more get selected articles event information podcasts and other industry content delivered straight to your inbox subscribe about the author anju garg s contributions articles 21 books 0 top topics oracle anju garg s latest contributions anju garg policy managed oracle rac one node databases oracle rac one node introduced in oracle database 11g release 2 11 2 0 2 is a single instance of an oracle rac enabled database running on one node 09 february 2017 13 min read anju garg duplicate point in time recovered pdb using backup at times we might need to duplicate a production pluggable database to a past point in time without disturbing the production database itself in order to 25 january 2017 9 min read anju garg re registering databases in a cluster with srvctl problems and solutions recently i wanted to create a policy managed database in my 12 1 0 2 flex cluster setup but free servers are not available hence i had to 30 november 2016 8 min read
|