RE: RENAME DATAFILE

2002-01-23 Thread Mercadante, Thomas F

Seema,

It is not a risky process.  The proper way to do it is:

Alter tablespace {name} offline;
! host copy filename to newlocation;
Alter database rename file 'oldname' to 'newname';
alter tablespace {name} online;

* backup your database! *

if all goes well, remove the old file.

You obviously need to be able to take the tablespace offline to do this, so
no queries or transactions may be running while you do this.  You also need
to perform a backup (at least alter database backup controlfile to trace).

Hope this helps.

Tom Mercadante
Oracle Certified Professional


-Original Message-
Sent: Wednesday, January 23, 2002 3:44 PM
To: Multiple recipients of list ORACLE-L


Hi
Rename data file from one location to another location is riskly process?
If some thing wrong what will happened?Can I do it database on condition?
Can I do it when db is running?If yes then it is risky?

Thx
-Seema



_
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Seema Singh
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mercadante, Thomas F
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Rename Datafile

2001-05-07 Thread Mitchell

Dear DBAs

Question about  alter database rename file '/oldlocation/datafile1'  to
'/newlocation/datafile1';
This command ususal to move a datafile to a new location.
In case of rename file, I mean here
'/oldlocation/datafile1'  to '/newlocation/newdatafilename';  or
'/oldlocation/datafile1'  to '/oldlocation/newdatafilename';

I have never seen anybook mention this
I guess step is

1. shutdown database (normal or immediate)
2. cp /oldlocation/datafile1  /newlocation/newdatafilename or
mv /oldlocation/datafile1  /oldlocation/newdatafilename
3. startup  restirct mount;
3 alter database rename file  '/oldlocation/datafile1'  to
'/newlocation/newdatafilename';  or
'/oldlocation/datafile1'  to
'/oldlocation/newdatafilename';
4. check status of v$datafile
5. restart database

Any suggestiion?

Mitchell














-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Mitchell
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Rename Datafile

2001-05-07 Thread Jyoti Randive

Hi Mitchell,
The steps should work. Oracle recommends to shutdown the mounted database before opening again after the change(I am not sure about if this is required) I would just open the closed db.
I usually,
a.Backup the database(going to do a structural change!)
b.Take the tablespace connected to the tablespaceoffline if the datafiles belong to non system t/s(it would be better to shutown , start and mount if it is in Production !)
c.copy the datafiles to the new location and rename using o/s commands.
d.Rename the datafiles in Oracle using alter tablespace t/s name rename datafile 'old file ' to 'new file'
e.bring the tablespace online or shutdown and restart the db or iopen the mounted dbas the case may be.
f.Full Backup db again with the new structure.
HTH.
JyotiGet Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Jyoti Randive
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


Re: Rename Datafile

2001-05-07 Thread Thater, William

Mitchell wrote:

 1. shutdown database (normal or immediate)
 2. cp /oldlocation/datafile1  /newlocation/newdatafilename or
 mv /oldlocation/datafile1  /oldlocation/newdatafilename

nope don't use mv.  the database needs to see the old datafile until you
rename it.  so use cp and then after the rename, rm the old file.

--
Bill Thater  Certifiable ORACLE DBA
Telergy, Inc [EMAIL PROTECTED]

You gotta program like you don't need the money,
You gotta compile like you'll never get hurt,
You gotta run like there's nobody watching,
It's gotta come from the heart if you want it to work!

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thater, William
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Rename Datafile

2001-05-07 Thread Rao, Maheswara

You do not need to shut the database.  Only take the tablespace offline
where the datafiles are reorganized.

Rao

[EMAIL PROTECTED]

-Original Message-
Sent: Monday, May 07, 2001 10:56 AM
To: Multiple recipients of list ORACLE-L

Dear DBAs

Question about  alter database rename file '/oldlocation/datafile1'  to
'/newlocation/datafile1';
This command ususal to move a datafile to a new location.
In case of rename file, I mean here
'/oldlocation/datafile1'  to '/newlocation/newdatafilename';  or
'/oldlocation/datafile1'  to '/oldlocation/newdatafilename';

I have never seen anybook mention this
I guess step is

1. shutdown database (normal or immediate)
2. cp /oldlocation/datafile1  /newlocation/newdatafilename or
mv /oldlocation/datafile1  /oldlocation/newdatafilename
3. startup  restirct mount;
3 alter database rename file  '/oldlocation/datafile1'  to
'/newlocation/newdatafilename';  or
'/oldlocation/datafile1'  to
'/oldlocation/newdatafilename';
4. check status of v$datafile
5. restart database

Any suggestiion?

Mitchell














--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Mitchell
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Rao, Maheswara
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Rename Datafile

2001-05-07 Thread Hillman, Alex

Why not to make tablespace offline, rename datafile in oracle and them use
unix mv command to move it? Copy is not good ig there is no space.

Alex Hillman

-Original Message-
Sent: Monday, May 07, 2001 11:16 AM
To: Multiple recipients of list ORACLE-L


Mitchell wrote:

 1. shutdown database (normal or immediate)
 2. cp /oldlocation/datafile1  /newlocation/newdatafilename or
 mv /oldlocation/datafile1  /oldlocation/newdatafilename

nope don't use mv.  the database needs to see the old datafile until you
rename it.  so use cp and then after the rename, rm the old file.

--
Bill Thater  Certifiable ORACLE DBA
Telergy, Inc [EMAIL PROTECTED]

You gotta program like you don't need the money,
You gotta compile like you'll never get hurt,
You gotta run like there's nobody watching,
It's gotta come from the heart if you want it to work!

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Thater, William
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hillman, Alex
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



RE: Rename Datafile

2001-05-07 Thread Jacques Kilchoer
Title: RE: Rename Datafile





 -Original Message-
 From: Thater, William [mailto:[EMAIL PROTECTED]]
 
 On Mon, 7 May 2001,Hillman, Alex scribbled on the wall in 
 glitter crayon:
 
 -Why not to make tablespace offline, rename datafile in 
 oracle and them use
 -unix mv command to move it? Copy is not good ig there is no space.
 
 Well, the time I tried it, ORACLE didn't like the fact the 
 new file wasn't there first. But that was in version 7.3.2 
 so maybe in 8x that would work.


I have taken the tablespace offline, renamed the datafile in the OS, after the OS rename used 'alter database rename file' in SQL*Plus, then successfully brought the tablespace back online. This was in Oracle 8.0, 8.1 on SunOS and Windows NT/2000.

--
Jacques R. Kilchoer
(949) 754-8816
Quest Software, Inc.
8001 Irvine Center Drive
Irvine, California 92618
U.S.A.
http://www.quest.com