Tablespace

What is a Tablespace? 

Tablespaces is a logical storage unit. It is  used to group related logical structures together. 

What are the Predefined Tablespaces in a database?

When you create a new database, Oracle server will create 4             required tablespaces for the new database:

SYSTEM Tablespace

  • Every Oracle database contains a tablespace named SYSTEM              
  • Created automatically during the database creation              
  • It is always online when the database is open

SYSAUX Tablespace

  • Gets installed as an auxiliary tablespace to the SYSTEM               tablespace during the database creation              
  • Database components that otherwise create and use separate               tablespaces then occupy this tablespace.

UNDO Tablespace

  • UNDO tablespaces are used for the storage of undo information.              
  • No other segment types can be created in undo tablespaces.              
  • Each database contains zero or more undo tablespaces.              
  • Only a single undo tablespace is assigned to an Oracle               instance in automatic undo management mode.

TEMP Tablespace

  • At least one default temporary tablespace needs to be defined               when creating a database when the SYSTEM tablespace is locally               managed.              
  • A locally managed SYSTEM tablespace cannot be used for default               temporary storage.

 

What is SYSTEM tablespace?

SYSTEM tablespace is automatically created             when the database is created. It contains data dictionary for the             entire database.  

Explain how to assign a Tablespace to a user in Oracle. 

The following statement assigns already created tablespace             ‘TABLESPACE_01’ as the tablespace group for user sh:

ALTER USER sh
TEMPORARY TABLESPACE             TABLESPACE_01;

 

Explain how to prevent tablespace   fragmentation in  oracle.

Tablespace fragmentation can be prevented by             using PCTINCREASE command. PCTINCREASE is the percentage a new             subsequent extent will grow. This value should be ideally set to 0             or 100 to avoid tablespace fragmentation. Alternate and strange             values for PCTINCREASE results in strange sizes of extents. Same             size of each extent of all segments must be used.

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值