In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Premise: install the database software and create the database of CDB mode.
This article introduces the content: first, how to create pdb, and create tablespaces, users
Second, and clone the pdb across servers online through database link.
one。 How to create pdb and tablespaces, user 1. Log in to the database (CDB) sqlplus / as sysdba2. Query the data file path select name from vault datafileter3. Create pdbCREATE PLUGGABLE DATABASE YXC ADMIN USER YXC_ADMIN IDENTIFIED BY YXC_ADMIN123STORAGE (MAXSIZE 32G) DEFAULT TABLESPACE YXC_DATADATAFILE'/ u01 DEFAULT TABLESPACE YXC_DATADATAFILE'/ u01 apprenticeships, oracleandoradatas, YXC plains, YXC plains, oracleDATA01.dbf' SIZE 1024M AUTOEXTEND ONPATH_PREFIX ='/ u01/app/oracle/oradata/yun/YXC/'FILE_NAME_CONVERT = ('/ u01plains, oracles, oradatas, etc.); 4. Create the tablespace create tablespace YXC_IDX datafile'/ u01 size 1024mautoextend on next maxsize unlimited; add:
(1) change the tablespace file name:
Alter tablespace YXC_DATA rename datafile'/ u01 apprenticeship oracleDATA01.dbf' to'/ u01apprenticedoradata'/ u01apprenticedoracleDATA02.dbf'
The target file needs to be created at the operating system level in advance.
(2) Delete tablespace
Alter database default tablespace YXC_DATA
If it is a default tablespace, you need to change the default tablespace to another tablespace in advance:
Alter database default tablespace USERS;5. Create the user create user yxc identified by yxc123 default tablespace YXC_DATA;6. Empowered grant connect, resource to yxc;grant imp_full_database,unlimited tablespace to yxc; II. Clone this pdb online across servers through database link. 1. Source environment side (1). Create clone user SQL > create user c##clone identified by clone123 container=all;SQL > grant dba to c##clone container=all;2 destination (1) create DBLINKcreate database link dblink_clone connect to c##clone identified by andy using'(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = source-side IP) (PORT = 1521)) (CONNECT_DATA= (SERVER = DEDICATED) (SERVICE_NAME = source-side CDB service name)' (2) modify file mapping SQL > alter session set pdb_file_name_convert='yxc','yxc_clone'; (3) Clone SQL > create pluggable database yxc_clone from yxc@dblink_clone; (4) Open database SQL > alter pluggable database yxc_clone open
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.