troubleshooting Question

Move user tablespace to another location on disk

Avatar of sma3092
sma3092 asked on
Oracle Database
4 Comments2 Solutions979 ViewsLast Modified:
hi there

I am planning to move user.dbf to a different disk as the current location is running out of space.
I plan to do this out of hours does the below set of command look ok to you? Or have I missed some
thing?
$ sqlplus sys as sysdba
> password: ********
> ALTER TABLESPACE USERS OFFLINE;

# cp -a /var/u02/oradata/stellar/users02.dbf /u03/oradata/stellar/users02.dbf

> ALTER TABLESPACE USERS RENAME DATAFILE /var/u02/oradata/stellar/users02.dbf /u03/oradata/stellar/users02.dbf;
> ALTER TABLESPACE USERS ONLINE;
> SET LINES = <AS WIDE AS YOUR TERMINAL>
> SELECT * FROM DBA_DATA_FILES;
  <CHECK THAT THE FILE PATH HAS CHANGED FOR users02.dbf>
> QUIT;

Thanks

Sma3092
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros