Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Change path of DATAFILES

735680Jan 21 2010 — edited Jan 21 2010
Hi
I am planning to cahnge path of my DATAFILES.I am Using Oracle 10g on windows cluster.

I have around 300 datafiles.I have give the command
SQL>select 'alter tablespace ' || tablespace_name || 'offline;' from dba_tablespaces;
to make the entire datafiles offline.

While the database is open and when i give this command it shows an error that some files is on other process
So i shutdowm the database and start in mount state and i make it offline and move from the C: to D:

Now i want to rename the path.For this i used the command

SQL>select 'alter tablespace ' || tablespace_name || ' rename datafile ' || '''' ||file_name || '''' ||
' to ''' || replace (file_name,'C:\ora10g\oracle\data','D:\ora10g\oradata') || ''';' from dba_data_files;

But this gives me the error that
ERROR at line 1:
ORA-01219: database not open: queries allowed on fixed tables/views only

As i was in mount state i thought its was the problem.when i plan to open the database there is an error.
Thanks & Regards

Edited by: user12119634(bobs) on Jan 21, 2010 1:27 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 18 2010
Added on Jan 21 2010
23 comments
12,787 views