工作中点滴记录

永远保持学徒心态

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  176 随笔 :: 0 文章 :: 53 评论 :: 58万 阅读
< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

1、查询当前用户的所属表空间

select * from user_users;

2、增加表空间有两种方法:

  以sysdba登陆进数据库

   语法:

  alter tablespace 表空间名称

  add datafile 表空间存放路径  size 表空间大小 autoextend on next 增长的大小 maxsize 空间最大值(如果不限制空间最大值就用unlimited)

  例如:

    alter tablespace vgsm
    add datafile 'c:\oracle\product\10.2.0\oradata\vgsm\vgsm_01.dbf'
    size 1024M autoextend on next 50M maxsize unlimited;

 

查询表空间详情:

select f.* from dba_data_files f where f.tablespace_name='VGSM'

 

  以修改表空间的方式增加:

  语法:

  alter database

  datafile 表空间文件路径

 AUTOEXTEND(自动扩展) ON NEXT 表空间满后增加的大小

例如:

  alter database
 datafile 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\VGSM\VGSM' AUTOEXTEND ON NEXT 200m

查询表空间详情:

select f.* from dba_data_files f where f.tablespace_name='VGSM'

posted on   梦里故乡  阅读(55105)  评论(0编辑  收藏  举报
努力加载评论中...
点击右上角即可分享
微信分享提示