Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing the Databse name with pl/sql
SQL is much easier than PL/SQL. For a straight SQL solution, try the
following:
SELECT instance_name FROM v$instance;
If this *must* be done in a PL/SQL block then the following code should get you started:
DECLARE
dbname V$INSTANCE.INSTANCE_NAME%TYPE;
BEGIN
SELECT instance_name INTO dbname FROM v$instance;
END;
/
HTH,
Brian
"Dave S." wrote:
>
-- =================================================================== Brian Peasland dba_at_remove_spam.peasland.com Remove the "remove_spam." from the email address to email me. "I can give it to you cheap, quick, and good. Now pick two out of the three"Received on Wed Aug 13 2003 - 16:27:33 CDT