Get instance name in PL/SQL
259294Feb 24 2004 — edited Mar 1 2004In an SQL window (in PL/SQL Developer) I can issue
select instance_name
from v$instance;
But I can't do the same in PL/SQL - I always get 'table or view does not exist' - I'm assuming this is a limitation on accessing the v$ tables from PL/SQL. Is there any other way to get the instance name for the service the code is currently running on - I want to prevent certain code from running on the development server but still run on the production environmental and one is a copy of the other, so the database name is the same.
Thanks in advance