Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get Db Name?

Status
Not open for further replies.

lincs

MIS
Feb 2, 2005
1
VC
Hi All,

Can somebody tell me how I can obtain the name of the Oracle Db (using a query or from PL-SQL)?

I don't want to use system tables directly as the client does not have access, also I know I can "select * from global_name", but I would like only the Db Name without the domain name added.

Thanks a lot!

Lincoln.
 
Hi,
just take a substring from global_name:
select substr(global_name,1,instr(global_name,'.')-1)
from global_name;
regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top