Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Control Chars in Filename
Billy Verreynne <vslabs_at_onwe.co.za> wrote in message news:<apr5km$pm9$1_at_ctb-nnrp2.saix.net>...
> Eric, the problem was not rm'ing the file via Unix shell scripting.
>
> It was passing a string literal to Oracle that contained the correct
> filename, including the control characters.
>
> The SQL command is:
> ALTER DATABASE
> DATAFILE '<filename>' OFFLINE DROP;
>
> This must be passed to Oracle via a client such as SQL*Plus. The problem was
> how to get those control characters into that literal... to which the
> solution we used was to put this command in a Unix text file, using vi to
> insert those control chars, and then running the text file through Server
> Manager as STDIN.
I suppose you could put something like this in a PL/SQL block:
execute immediate 'alter database datafile ' || chr(somenumber) || ... || ' offline drop';
where somenumber is the ASCII code for the control character.
Yong Huang Received on Thu Oct 31 2002 - 11:37:22 CST