In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
See, How to copy PDB online via dblink at 12.2.0.1(Doc ID 24726-43.1)
For a small amount of data library, this function is simple, easy to operate, you can try.
Source DB: cdb - orcl, pdb - PDB.
Target DB: cdb - R12201
We will copy orcl online to R12201 without turning off PDB and setting PDB to read-only mode
1. Check if source DB uses local undo (local undo should be enabled):
SQL> SELECT property_name, property_value FROM database_properties WHERE
SQL> property_name = 'LOCAL_UNDO_ENABLED';
PROPERTY_NAME PROPERTY_VALUE
------------------------------ ------------------------------
LOCAL_UNDO_ENABLED TRUE
2. Check if archive mode is enabled for source DB (archive mode must be enabled):
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination /arch2
Oldest online log sequence 2
Next log sequence to archive 3
Current log sequence 3
3. Create DB users who perform copy operations at source DB:
CREATE USER c##adminpdb IDENTIFIED BY adminpdb CONTAINER=ALL;
GRANT CREATE SESSION, CREATE PLUGGABLE DATABASE TO c##adminpdb CONTAINER=ALL;
4. Create a tns alias on the destination DB to point to the source DB:
orcl=
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = )(PORT = 1521)) CREATE DATABASE LINK to_source CONNECT TO c##adminpdb IDENTIFIED BY
SQL> adminpdb USING 'orcl';
Database link created.
SQL> select * from dual@to_source;
D
-
X
6. Copy pdb online to pdbnew by doing the following in the target DB (note: FILE_NAME_CONVERT should change accordingly):
SQL> CREATE PLUGGABLE DATABASE pdbnew FROM pdb@to_source FILE_NAME_CONVERT = ('+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/DATAFILE/system.296.974205945', '/u01/data/R12201/pdbnew/system.dbf','+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/DATAFILE/sysaux.297.974205947','/u01/data/R12201/pdbnew/sysaux.dbf','+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/DATAFILE/undotbs1.293.974205945','/u01/data/R12201/pdbnew/undotbs1.dbf','+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/DATAFILE/undo_2.306.974206187','/u01/data/R12201/pdbnew/undo_2.dbf','+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/DATAFILE/users.304.974206191','/u01/data/R12201/pdbnew/users.dbf','+DATA/ORCL/6A7DB47A934B3D53E0534838A8C0FE32/TEMPFILE/temp.307.974205955','/u01/data/R12201/pdbnew/temp.dbf');
Pluggable database created.
7. Start pdb in target DB:
SQL> alter pluggable database pdb open;
8. Check PDB_PLUG_IN_VIOLATONS on target DB for errors
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.