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: Control Chars in Filename

Re: Control Chars in Filename

From: Karen Abgarian <abvk_at_ureach.com>
Date: Mon, 04 Nov 2002 06:53:55 GMT
Message-ID: <3DC5FA8D.59AB0ED0@ureach.com>

Hi Billy,

I assume that you already know that ALTER DATABASE .. OFFLINE DROP command is not really for dropping datafiles. With this command, you are taking the datafile offline without intention to bring it back online as it is, without recovery.

For this particular problem, you can simply remove the file at the UNIX prompt. Then force a write to the file, say checkpoint. Once Oracle notices that the file is missing, it will automatically offline the file and change its state to RECOVER. That's the same state the OFFLINE DROP command puts it in.

Additionally, you can refer to datafiles by file numbers. They can be found in FILE# column of V$DATAFILE, and other views. Not all commands allow you to do that, but ALTER DATABASE OFFLINE DROP does.

Regs
AK

Billy Verreynne wrote:

> Ran into a very interesting problem yesterday. Had to do an offline drop of
> a datafile. Only, when this datafile was created, there must have been
> finger trouble via the telnet session that was used to do the add datafile.
>
> V$DATAFILE showed the filename. Used that name. Oracle said the datafilename
> is unknown. Alert log showed the filename as having a control character,
> e.g. ..../^[[2~filename.dbf (showed up as .../filename.dbf in the V$
> table).
>
> How do you drop the datafile?
>
> After some minutes of fruitless attempts, asked a Unix guy and he showed
> how. Thought that this is the type of info one needs to file under 'never
> forget'.
>
> Create a sh script in vi and do the drop file statement there. Type the
> filename as it appears and use vi to create the contol chars. Press CTRL-V
> in vi. Keep CTRL down and enter the control char, e.g. CTRL-V [ for the ^[[
> bit.
>
> --
> Billy
Received on Mon Nov 04 2002 - 00:53:55 CST

Original text of this message

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