Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Need help renaming datafile with <cr> in name.

Re: Need help renaming datafile with <cr> in name.

From: <bvalent_at_my-dejanews.com>
Date: Thu, 06 May 1999 02:43:12 GMT
Message-ID: <7gqvk0$ql4$1@nnrp1.deja.com>


Actually, you will notice that the filename at the OS level also has a return in it. Once you figure this out, you are so frustrated that the rest comes pretty easy. At the OS level, copy using a wildcard at the end of the filename. This will make it pick up the CR character at the end that you can't see.

Then do the rename in Oracle, but remember it needs to look like this:

alter database rename file 'temp.dbf
' to
'temp.dbf';

That way it picks up the return in the filename.

Hope this helps.

Beth

In article <37309B38.1E43C200_at_earthlink.net>,   Vitaliy Mogilevskiy <vit100gain_at_earthlink.net> wrote:
> You first have to rename the datafile on the OS level,
> then go to server manager mount the database (startup mount)
> rename datafile (alter database rename file '<bla>' to '<bla>')
> then open the database (alter database open)
>
> It should work, remember that Oracle can not rename the datafile on the OS
level
> you have do to that for it!
>
> Good luck!
>
> +--------------------------------------------------------------------------+
> | Vitaliy Mogilevskiy
> | Senior Consultant
> | CORE Technology Group, Inc.
> | E-mail: vit100gain_at_earthlink.net
> | Fax : (707) 516-2163
> | Web Page: http://home.earthlink.net/~vit100gain/index.html
> | *** Free DBA Script Library at my Web Page ***
> |
> | "Never wrestle a pig - you both get dirty and the pig likes it..."
> | "If the only tool you have is a hammer, everything looks like a nail..."
> +--------------------------------------------------------------------------+
>
> kcary_at_my-dejanews.com wrote:
>
> > Unfortunately, in creating the tablespace for our Enterprise manager
> > repository we hit a return before entering the close quote and contined the
> > create command on the next line in SVRMGR. This created a datafile whose
name
> > was, in effect,
> >
> > oem_data.dbf^M
> >
> > and this is reflected in file system listings, OEM listings of datafiles,
etc.
> >
> > A simple trick to rename the file in the system (AIX), however, we want to
> > figure out how to do this within Oracle (7.3.2). Unfortunately, the create
> > and rename function seem asymetric--you can create a datafile with the <cr>
> > but can't rename one that has a <cr> in it. The listing at the bottom of
this
> > message shows our rename attempt, which is structured the same way as the
> > create statement.
> >
> > Any thoughts on how to solve this problem? Should we drop the tablespace,
> > delete the file, and recreate the tablespace in a new file?
> >
> > Thanks much for your thoughts on this!
> > =ksc
> >
> > [Note the placement of the close quote from line 2 on line 3; this is the
> > same placement that caused the oem_data.dbf file to be created with <cr>
> > appended to the name.]
> >
> > SVRMGR> ALTER TABLESPACE "OEM_DATA" OFFLINE NORMAL;
> > Statement processed.
> > SVRMGR> ALTER DATABASE RENAME FILE
> > 2> '/emc1/oradata/axis/oem_data.dbf
> > 3> ' TO '/emc1/oradata/axis/oem_data.dbf';
> > ALTER DATABASE RENAME FILE
> > *
> > ORA-01511: error in renaming log/data files
> > ORA-01141: error renaming data file 9 - new file
> > '/emc1/oradata/axis/oem_data.dbf' not found
> > ORA-01110: data file 9: '/emc1/oradata/axis/oem_data.dbf
> > '
> > ORA-07360: sfifi: stat error, unable to obtain information about file.
> > IBM AIX RISC System/6000 Error: 2: No such file or directory
> > SVRMGR> ALTER TABLESPACE "OEM_DATA" ONLINE;
> > Statement processed.
> >
> > -----------== Posted via Deja News, The Discussion Network ==----------
> > http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>
>

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Wed May 05 1999 - 21:43:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US