zoukankan      html  css  js  c++  java
  • Oracle表空间基本操作

    普通表空间:

    1》  创建表空间:

      Create tablespace tablespace_name

      Datafile ‘E:oracle ablespace_datafile.dbf’ size 20M

      Autoextend on

      Next 5M

      Maxsize 50M;

    2》  添加数据文件:

      Alter tablespace tablespace_name

      Add datafile ‘E:oracle ablespace_new_add_datafile.dbf’

      Size 20M

      Autoextnend off;

    3》  更改数据文件大小:

      Alter database datafile ‘E:oracle ablespace_datafile.dbf’

      Resize 50M

    4》  更改表数据文件自增:

      Alter database datafile ‘E:oracle ablespace_new_add_datafile.dbf’

      Autoextend on

    5》  查询所有表空间名字等 :user_tablespaces;

    6》  查询默认表空间,临时表空间:user_users

    7》  查询表空间空闲情况:dba_free_space

    8》  查询数据文件:dba_data_files

    9》  查询表空间状态:dba_tablespaces

    10》 移动数据文件:

      ①   :alter tablespace tablespace_name offline

      ②   :物理硬盘上移动数据文件

      ③   :alter tablespace tablespace_name

        rename datafile ‘E:oracleold ablespace_datafile.dbf’

        to ‘E:oracle ew ablespace_datafile.dbf’

    11》   删除表空间:

      Drop tablespace tablespace_name

      Including contents and datafiles;(删除内容和文件)

    临时表空间:  

    1》  创建临时表空间:

      Create temporary tablespace tablespace_name

      Tempfile ‘E:oracle emptablespace_datafile.dbf’

      Size 5M

      Autoextend on

      Next 3M

      Maxsize 10M

    2》  添加数据文件:

      Alter tablespace tablespace_name

      Add tempfile ‘E:oracle emptablespace_new_add_datafile.dbf’

      Size 5M;

    3》  更改数据文件大小:

    4》  更改临时文件状态:

      Alter database tempfile ‘E:oracle emptablespace_datafile.dbf’ offline

    5》  创建临时表空间组:

      Create temporary tablespace temptablespace_name

      Tempfile ‘E:oracle emptablespace_datafile.dbf’

      Size 5M

      Tablespace group tablespace_group_name

    6》  把临时表空间添加到表空间组:

      Alter tablespace temptablespace_name tablespace group tablespace_group_name

    7》  删除表空间组 == 删除表空间组中的所有表空间

      Drop tablespace temptablespace_name including contents and datafiles  

  • 相关阅读:
    webpack 5 之持久化缓存
    前端资源加载失败优化
    如何用 JS 实现二叉堆
    简单解析一下扫码登陆原理,简单到你想不到!
    实战:Express 模拟 CSRF 攻击
    Yarn 的 Plug'n'Play 特性
    为什么现在我更推荐 pnpm 而不是 npm/yarn?
    小米3移动版刷安卓6.0-小米手机3 移动版 Flyme 6.7.11.24R beta
    小米5手机最后一版安卓6.0 MIUI8 6.11.10 小米5s手机最后一版安卓6.0 MIUI8 7.6.8
    vim格式转换
  • 原文地址:https://www.cnblogs.com/kaibing/p/7853349.html
Copyright © 2011-2022 走看看