Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing the Databse name with pl/sql

Re: Accessing the Databse name with pl/sql

From: LKBrwn_DBA <member30625_at_dbforums.com>
Date: Wed, 13 Aug 2003 21:57:34 +0000
Message-ID: <3236442.1060811854@dbforums.com>

  1. You need to set priviledges to the schema where you are to create your stored procedure:

grant select on V_$DATABASE to user1;

2) create the SP or function like this:

Create Or Replace Function Db_Name
Is
Db_N Varchar2(10);
Begin
Select Name Into Db_N From Sys."V_$DATABASE"; Return Db_N;
End;
/

--
Posted via http://dbforums.com
Received on Wed Aug 13 2003 - 16:57:34 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US