In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Oracle deletes user commands and some commands
Drop user user_name cascade
Drop user user_name cascade
Create a tablespace
CREATE TABLESPACE data01
DATAFILE'/ oracle/oradata/db/DATA01.dbf' SIZE 500m
UNIFORM SIZE 128k; # specifies that the zone size is 128k. If not specified, the zone size defaults to 64k.
Delete tablespace
DROP TABLESPACE data01 INCLUDING CONTENTS AND DATAFILES
First, establish a tablespace
CREATE TABLESPACE data01
DATAFILE'/ oracle/oradata/db/DATA01.dbf' SIZE 500m
UNIFORM SIZE 128k; # specifies that the zone size is 128k. If not specified, the zone size defaults to 64k.
2. Establish UNDO tablespace
CREATE UNDO TABLESPACE UNDOTBS02
DATAFILE'/ oracle/oradata/db/UNDOTBS02.dbf' SIZE 50m
# Note: only one UNDO tablespace can be used at some times in OPEN. If you want to use the newly created tablespace, you must switch to it:
ALTER SYSTEM SET undo_tablespace=UNDOTBS02
Third, establish a temporary table space
CREATE TEMPORARY TABLESPACE temp_data
TEMPFILE'/ oracle/oradata/db/TEMP_DATA.dbf' SIZE 50m
Change the state of the tablespace
1. Take the tablespace offline
ALTER TABLESPACE game OFFLINE
If you accidentally delete the data file, you must have the RECOVER option
ALTER TABLESPACE game OFFLINE FOR RECOVER
two。 Bring tablespaces online
ALTER TABLESPACE game ONLINE
3. Take the data file offline
ALTER DATABASE DATAFILE 3 OFFLINE
4. Bring data files online
ALTER DATABASE DATAFILE 3 ONLINE
5. Make the tablespace read-only
ALTER TABLESPACE game READ ONLY
6. Make the tablespace readable and writable
ALTER TABLESPACE game READ WRITE
Delete tablespaces
DROP TABLESPACE data01 INCLUDING CONTENTS AND DATAFILES
VI. Expand the tablespace
First check the name and file of the tablespace
Select tablespace_name, file_id, file_name
Round (bytes/ (1024,1024), 0) total_space
From dba_data_files
Order by tablespace_name
1. Add data files
ALTER TABLESPACE game
ADD DATAFILE'/ oracle/oradata/db/GAME02.dbf' SIZE 1000m
two。 Manually increase the data file size
ALTER DATABASE DATAFILE'/ oracle/oradata/db/GAME.dbf'
RESIZE 4000M
3. Set data file automatic extension
ALTER DATABASE DATAFILE'/ oracle/oradata/db/GAME.dbf
AUTOEXTEND ON NEXT 100M
MAXSIZE 10000M
View tablespace information after setting
SELECT A.TABLESPACE_NAME,A.BYTES TOTAL,B.BYTES USED, C.BYTES FREE
(B.BYTES*100) / A.BYTES "% USED", (C.BYTES*100) / A.BYTES "% FREE"
FROM SYS.SM$TS_AVAIL A, S, B, S, Y, C, C, etc.
WHERE A.TABLESPACE_NAME=B.TABLESPACE_NAME AND A.TABLESPACE_NAME=C.TABLESPACE_NAME
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.