表空間read only和online的狀態轉換

lnwxzyp發表於2009-04-21
  現建一個表空間測試:
SQL>create tablespace tbs datafile 'E:\ORADATA\YP\tbs01.DBF' size 1G autoextend off;
SQL>select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
TEMP                           ONLINE
USERS                          ONLINE
TBS                            ONLINE

6 rows selected

將表空間 更改為read only

SQL> alter tablespace tbs READ ONLY;

Tablespace altered

SQL>select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
TEMP                           ONLINE
USERS                          ONLINE
TBS                            READ ONLY

6 rows selected

SQL>

如何將read only更改為 onlie的呢? google了一下 沒有查詢到需要的資訊,最後全部換成英文關鍵字終於找到了答案

SQL> alter tablespace tbs read write;

Tablespace altered

SQL>  select tablespace_name,status from dba_tablespaces;

TABLESPACE_NAME                STATUS
------------------------------ ---------
SYSTEM                         ONLINE
UNDOTBS1                       ONLINE
SYSAUX                         ONLINE
TEMP                           ONLINE
USERS                          ONLINE
TBS                            ONLINE

6 rows selected

SQL>

 本來都想在itput上發問的,看來對於google的利用還很少,以後要加強 呵呵。


來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12216142/viewspace-591094/,如需轉載,請註明出處,否則將追究法律責任。

相關文章