<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 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

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

    Posted on 2011-05-17 10:13 瘋狂 閱讀(1842) 評論(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
    恢復回去…
    [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博客,轉載請標明出處:http://blog.csdn.net/star33375249/archive/2009/10/26/4728635.aspx

    主站蜘蛛池模板: 久久精品无码专区免费青青| 亚洲a∨无码精品色午夜| 亚州**色毛片免费观看| 日本高清免费网站| 亚洲无mate20pro麻豆| 成人免费一区二区无码视频| 亚洲婷婷第一狠人综合精品| 大学生一级毛片免费看| 亚洲一区欧洲一区| 女人18毛片免费观看| 亚洲无码一区二区三区| 成人免费a级毛片无码网站入口| 亚洲国产精品免费观看 | 激情亚洲一区国产精品| 91情侣在线精品国产免费| 99999久久久久久亚洲| 久久久久国色AV免费观看性色| 亚洲欧美日韩一区二区三区在线| 日本特黄特色aa大片免费| 一区二区三区免费在线视频| 国产gv天堂亚洲国产gv刚刚碰| 久久精品成人免费观看| 亚洲国产精品一区二区久| 免费的涩涩视频在线播放| 国产亚洲蜜芽精品久久| 亚洲综合在线另类色区奇米| 欧洲人免费视频网站在线| 亚洲国产成人久久| 亚洲AV无码成H人在线观看| a视频在线观看免费| 精品亚洲AV无码一区二区三区| 国产免费131美女视频| 国产精品网站在线观看免费传媒| 亚洲无成人网77777| 日韩a级毛片免费观看| 99re6在线视频精品免费| 久久精品国产亚洲av麻豆蜜芽| 亚洲国产精品视频| 亚洲成年人免费网站| 免费无码AV一区二区| 精品亚洲aⅴ在线观看|