标题: LoadRunner 测试基于Oracle数据库开发的脚本问题 [打印本页] 作者: dominic 时间: 2007-9-19 10:54 标题: LoadRunner 测试基于Oracle数据库开发的脚本问题 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( "
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;