Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Getting the name of the database
On Tue, 21 Jul 1998 12:34:53 GMT, calberto_at_my-dejanews.com <calberto_at_my-dejanews.com> wrote:
>Hi all!
>
>Is there any function in Oracle that returns the name of the database I am
>using like there is SELECT USER FROM DUAL to get the username?
>
>Thanks in advanced,
Here's some food for thought:
rem /********************************************************************* rem * rem * login.sql - sqlplus start up file rem * rem * next four statements sets the sql prompt = oracle instance.rem *
rem *********************************************************************/
column sid new_value osid noprint
select lower (substr (global_name, 1, (instr (global_name, '.') -1))) sid
from global_name ;
set sqlprompt '&osid> '
rem /********** end of login.sql ***********************/
>
>Carlos
>
>-----== Posted via Deja News, The Leader in Internet Discussion ==-----
>http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
--
These opinions are my own and not necessarily those of Information Quest or
Pebble In The Sky http://www.informationquest.com mailto:jgarry@nospameiq.com
http://ourworld.compuserve.com/homepages/joel_garry Remove nospam to reply.
mailto:joel_garry_at_compuserve.nospam.com "See your DBA?" I AM the @#%*& DBA!
Received on Tue Jul 21 1998 - 12:26:16 CDT
![]() |
![]() |