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

Home -> Community -> Mailing Lists -> Oracle-L -> Using OS info in package, OFA from within database

Using OS info in package, OFA from within database

From: Eric Buddelmeijer <Eric.Buddelmeijer_at_elegant.nl>
Date: Fri, 16 Sep 2005 09:43:32 +0200
Message-Id: <20050916074336.8875914017@coral.qinip.net>


Ladies, Gents,  

I have a package in use to create a standalone environment (tablespaces and schema's) for developers. Some developers install a linux oracle, some a windows oracle. They maintain their own installation on laptops and the like. Tablespaces are created in the package. In the package I need to know if I must use a \ or a / in the path for datafiles. Is there a place in the oracle dictionary where I can find out on what platform the current database is running? I now use what I would call a workaround by selecting the first row from dba_data_files and look for the first character as a tell-tale sign for the platform. But in my opinion that is just what it is, a workaround. Must be something better available. Can anyone enlighten me?  

On the same note but somewhat different: Is there a place in the dictionary where I can find a default location for datafiles? I know it is part of the OFA standard to have such a location but I kind of expected this standard is somewhat integrated into the dictionary. Or am I expecting too much too fast? Or is it even not a good idea to incorporate OFA in the dictionary? If I omit the path the location of the datafile becomes $ORACLE_HOME/dbs on unix and ORAHOME/database on windows. And I do not want datafiles there, obviously.  

Below is the determination of the platform I now use. Crude, but it works. Please, could you send me some ideas for improvement?  

TIA,
Eric.  

procedure PREPARE_OS as

FILE_BEGIN varchar2(5);

begin

select SUBSTR(FILE_NAME, 1, 1)

into FILE_BEGIN

from DBA_DATA_FILES

where rownum = 1;

if ('/' <> FILE_BEGIN) then

IS_WINDOWS := TRUE; else

IS_WINDOWS := FALSE; end if;

end  

Groeten,
Eric Buddelmeijer
DBA
Elegant Application Services
P.J. Oudweg 15
1314 CH Almere
tel. +31 (36) 547 7105
gsm +31 (6) 5356 0396
e-mail Eric.Buddelmeijer_at_elegant.nl
web www.elegant.nl

Dit bericht en alle eventueel meegestuurde documenten zijn vertrouwelijk en alleen bestemd voor degene aan wie het bericht geadresseerd is. Indien u dit bericht heeft ontvangen terwijl u niet de geadresseerde bent, verzoeken wij u het bericht te vernietigen en ons daarvan in kennis te stellen. Dit bericht is tevens gecontroleerd op computervirussen.

This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error, please delete the message and notify us. This e-mail message has been swept by MIMEsweeper for the presence of computer viruses

.  


--
http://www.freelists.org/webpage/oracle-l

Received on Fri Sep 16 2005 - 02:45:45 CDT

Original text of this message

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