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

Home -> Community -> Usenet -> c.d.o.misc -> Re: check if oracle or MSDE

Re: check if oracle or MSDE

From: Ana C. Dent <anacedent_at_hotmail.com>
Date: Tue, 02 Oct 2007 15:26:05 GMT
Message-ID: <hqtMi.148162$dI1.59457@newsfe08.phx>


Niall Litchfield <niall.litchfield_at_dial.pipex.com> wrote in news:470261BC.6050100_at_dial.pipex.com:

> seannakasone_at_yahoo.com wrote:

>> Is there a way to write a single SQL statement that will run a
>> statement if you are in Oracle and run another statement if you are in
>> MSDE? It has to be a single SQL statement because I'm using a front
>> end application that requires that, so it can't be an PL/SQL script,
>> proc, nor a function. Our application runs with either Oracle or MSDE
>> so that's why i have this need.
>>
> No there isn't. This is however an application written in some form of
> programming language no? If so then use the programming language
> appropriately to do this task. It has to establish a connection to the
> db, so it pretty much has to know what database it is talking to.
> 

select count(*) from v$instance.

If query returns a valid number, it was talking to Oracle. Any other response it was talking to MSDE. Received on Tue Oct 02 2007 - 10:26:05 CDT

Original text of this message

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