Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check type of connected database?

2959076May 31 2015 — edited Jun 5 2015

Hello,

Our Application has some complication and based on type of database it chooses required action.

What we need is ::

Is there any common query that can tell whether the database is

11g version     OR     12c NON CDB     OR     12c CDB     OR     12c PDB

Our Application needs  to do some prework( prechecks ) before creating the schema in any of the above databases.

and this prework is different for each of them.

The problem that currently i m facing  if i execute a query "select name,cdb from v$database"  to check whether database is CDB or NON CDB.

Same query when executed on 11g gives an error ,as CDB is not defined in 11g.

So what is the best way to do this.

Thanks.

This post has been answered by jgarry on Jun 4 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 3 2015
Added on May 31 2015
11 comments
879 views