View Single Post
Old Jun 1st, 2006, 8:53 AM   #6
Gumby
Newbie
 
Join Date: Mar 2006
Location: Andover, MA / Rochester, NY / Nanticoke, PA
Posts: 16
Rep Power: 0 Gumby is on a distinguished road
Send a message via AIM to Gumby
Quote:
Originally Posted by jim mcnamara
SET SERVEROUT ON SIZE 10000
DECLARE
    DBNAME  VARCHAR2(32):=null;
BEGIN
    SELECT name
    INTO DBNAME
    FROM v$database;
    DBMS_OUTPUT.ENABLE;
    DBMS_OUTPUT.PUT_LINE('DATABASE NAME = ' || DBNAME);
END;
/

This is the basic code to get the db name - it displays it. For a trigger you would not want a display.

Yes, that would make life much easier, but unfortunately, I don't have access to v$database. From what I've heard when similar problems to this cropped up in the past, they're not going to grant access to it either. Beuacracy is fun!
Gumby is offline   Reply With Quote