I
I
ince2019-03-19 15:21:00
Oracle
ince, 2019-03-19 15:21:00

How to create a schema?

Oracle database. It is written on the Internet that in order to create a scheme, you need to make a tablespace and create a user in it.
First I created the main tailbspace:

CREATE BIGFILE TABLESPACE t
  DATAFILE 't.dat' 
    SIZE 1024M
    REUSE
    AUTOEXTEND ON NEXT 1024M MAXSIZE 4096M;

After I make a tempo tablespace (although I would like everything in one tablespace):
CREATE BIGFILE TABLESPACE t_temp
DATAFILE 't_temp.dbf' SIZE 1024M
EXTENT MANAGEMENT LOCAL AUTOALLOCATE;

Then I create a user
CREATE USER t
  IDENTIFIED BY pass
  DEFAULT   TABLESPACE t      QUOTA 1024M  ON t
  TEMPORARY TABLESPACE t_temp QUOTA 1024M  ON t_temp;

and I get an error:
Error report:
SQL Error: ORA-10615: Invalid tablespace type for temporary tablespace
10615. 00000 -  "Invalid tablespace type for temporary tablespace"
*Cause:    Tablespace with AUTO SEGMENT SPACE MANAGENEMT specified cannot be
           used as a temporary tablespace
*Action:   Recheck the tablespace name and re-issue the statement

How to disable AUTO SEGMENT SPACE MANAGENEMT?
Is it possible to do everything in one tablespace?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
idShura, 2021-01-05
@idShura

in order to create a schema, you need to make a tablespace and create a user in it

When creating a schema, you need to specify in which tablespace it will be located, i.e. There can be multiple schemas in one tablespace.
After I make a tempo tablespace (although I would like everything in one tablespace):

The creation of a temporary tablespace is done using the TEMPORARY keyword , in your case it is a regular tablespace, which is why the ORA-10615 error occurs.
Here is an example of creating a temporary tablespace:
CREATE TEMPORARY TABLESPACE temp_demo TEMPFILE 'temp01.dbf' SIZE 500M AUTOEXTEND ON;

Most likely, you have already created a temporary tablespace, this can be found using the following query: It is also not clear why you are creating bigfile tablespace ? In most cases, a regular tablespace will suffice.
select * from dba_temp_files;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question