I am in a process of developing password portal in Oracle Apex — oracle-tech

    Forum Stats

  • 3,701,031 Users
  • 2,239,263 Discussions
  • 7,834,978 Comments

Discussions

I am in a process of developing password portal in Oracle Apex

Namdev.JagtapNamdev.Jagtap Posts: 9 Green Ribbon
edited October 5 in APEX Discussions

in a process of developing password portal in Oracle Apex. i AM STUCK While i trying to create submit button with process define to unlock the remote db account.


Please find my code below:

Local code

create or replace PROCEDURE UNLOCK_USER(P1_DBNAME VARCHAR2,P9999_USERNAME VARCHAR2 ) IS

SQL_STRING VARCHAR(10000);

 BEGIN

 SQL_STRING:=' begin [email protected]:1LINK(:2); end; ';

EXECUTE IMMEDIATE SQL_STRING using in P1_DBNAME ,P9999_USERNAME;

dbms_output.put_line(SQL_STRING);

END;

Remote database code:

CREATE OR REPLACE EDITIONABLE PROCEDURE "ORADBA"."ACCOUNT_UNLOCK" (

  P9999_USERNAME VARCHAR2   

) IS

sql_string  VARCHAR2(10000);

BEGIN

  sql_string :='alter user ' || dbms_assert.SCHEMA_NAME(P9999_USERNAME) || ' account unlock ' ;

  EXECUTE IMMEDIATE sql_string using P9999_USERNAME;

END;


While executing


SQL> begin

UNLOCK_USER('ATLAIAD1','CXS442');

end; 2  3

 4 /

begin

*

ERROR at line 1:

ORA-06550: line 1, column 23:

PLS-00103: Encountered the symbol "" when expecting one of the following:

@ <an identifier> <a double-quoted delimited-identifier>

ORA-06550: line 1, column 35:

PLS-00103: Encountered the symbol "END"

ORA-06512: at "APEX_PASS.UNLOCK_USER", line 6

ORA-06512: at line 2

Please help

Answers

  • Namdev.JagtapNamdev.Jagtap Posts: 9 Green Ribbon

    Please Help??

  • Namdev.JagtapNamdev.Jagtap Posts: 9 Green Ribbon

    Any help please. Please suggest

  • InoLInoL Posts: 8,622 Silver Crown

    The database link is not a bind variable. Rewrite it to:


     SQL_STRING:='begin [email protected]'||P1_DBNAME||'(:1); end;';
     EXECUTE IMMEDIATE SQL_STRING using in P9999_USERNAME;
    


    For the future: this is not an Apex, but pl/sql question. You'd better ask questions like these in the pl/sql forum.

Sign In or Register to comment.