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: Datafile verify script

Re: Datafile verify script

From: Em Pradhan <empradhan_at_dplus.net>
Date: Tue, 23 Feb 1999 19:36:24 -0500
Message-ID: <36D34988.5467C526@dplus.net>


Hi

You can do it in one script..

use SUBSTR and INSTR function

    currently I don't have sql reference book with me and if i recall correct it will be like

    select 'dbv file='||file_name,
'logfile='||substr(file_name,INSTR(FILE_NAME,-1,'/'))||'.'||'log', 'blocksize=8192' from sys.dba_data_files order by file_name

there may be a syntax error , please check them once..

HTH pradhan

jdanton1_at_yahoo.com wrote:

> To all:
>
> I run the following script to very datafile status:
>
> select 'dbv file='||file_name, 'logfile='||tablespace_name||'.'||'log',
> 'blocksize=8192' from sys.dba_data_files order by file_name
>
> the format comes back as the following:
>
> dbv file=/orad03_B/b91prd03/amost001.ds001.dbf logfile=AMOST001.log
> blocksize=8192
>
> What I would like to do is produce the logfile name as amost001.ds001.dbf.log,
> without hard coding it as the file name.
>
> Does anyone know if by using some sort of substring function if I can
> accomplish this?
>
> Thanks,
>
> Joey D'Antoni
>
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
Received on Tue Feb 23 1999 - 18:36:24 CST

Original text of this message

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