Help
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 9 of 9

Thread: Help

  1. #1
    Join Date
    Sep 2000
    Posts
    56
    I have two datafiles inRBS TABLESPACE.The name of one datafile is rbs01.dbf & the other one is .ora.How to rename the .ora to rbs02.dbf.Oracle 8.1.6 running in N/T.I tried to rename it by alter database rename file.But it gives an error
    ora-01511
    ora-01121cannot rename databse files which are in use or recovery.
    What is the way i can rename the .ora file(Such a nonsense name)

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Make sure that none of your RBS uses this file. Then try, it should work.

    Sam

  3. #3
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    1. alter tablespace rbs offline
    2. cp .ora rbs02.ora
    3. alter database rename file '/u01/.ora' to '/u01/rbs02.ora'
    4. alter tablespace rbs online

    Please note, you should do this when nobody else is logged in.
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  4. #4
    Join Date
    Jun 2000
    Posts
    417
    This should work, just try to make sure there is little to no activity.

    alter tablespace rbs offline normal
    host copy /path/rbs02.ora /path/rbs02.dbf
    alter database rename file '/path/rbs02.ora' to '/path/rbs02.dbf'
    alter tablespace rbs online

  5. #5
    Join Date
    Nov 2000
    Posts
    344
    These are the steps you need to follow :

    1) Take your tablespace offline or shutdown the database and then MOUNT it, but do not open it yet

    2) rename your file from the operating system level

    3) issue the 'alter database' SQL stmt to rename the file

    4) put your tablespace back online (or open the database,
    depending on what you did in step 1.

    -John

  6. #6
    Join Date
    Jun 2000
    Posts
    417
    Heh everyone replied at about the same time.

  7. #7
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092

    I think that's pretty much a concensus about what what you need to do!
    Jeff Hunter
    marist89@yahoo.com
    http://marist89.blogspot.com/
    Get Firefox!
    "I pledge to stop eating sharks fin soup and will not do so under any circumstances."

  8. #8
    Join Date
    Sep 2000
    Posts
    56
    Thanks.But when I am trying to take it offline the file I ma getting an error ORA-1145 OFFLINE IMMEDIATE DISALLOWED UNLESS MEDIA RECOVERY ENABLED.oNCE AGAIN i AM USING ORACLE 8.1.6. IN N/T

  9. #9
    Join Date
    Jun 2000
    Posts
    417
    Did you try to 'offline normal' or 'offline immediate' ? You should use 'offline normal'

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