Creation of BIGFILE TABLESPACE
===========Create a bigfile tablespace==========================
CREATE BIGFILE TABLESPACE DATA82 DATAFILE
'+DATA' SIZE 10G AUTOEXTEND ON NEXT 100M MAXSIZE 300G
LOGGING
DEFAULT
NO INMEMORY
ONLINE
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO
FLASHBACK ON;
=======List all the tablespaces under a schema===================
SQL> SELECT DISTINCT tablespace_name
FROM dba_segments
WHERE owner = 'APPSUSER'; 2 3
TABLESPACE_NAME
------------------------------
DATA80
APPSDATA
SYSTEM
DATA81
=======Verify the Default Tablespace==============================
col USERNAME for a30
col DEFAULT_TABLESPACE for a30
SELECT username, default_tablespace
FROM dba_users
WHERE username = 'APPSUSER';
USERNAME DEFAULT_TABLESPACE
------------------------------ ------------------------------
APPSUSER APPSDATA
======Set a Default Tablespace for the Schema=====================
Note : This step is not needed if the tablespace have already default tablespace
ALTER USER APPSADMIN DEFAULT TABLESPACE DATA82;
======Grant Quota on the Tablespace (Required if Quota is Limited)======
ALTER USER APPSADMIN QUOTA UNLIMITED ON DATA82;
======Create Objects in the Assigned Tablespace (Optional)=============
CREATE TABLE Test_table (
id NUMBER,
name VARCHAR2(100)
) TABLESPACE DATA82;
=======List all the tablespaces under a schema==============================
SQL> SELECT DISTINCT tablespace_name
FROM dba_segments
WHERE owner = 'APPSUSER'; 2 3
TABLESPACE_NAME
------------------------------
DATA82
DATA80
APPSDATA
SYSTEM
DATA81
Comments
Post a Comment