In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
1. Create a tablespace
Sqlplus / as sysdba / / enter the library as dba
Startup / / Open the database
Create tablespace db_work / / create a tablespace named db_work
Datafile'/ orc/app/oracle/oradata/WORKDB01.DBF' / / specify the location where the data files are stored
Size 50m / / specify data file size
Autoextend on / / enable automatic expansion of space size
Next 50m maxsize 20480m / / specifies a maximum space of 20g
Extent management local; / / localized management tablespace
Cd / orc/app/oracle/oradata/ to specify a directory for verification
Ll-h
Select tablespace_name from dba_tablespaces; / / View tablespace
2. Adjust the size of the table space
Method 1: modify the size directly
Alter database datafile / / modify data file
'/ orc/app/oracle/oradata/WORKDB01.DBF'
Resize 80m; / / resize
Method 2: add a new DBF file
Alter tablespace db_work
Add datafile
'/ orc/app/oracle/oradata/WORKDB02.DBF'
Size 50m
Autoextend on
Next 50m maxsize 20480m
3. Change the permissions of the tablespace
Alter tablespace db_work read only; / / change the tablespace to read-only
Alter tablespace db_work read write; / / change the tablespace to read and write, by default
Drop tablespace db_work including contents; / / deletes the specified tablespace, and the including contents parameter deletes all the contents of the tablespace
4. CDB and PDB operation
CDB (Container Database): database container
PDB (Pluggable Database): pluggable database
Relationship between CDB and PDB:
COMMON USERS (ordinary user): it is often built on the CDB layer, and the user name starts with clocked # or clocked #
LOCAL USERS (local user): it is only built on the PDB layer, and the CONTAINER must be specified when it is created.
View database schema
Show con_name / / query the current container
Show pdbs / / query all containers of the database
Show pdbs / / query all containers of the database
Alter pluggable database orclpdb open; / / modify the pluggable library orclpdb to be on
Alter session set container=orclpdb; / / CDB switches the session to PDB, and the oracle container connects to the plug library
Show con_name / / database mode has been switched to container database
Alter session set container=cdb$root; / / switch database mode to CDB$ROOT
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.