SELECT db_name()
Looking for relevant Development Whitepapers? Visit the SearchWinDevelopment.com Research Library.
Mrdenny | Jul 2 2008 8:00PM GMT
Check out my SQL Server blog “SQL Server with Mr Denny” for more SQL Server information.
Ritchie1 | Jul 4 2008 8:14AM GMT
To see if Oracle or SQL Server are running check each’s version - one will return an answer the other will cause an error. Handle the error - and you know if it is Oracle or SQL Server.
To determine which version of Microsoft SQL Server:
SELECT SERVERPROPERTY(’productversion’), SERVERPROPERTY (’productlevel’), SERVERPROPERTY (’edition’)
To determine which version of Oracle:
select * from v$version
where banner like ‘Oracle%’;
It should return something like this:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - 64bit Production