zoukankan      html  css  js  c++  java
  • 表空间的自动扩展是文件单位的

    首先看状况:

    SQL> select file_id,file_name,tablespace_name,autoextensible from dba_data_files;

    FILE_ID FILE_NAME                                          TABLESPACE AUTOEXTENS
    ------- -------------------------------------------------- ---------- ----------
          4 /u01/app/oracle/oradata/orcl/users01.dbf           USERS      YES
          3 /u01/app/oracle/oradata/orcl/undotbs01.dbf         UNDOTBS1   YES
          2 /u01/app/oracle/oradata/orcl/sysaux01.dbf          SYSAUX     YES
          1 /u01/app/oracle/oradata/orcl/system01.dbf          SYSTEM     YES
          5 /u01/app/oracle/oradata/orcl/example01.dbf         EXAMPLE    YES
          6 /u01/app/datafiles/gaodata1.dbf                    GAOTBS     YES

    6 rows selected.

    SQL>

    然后,再来扩展表空间 GAOTBS:

    SQL> alter tablespace gaotbs add datafile '/u01/app/datafiles/gaodata2.dbf' size 500M;

    Tablespace altered.

    然后,再看:

    SQL> select file_id,file_name,tablespace_name,autoextensible from dba_data_files;

    FILE_ID FILE_NAME                                          TABLESPACE AUTOEXTENS
    ------- -------------------------------------------------- ---------- ----------
          4 /u01/app/oracle/oradata/orcl/users01.dbf           USERS      YES
          3 /u01/app/oracle/oradata/orcl/undotbs01.dbf         UNDOTBS1   YES
          2 /u01/app/oracle/oradata/orcl/sysaux01.dbf          SYSAUX     YES
          1 /u01/app/oracle/oradata/orcl/system01.dbf          SYSTEM     YES
          5 /u01/app/oracle/oradata/orcl/example01.dbf         EXAMPLE    YES
          6 /u01/app/datafiles/gaodata1.dbf                    GAOTBS     YES
          7 /u01/app/datafiles/gaodata2.dbf                    GAOTBS     NO

    7 rows selected.

    SQL> select * from v$tablespace;     

     TS# NAME                                               INC BIG FLA ENC
    ---- -------------------------------------------------- --- --- --- ---
       0 SYSTEM                                             YES NO  YES
       1 SYSAUX                                             YES NO  YES
       2 UNDOTBS1                                           YES NO  YES
       4 USERS                                              YES NO  YES
       3 TEMP                                               NO  NO  YES
       6 EXAMPLE                                            YES NO  YES
       7 GAOTBS                                             YES NO  YES

    7 rows selected.

    SQL> desc v$tablespace;
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     TS#                                                NUMBER
     NAME                                               VARCHAR2(30)
     INCLUDED_IN_DATABASE_BACKUP                        VARCHAR2(3)
     BIGFILE                                            VARCHAR2(3)
     FLASHBACK_ON                                       VARCHAR2(3)
     ENCRYPT_IN_BACKUP                                  VARCHAR2(3)

    SQL>

  • 相关阅读:
    第一遍机房收费系统总结
    HDU 4027 Can you answer these queries?(线段树)
    程序猿的路----程序猿一定要细致看
    让你提前认识软件开发(25):数据库简单介绍
    could not initialize proxy
    ios--uitextfield动态限制输入的字数(解决方式)
    Python 学习之二:Python超短教程
    【v2.x OGE教程 19】 引擎状态控制
    [MongoDB]count,gourp,distinct
    [MongoDB]增删改查
  • 原文地址:https://www.cnblogs.com/gaojian/p/3612900.html
Copyright © 2011-2022 走看看