|
1,脚本中录制时生成如下脚本:
lrd_stmt(Csr6, "/* select text from sys.all_source where owner = 'userName' and "
"name = 'PA_SECURITY'; */
BEGIN PA_SECURITY.DEF_PASSWD(/* "
"INSERT PARAMETERS HERE */); END;", -1, 0 /*Non deferred*/, 1 /*Dflt Ora Ver*/,0);
2,直接运行,报错如下:
vuser_init.c(264): Error: lrdo.c/fjParse: "oparse" LDA/CDA return-code=06550:
vuser_init.c(264): Error:
ORA-06550: line 1, column 99:
PLS-00306: wrong number or types of arguments in call to 'DEF_PASSWD'
ORA-06550: line 1, column 99:
PL/SQL: Statement ignored
vuser_init.c(264): lrd_stmt: ERROR, return-code=LRDE2009.
/* select text from sys.all_source where owner = 'userName' and name = 'PA_SECURITY'; */
BEGIN PA_SECURITY.DEF_PASSWD(/* INSERT PARAMETERS HERE */); END;
3,错误分析:
在数据库PA_SECURITY的DEF_PASSWD方法定义了参数,脚本中没有定义,因此修改脚本如下:
lrd_stmt(Csr6, "/* select text from sys.all_source where owner = 'userName' and "
"name = 'PA_SECURITY'; */
BEGIN PA_SECURITY.DEF_PASSWD( "
"'userName'); END;", -1, 0 /*Non deferred*/, 1 /*Dflt Ora Ver*/, 0);
4, 新的错误信息:
vuser_init.c(264): Error: lrdo.c/fjParse: "oparse" LDA/CDA return-code=06550:
vuser_init.c(264): Error:
ORA-06550: line 1, column 99:
PLS-00221: 'DEF_PASSWD' is not a procedure or is undefined
ORA-06550: line 1, column 99:
PL/SQL: Statement ignored
vuser_init.c(264): lrd_stmt: ERROR, return-code=LRDE2009.
/* select text from sys.all_source where owner = 'userName' and name = 'PA_SECURITY'; */
BEGIN PA_SECURITY.DEF_PASSWD( 'userName'); END;
5, 疑惑:
在数据库中明明定义了DEF_PASSWD, 不过不是Procedure,而是function。为什么在上述步骤1运行的时候能找到,而在步骤4找不到? 难道LR不支持访问Oracle中的Function???
|
|