How to create table space and user for oracle database
I just answered this question two days ago, so I’ll answer it again:
Before creating a user, you need to create a table space first to prevent the new user from overflowing the default table space due to excessive data volume and to facilitate management.
The creation statement of the table space is similar to the general creation statement and is used to specify the location where the data is saved. Usually, the location of the table space is located under %ORACLE_HOME%/oradata/orcl. The specific creation statement is:
1.Temporary table space
create temporary tablespace tablespace name --Create temporary tablespace
tempfile 'path\filename.dbf' --the path of the temporary table space and the name of the temporary table space
size 50m autoextend on next 50m --The table space space size is 50M, automatically increased, the step size is 50M, and can be followed by the maximum value, such as maxsize 20480m
extent management local; --Table space management method
2. Create a table space, where data is stored
create tablespace tablespace name
datafile 'path\filename.dbf'
size 50m autoextend on next 50m maxsize 20480m
extent management local;
3. Create a user and specify a default table space
create user username identified by password
default tablespace data tablespace name (the name of the tablespace created in the second step)
temporary tablespace Temporary tablespace name (the name of the tablespace created in the first step)
4.Empowerment
Generally, if there is no special requirement, you only need to grant two permissions
grant connect,resource to username;
If you want to give dba permissions
grant DBA to username
Revoke dba permissions:
revoke dba from username;
How to create a new table space in oracle
Create a new Command Window, enter the command at the prompt, and press Enter to execute it
create tablespace dbspace datafile 'D:\oracle\product\10.2.0\oradata\orcl\dbspace.dbf' size 400M autoextend on next 10m maxsize unlimited; --Create tablespace
DROP TABLESPACE dbspace INCLUDING CONTENTS AND DATAFILES;--delete tablespace
in
1) DATAFILE: Table space data file storage path
2) SIZE: Initially set to 200M
3) UNIFORM: The specified area size is 128k. If not specified, the area size defaults to 64k
4) The space name histdb and the data file name histdb.dbf should not be the same, you can name them arbitrarily.
5) AUTOEXTEND ON/OFF means starting/stopping automatic expansion of table space
6) alter database datafile ' D:\oracle\product\10.2.0\oradata\orcl\histdb.dbf ' resize 500m; //Manually modify the data file size to
The following commands are used to create a user for the table space and set the user's default table space to the newly created table space
create user test1 identified by test1 default tablespace dbspace;
alter database default tablespace dbspace;
create user test identified by test;
select username, default_tablespace defspace from dba_users where;
Please tell me how to use PLSQL to build oracle tables, table space settings, management, import and export data
Create the table space first and then the table:
Step one: Create table space
CREATE TABLESPACE S2SHDWZ_DATA DATAFILE 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\S2SHDWZDATA01.dbf' SIZE 256M AUTOEXTEND ON NEXT 32M MAXSIZE UNLIMITED LOGGING EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO
Explanation: S2SHDWZ-> is the space name, 636f7079e79fa5e9819331333264663665. You need to know which disk your Oracle is installed on.
Step 2: Create temporary table space
CREATE TEMPORARY TABLESPACE S2SHDWZ_TEMP TEMPFILE 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\S2SHDWZTEMP01.dbf' SIZE 100M AUTOEXTEND ON NEXT 32M MAXSIZE 2048M EXTENT MANAGEMENT LOCAL UNIFORM SIZE 1M
Step 3: Create a connection
CREATE USER S2SHDWZ PROFILE DEFAULT IDENTIFIED BY "s2shdwz123" DEFAULT TABLESPACE INVEST_DATA TEMPORARY TABLESPACE INVEST_TEMP ACCOUNT UNLOCK
GRANT CONNECT TO S2SHDWZ
Step 4: Authorization and submission
GRANT DBA TO S2SHDWZ
COMMIT
Then you create a database in sql developer and create tables in the library. You can create tables and export data manually, or you can write commands to do it. After using the above steps, I was able to succeed!
Hope it’s helpful to you, haha!
The above is the detailed content of How to create tablespaces and users in Oracle database. For more information, please follow other related articles on the PHP Chinese website!

What is HP Battery Check? How to download HP Battery Check? How to check battery health on HP laptop in Windows 11/10? To find answers to these questions, go on reading and you can find much information given by php.cn.

Are you looking for a Microsoft Excel 2019 download source? You may want to download Excel 2019 for free on Windows/Mac/Android/iOS. php.cn Software writes this post to introduce some Microsoft Excel 2019 download sources for different platforms.

It is annoying to run into game not using GPU when playing a video game. How to fix it? If you find a game using 0 GPU, you can read through this post on php.cn Website to get help.

Do you know what “192.168.10.1” is? How to log in to your 192.168.0.1 IP address? php.cn will show you some basic information about this IP and some details on 192.168.10.1 admin login, change password & issue troubleshooting.

The Failed to Synchronize Achievements error just not only happens on the Uplay client but also on Far Cry. When you launch the game, a message appears saying “Failed to Synchronize Achievements” which allows you to skip. If you want to get rid of th

Many processes are running in the background when you use your computer. You may want to know the process start time. You can check a process start time using Windows PowerShell or Process Explorer. php.cn Software will introduce these two methods he

To create and edit spreadsheets, most of you may use Microsoft Excel. Microsoft Excel is not free. Its stand-alone app costs $159.99. You can also buy a Microsoft 365 plan to get Excel and other Office apps. This post mainly explains the Microsoft Ex

Do you use the printer in your work and life? Then, you must know before using it, you must download and install the corresponding driver. In this post on php.cn Website, we will mainly introduce to you how to install, update and download Kyocera pri


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Linux new version
SublimeText3 Linux latest version
