0

I used to operate in more than one database at a time, but when ever I get confused on which DB i have logged in I use sys_context to know DB I'm working on. But now I'm not getting any results for it, neither any error message. What could be the problem?

  1* select sys_context('user_env','db_name') from dual
SQL> /

SYS_CONTEXT('USER_ENV','DB_NAME')
----------------------------------------------------------


SQL> 

When I try other way I know I get this error. its probably because I don't have admin access

SQL> select utl_inaddr.get_host_address from dual;
select utl_inaddr.get_host_address from dual
       *
ERROR at line 1:
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at "SYS.UTL_INADDR", line 19
ORA-06512: at "SYS.UTL_INADDR", line 40
ORA-06512: at line 1
1
  • This question appears to be off-topic because it is about a spelling mistake. Commented Nov 13, 2013 at 8:12

1 Answer 1

1

user_env should be USERENV:

select sys_context('USERENV','DB_NAME') from dual
Sign up to request clarification or add additional context in comments.

1 Comment

Thanks! how wud I be so dumb :D but why wasn't I getting any error?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.