Online Tutorials & Training Materials |
Register Login

PLS-00352: Unable to Access another Database 'DB_LINK_NAME'

Abhijeet Mudgal || 15 Jan 2015 6:11 pm || 1

Hello all,

Please check procedure and suggest how to resolve it?

create or REPLACE PROCEDURE hostname (host_name in varchar2,user_name in VARCHAR2, pass_word in VARCHAR2,table_space in varchar2,pro_file in varchar2)
db_link_name varchar2(30);
select db_link into db_link_name from user_db_links where host='''||host_name||''';
dbms_utility.exec_ddl_statement@db_link_name('CREATE USER '||user_name||' IDENTIFIED BY '||pass_word||' DEFAULT TABLESPACE ' ||table_space|| ' PROFILE '|| pro_file|| ' ACCOUNT UNLOCK');


Error(7,1): PLS-00352: Unable to access another database 'DB_LINK_NAME'
Error(7,1): PL/SQL: Statement ignored
Error(7,1): PLS-00201: identifier 'DBMS_UTILITY@DB_LINK_NAME' must be declared

Thanks in advance.


  • 10 Jul 2015 3:36 pm

    The Database link either does not exist, is pointing to a database that is invalid, or it exists, just not while the procedure is being executed.

    i.o.w: Login to the database as the USER that runs the procedure, and see whether the db link you are trying to connect to does exist.. more specifically, is itsĀ HOST property correct