Tuesday, September 29, 2009

Show Database Version

Create or Replace Function Fnc_Database_version Return char IS

v_data varchar2(1000);
ShowData varchar2(4000);
p_data varchar2(4000);

Begin

For i in (select banner
from sys.v_$version)
Loop
v_data := i.banner;
ShowData:= ShowData||v_data||chr(10);
End Loop;

p_data := 'Connected to :'||chr(10)||ShowData;
p_data := substr(p_data,1,length(p_data)-1);

Return p_data;

Exception
When others then null;
End;

No comments:

Post a Comment