Sei sulla pagina 1di 9

1) Do offline (force) backup

2) Ensure that the database has a default temporary tablespace that is not SYSTEM

3) Eliminate any undo (rollback) segments in dictionary-managed tablespaces.


Below are the steps :

1) open sqlplus

2) Find out what kind of parameter are the system using. Make sure its
spfile.
- sql> show parameter spfile (if the value is empty, it’s pfile)
- if it’s pfile, shutdown system, go to step 3

3) su - <sid>adm and stopsap

4) su – ora<sid> and open sqlplus

5) Create spfile from pfile


- sql> create spfile from pfile

6) check spfile
- cd $ORACLE_HOME/dbs

7) start oracle
- sql> startup

8) Look for free space in any sapdata directories


9) Create new directory for undo tablespace
- mkdir undo_1

10) Go to sqlplus

11) Create UNDO tablespace


- sql> create undo tablespace psapundo datafile
‘/oracle/TES/sapdata1/undo_1/undo.data1’
size 500M autoextend on next 500M maxsize 1000M
extent management local

12) View undo tablespace parameter


- sql> show parameter undo

13) Modify value for undo_management, undo_retention,


undo_surpress_error and undo_tablespace
- sql> alter system set undo_management = ‘auto’
scope = ‘spfile’

14) Restart oracle


- sql> shutdown immediate
- sql> startup

15) Change the other parameter


- sql> alter system set undo_retention = 43200
scope = ‘spfile’
- sql> alter system set undo_tablespace = ‘PSAPUNDO’

16) Restart oracle


- sql> shutdown immediate
- sql> startup

17) Recheck the parameters


- sql> Show parameter undo

18) Before dropping the PSAPROLL tablespace, check if DB still using it


- sql> select a.name, b.status from v$rollname a, v$rollstat b
where a.name in (select segment_name from
dba_segments) and a.usn = b.usn

19) If the output have then naming convention PRS_xxx, that means DB still
using PSAPROLL. If not, then drop the tablespace.
- sql> drop tablespace PSAPROLL including contents
and datafiles

20) Do offline backup


4) All tablespaces other than undo, temporary and system should be in READ ONLY
mode.

- OEM : double click on tablespace and tick READ ONLY box.

- SQLPLUS : alter tablespace <tablespace_name> read only;


- Double check the tablespace mode

5) Shutdown oracle and start up the instance in restricted mode


6) To check if Oracle in restricted mode, go to OEM
7) Migrate SYSTEM tablespace

- sql> execute DBMS_SPACE_ADMIN.TABLESPACE_MIGRATE_TO_LOCAL


(‘SYSTEM’);
8) Go back to OEM and uncheck back READ ONLY box (change back to read write).

9) Restart oracle using shutdown immediate and startup

10) For testing purposes, create new tablespace and check the tablespace mode via
OEM. If the previous actions is correct, the new tablespace suppose to be LOCALLY
MANAGED
11) Check the status of all tablespaces
12) Startup r3 and do offline (force) backup.

Potrebbero piacerti anche