rename datafile error Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: rename datafile error

  1. #1
    Join Date
    Aug 2000
    I am trying to rename datafile. All I am trying to do is to change its name. Note I am not moving it to a different location. These are my steps:
    -take ts offline;
    -issue 'alter tablespace rename datafile '/old_name/' to '/new_name/'';
    after that I am getting this error:
    Ora-01525: error in renaming datafiles
    Ora-01522: file /old_name/ to be renamed does not exist.

    Please help me to figure it out.
    Thank you.

  2. #2
    Join Date
    Mar 2001
    Hi Mary,

    I feel you have missed a step of renaming the data file at the operating system

    Follow these steps

    1) alter tablespace tablespacename offline;

    2) goto operating system and rename the old file to new file name example

    On NT

    Ren oldfilename newfilename

    On Unix

    mv oldfilename newfilename

    3) Then execute
    alter tablespace rename datafile '/old_name' to /new_name';

    4) alter tablespace tablespace online;

    The reason behind this Oracle does not automatically rename a datafile on the operating system you have to mannually do it using operating system command the alter tablespace rename command is used so that it can update the control files about the new location of the data files


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width