<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    瘋狂

    STANDING ON THE SHOULDERS OF GIANTS
    posts - 481, comments - 486, trackbacks - 0, articles - 1
      BlogJava :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

    Oracle 更改表空間位置的具體步驟

    Posted on 2011-05-17 10:13 瘋狂 閱讀(1842) 評(píng)論(0)  編輯  收藏 所屬分類: database

    [oracle]> sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:46:29 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL> shutdown immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 167772160 bytes
    Fixed Size 1977208 bytes
    Variable Size 104862856 bytes
    Database Buffers 58720256 bytes
    Redo Buffers 2211840 bytes
    Database mounted.
    Database opened.
    SQL> alter tablespace users offline;
    Tablespace altered.
    SQL> host mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 – 64bit Production
    With the Partitioning, OLAP and Data Mining options
    [oracle]> ls
    control01.ctl control03.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
    control02.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
    [oracle]> mv /opt/oracle/oradata/ora10g/users01.dbf /opt/oracle/oradata_bak/
    [oracle]> sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 03:52:19 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL> alter tablespace users
    2 rename datafile ‘/opt/oracle/oradata/ora10g/users01.dbf’ to ‘/opt/oracle/oradata_bak/users01.dbf’;
    Tablespace altered.
    SQL> alter tablespace users online;
    Tablespace altered.
    見效果
    =============================================
    RMAN> report schema
    2> ;
    Report of database schema
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    —- ——– ——————– ——- ————————
    1 480 SYSTEM *** /opt/oracle/oradata/ora10g/system01.dbf
    2 30 UNDOTBS1 *** /opt/oracle/oradata/ora10g/undotbs01.dbf
    3 240 SYSAUX *** /opt/oracle/oradata/ora10g/sysaux01.dbf
    4 5 USERS *** /opt/oracle/oradata_bak/users01.dbf
    5 100 EXAMPLE *** /opt/oracle/oradata/ora10g/example01.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    —- ——– ——————– ———– ——————–
    1 22 TEMP 32767 /opt/oracle/oradata/ora10g/temp01.dbf
    恢復(fù)回去…
    [oracle]> pwd
    /opt/oracle/oradata/ora10g
    [oracle]> mv /opt/oracle/oradata_bak/users01.dbf .
    [oracle]> ls
    control01.ctl control03.ctl redo01.log redo03.log system01.dbf undotbs01.dbf
    control02.ctl example01.dbf redo02.log sysaux01.dbf temp01.dbf users01.dbf
    [oracle]> sqlplus /nolog
    SQL*Plus: Release 10.2.0.1.0 – Production on Tue Aug 19 04:07:47 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn /as sysdba
    Connected.
    SQL> alter tablespace users rename datafile ‘/opt/oracle/oradata_bak/users01.dbf’ to ‘/opt/oracle/oradata/ora10g/users01.dbf’;
    Tablespace altered.
    SQL> alter tablespace users online;
    Tablespace altered.
    效果如下
    RMAN> report schema;
    Report of database schema
    List of Permanent Datafiles
    ===========================
    File Size(MB) Tablespace RB segs Datafile Name
    —- ——– ——————– ——- ————————
    1 480 SYSTEM *** /opt/oracle/oradata/ora10g/system01.dbf
    2 30 UNDOTBS1 *** /opt/oracle/oradata/ora10g/undotbs01.dbf
    3 240 SYSAUX *** /opt/oracle/oradata/ora10g/sysaux01.dbf
    4 5 USERS *** /opt/oracle/oradata/ora10g/users01.dbf
    5 100 EXAMPLE *** /opt/oracle/oradata/ora10g/example01.dbf
    List of Temporary Files
    =======================
    File Size(MB) Tablespace Maxsize(MB) Tempfile Name
    —- ——– ——————– ———– ——————–
    1 22 TEMP 32767 /opt/oracle/oradata/ora10g/temp01.dbf

     

    本文來自CSDN博客,轉(zhuǎn)載請(qǐng)標(biāo)明出處:http://blog.csdn.net/star33375249/archive/2009/10/26/4728635.aspx

    主站蜘蛛池模板: 亚洲国产成人久久笫一页| 亚洲AV无码一区东京热| 精选影视免费在线 | 亚洲精品综合一二三区在线| 国产精品成人免费福利| 精品久久久久久亚洲综合网| 国产成人麻豆亚洲综合无码精品| 57pao一国产成视频永久免费| 亚洲AV无码AV日韩AV网站| 亚洲国产成人片在线观看| 四虎成人免费大片在线| 国产一级在线免费观看| 亚洲av无码片区一区二区三区| 亚洲毛片不卡av在线播放一区| 美丽的姑娘免费观看在线播放| 国产精品亚洲а∨天堂2021 | 久久青草91免费观看| 国产亚洲玖玖玖在线观看| 国产精一品亚洲二区在线播放| 中文字幕影片免费在线观看| 三级毛片在线免费观看| 亚洲精品一卡2卡3卡四卡乱码| 亚洲VA成无码人在线观看天堂| 国产美女无遮挡免费网站| 1000部免费啪啪十八未年禁止观看 | 国产免费久久精品久久久| 一区二区三区在线免费看| 免费夜色污私人影院网站| 亚洲电影唐人社一区二区| 久久精品国产亚洲Aⅴ香蕉| 成年大片免费视频| 一级毛片免费播放| 亚洲第一视频在线观看免费| 亚洲中文字幕无码中文字| 亚洲综合综合在线| 亚洲AV无码国产丝袜在线观看 | 永久在线观看www免费视频| 久久国产免费直播| 四虎精品成人免费视频| 亚洲国产精品无码久久久秋霞1 | 亚洲阿v天堂在线2017免费|