11 replies
by rodsherer
Potential answers. Looking for more though...
Of the preffered solutions:
>>Using straight PL/SQL - you can try the table GV_$VERSION .
The only clue of the five lines in this installation is one banner that has "TNS for Solaris" in it. It doesn't tell us which version of Solaris we're running. The other lines don't mention the OS at all.
>>But, from sql*plus you can host out and check environment variables.
Which will tell you the OS that the SQL*Plus client is on *not* the database.
>>Or if you have the http server installed in the database server you can request the web server op system type.
Who installs their web server in the database?
As far as I can see there is no way of finding this info out. You might be able to use a Java Stored Procedure that runs OS execeutables to test whether you're on a *nix box or a Windows box, but I don't think there's any way of telling which version/flavour you're on.
by why
If all you want to know is ix / win the how about:
select substr(name,1,1) from v$datafile where ts# = 0
if it's an alpha, then it sure ain't unix ...
(if you want to be purer join with v$tablespace and use tablespacename = 'SYSTEM' !)
Otherwise, tricky - it must be in there somewhere!
by rodsherer
by why
by rodsherer
by rodsherer
by why
Of course, once you solve this one "properly" your organisations licensing policy will change, making this dialogue irrelevent.
Anything that has to do transaction level license checks needs to be lightweight - I'd look at implementing my own setof "capability" tables encapsulated in "can_I" functions. They'd end up being cached, so minimal peformance hit.
Alternatively, there's license managers like flexlm, which works (from a user perspective anyway) in a heterogenoeus environment.
However, the original question will fester in my mind until I have an answer ...
Regards
Dave
by rodsherer
If I come up with a solid way to find the OS from within Oracle I will post it under this question. So far all the ideas I have come up with or received are here already. currently we are using this query.
SELECT 1
FROM v$version
WHERE UPPER(banner) LIKE 'TNS FOR%' AND
UPPER(banner) NOT LIKE '%WINDOWS%';
by why
As is always the way, I found this while desperately looking for something else ...
select dbms_utility.port_string from dual;
Result is less than precise, but enough for *ix / Win
Doesn't seem to need any special access rights.
Incidentally, I also found (and it's extraordinarily useful in those real panic moments) dbms_session.set_sql_trace_in_session
Regards,
Dave
Incidentally
by rodsherer
by rodsherer
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending