修改系统表空间从DMT到LMT

修改系统表空间从DMT到LMT

 

测试环境测试过程:

SQL>  Exec dbms_space_admin.tablespace_migrate_to_local('SYSTEM');

BEGIN dbms_space_admin.tablespace_migrate_to_local('SYSTEM'); END;

*

ERROR at line 1:

ORA-10643: Database should be mounted in restricted mode and Exclusive mode

ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 0

ORA-06512: at line 1

 

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

 

SQL> startup restrict;

ORACLE instance started.

Total System Global Area 1269796704 bytes

Fixed Size                   733024 bytes

Variable Size            1090519040 bytes

Database Buffers          167772160 bytes

Redo Buffers               10772480 bytes

Database mounted.

Database opened.

 

SQL> Exec dbms_space_admin.tablespace_migrate_to_local('SYSTEM');

BEGIN dbms_space_admin.tablespace_migrate_to_local('SYSTEM'); END;

 

*

ERROR at line 1:

ORA-10647: Tablespace other than SYSTEM,APPS_UNDOTS1, TEMP not found in read

only mode

ORA-06512: at "SYS.DBMS_SPACE_ADMIN", line 0

ORA-06512: at line 1

 

ORA-30021: Operation not allowed on undo tablespace

 

select 'alter tablespace  '||tablespace_name|| '  read only ;',status from dba_tablespaces;

 

SQL> alter tablespace PERFSTAT read only;

Tablespace altered.

SQL> alter tablespace OEM_REPOSITORY read only;

Tablespace altered.

SQL> alter tablespace PORTAL read only;

Tablespace altered.

SQL> alter tablespace OWAPUB read only;

Tablespace altered.

SQL> alter tablespace OLAP read only;

Tablespace altered.

SQL>  alter tablespace ODM read only;

Tablespace altered.

SQL> alter tablespace  CTXD  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_TX_IDX  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_TX_DATA  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_SUMMARY  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_SEED  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_QUEUES  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_NOLOGGING  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_MEDIA  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_INTERFACE  read only ;

Tablespace altered.

SQL> alter tablespace  APPS_TS_ARCHIVE  read only ;

Tablespace altered.

 

SQL>  Exec dbms_space_admin.tablespace_migrate_to_local('SYSTEM');

PL/SQL procedure successfully completed.

 

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

 

SQL> startup

ORACLE instance started.

Total System Global Area 1269796704 bytes

Fixed Size                   733024 bytes

Variable Size            1090519040 bytes

Database Buffers          167772160 bytes

Redo Buffers               10772480 bytes

Database mounted.

Database opened.

 

select 'alter tablespace  '||tablespace_name|| '  read write ;',status from dba_tablespaces;

 

SQL> alter tablespace  PERFSTAT  read write ;

SQL> alter tablespace  APPS_TS_ARCHIVE  read write ;   

SQL>alter tablespace  APPS_TS_INTERFACE  read write ;      

SQL>alter tablespace  APPS_TS_MEDIA  read write ;  

SQL>alter tablespace  APPS_TS_NOLOGGING  read write ;      

SQL>alter tablespace  APPS_TS_QUEUES  read write ; 

SQL>alter tablespace  APPS_TS_SEED  read write ;   

SQL> alter tablespace  APPS_TS_SUMMARY  read write ;   

SQL>alter tablespace  APPS_TS_TX_DATA  read write ;

SQL>alter tablespace  APPS_TS_TX_IDX  read write ; 

SQL> alter tablespace  CTXD  read write ;      

SQL>alter tablespace  ODM  read write ;    

SQL>alter tablespace  OLAP  read write ;   

SQL>alter tablespace  OWAPUB  read write ; 

SQL>alter tablespace  PORTAL  read write ;  

SQL> alter tablespace  OEM_REPOSITORY  read write ;

 

请使用浏览器的分享功能分享到微信等