In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to migrate the PDB named jypdb in the remote CDB". In the daily operation, I believe that many people have doubts about how to migrate the PDB named jypdb in the remote CDB. Xiaobian consulted all kinds of materials and sorted out a simple and easy-to-use method of operation. I hope it will be helpful to answer the question of "how to migrate the PDB named jypdb in the remote CDB". Next, please follow the editor to study!
Assume that the following conditions are met:
. The current user has create pluggable database system permissions in the root container of the CDB where the PDB is migrated
. The dblink name of the current CDB of the target CDB connection PDB is jycdb_link. The creation statement of dblink is as follows:
Create public database link jycdb_link connect to c##yylidentified by "yyl" using 'jy'
The public user c##yyl in the current CDB of PDB has sysoper administration rights and create pluggable database system permissions
. Do not specify the path_ prefix clause
. The file_name_convert and create_file_ end clauses are not specified. When OMF is enabled or the pdb_file_name_convert parameter is set, the OMF-based configuration or parameter settings file is moved to the new directory.
. No storage limit is specified for PDB. Therefore, the storage clause is not specified
. If there is no temp file with the same name in the target directory, a new temp file will be created. Therefore, the tempfile reuse clause is not specified.
. The connection is automatically migrated from the source PDB to the migrated PDB. So specify the availability max clause.
Execute the following statement to migrate PDB (jypdb) from the remote CDB to the current CDB:
1. Create a public user c##yyl in a remote CDB
SQL > create user c##yyl identified by "yyl" container=all;User created.SQL > grant sysoper,connect,resource,create pluggable database to c##yyl container=all;Grant succeeded.
two。 Check whether the remote CDB uses local undo and archiving
SQL > COLUMN property_name FORMAT A30SQL > COLUMN property_value FORMAT A30SQL > SQL > SELECT property_name, property_value 2 FROM database_properties 3 WHERE property_name = 'LOCAL_UNDO_ENABLED' PROPERTY_NAME PROPERTY_VALUE-- LOCAL_UNDO_ENABLED TRUESQL > SELECT log_mode FROM vested database
Because the remote CDB uses local undo and archiving, it is not necessary to set the remote database to read-only mode
3. Create a dblink in the local CDB (jy) that specifies the far and CBD (jy). The connection string should contain (SERVER=DEDICATED) a directory, otherwise you will receive a "ORA-01031: insufficient privileges" error
SQL > create public database link jycdb 2 connect to c##yyl identified by "yyl" 3 using'(DESCRIPTION = 4 (ADDRESS_LIST = 5 (ADDRESS = (PROTOCOL = TCP) (HOST = 10.138.130.173) (PORT = 1521)) 6) 7 (CONNECT_DATA = 8 (SERVER = DEDICATED) 9 (SERVICE_NAME = jy) 10) 11'; Database link created.SQL > select * from dual@jycdb;D-X
4. Check whether the local CDB uses local undo and archiving
SQL > COLUMN property_name FORMAT A30SQL > COLUMN property_value FORMAT A30SQL > SQL > SELECT property_name, property_value 2 FROM database_properties 3 WHERE property_name = 'LOCAL_UNDO_ENABLED' PROPERTY_NAME PROPERTY_VALUE-- LOCAL_UNDO_ENABLED TRUESQL > SELECT log_mode FROM vested database
5. Execute the following statement on the local CDB to clone the refreshable PDB
SQL > create pluggable database jypdb from jypdb@jycdb relocate availability max;Pluggable database created.SQL > select name,open_mode from v$pdbs NAME OPEN_MODE -PDB$SEED READ ONLYJYPDB READ WRITE
Open PDB in read write mode to complete the migration operation
SQL > alter pluggable database jypdb open;Pluggable database altered.SQL > alter session set container=jypdb;Session altered.SQL > set long 200SQL > set linesize 200SQL > select name,open_mode from v$pdbs NAME OPEN_MODE -JYPDB READ WRITE
Delete a public dblink
SQL > drop public database link jycdb;Database link dropped.
Check the remote PDB to see that it has been deleted
At this point, the study on "how to migrate the PDB named jypdb in the remote CDB" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.