??? Using Automatic Storage Management (ASM), presented later in this chapter,
can potentially eliminate the need to manually move datafiles at all: Instead of moving the
datafile, you can add another disk volume to the ASM storage group.
92 Oracle Database 11g DBA Handbook
Moving Datafiles
To better manage the size of a datafile or improve the overall I/O performance of the database, it
may be necessary to move one or more datafiles in a tablespace to a different location. There are
three methods for relocating the datafiles: using alter database, using alter tablespace, and via
EM Database Control, although EM Database Control does not provide all the commands
necessary to relocate the datafile.
The alter tablespace method works for datafiles in all tablespaces except for SYSTEM, SYSAUX,
the online undo tablespace, and the temporary tablespace. The alter database method works for
datafiles in all tablespaces because the instance is shut down when the move operation occurs.
Moving Datafiles with ALTER DATABASE
The steps for moving one or more datafiles with alter database are as follows:
1. Connect to the database as SYSDBA and shut down the instance.
2. Use operating system commands to move the datafile(s).
3. Open the database in MOUNT mode.
4. Use alter database to change the references to the datafile in the database.
5. Open the database in OPEN mode.
6. Perform an incremental or full backup of the database that includes the control file.
Pages:
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188