Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Accessing the Databse name with pl/sql
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.comReceived on Wed Aug 13 2003 - 16:57:34 CDT
![]() |
![]() |