Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/318.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/css/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java DBD::Oracle如何在连接之前设置v$session.program_Java_Oracle_Perl_Session - Fatal编程技术网

Java DBD::Oracle如何在连接之前设置v$session.program

Java DBD::Oracle如何在连接之前设置v$session.program,java,oracle,perl,session,Java,Oracle,Perl,Session,我必须使用DBD::Oracle连接到Oracle数据库,该数据库有一个登录触发器,用于在登录时验证我的v$session.program 我试过: use strict; use warnings; use DBI; DBI->connect ('dbi:Oracle:host=<ip>;sid=<sid>', 'test', 'TEST', { ora_module_name => 'My Program'}) || die DBI::err

我必须使用DBD::Oracle连接到Oracle数据库,该数据库有一个登录触发器,用于在登录时验证我的v$session.program

我试过:

use strict;
use warnings;

use DBI;

DBI->connect ('dbi:Oracle:host=<ip>;sid=<sid>', 'test', 'TEST', 
    { ora_module_name => 'My Program'}) || die DBI::errstr;
但是我没有使用Java。我正在使用Perl。有什么建议吗

[更新]

在进程上运行“strace”确定DBD::Oracle模块正在执行以下操作:

打开(“/proc/self/cmdline”,Ordonly)=4 读(4,“perl\0test.pl\0”,255)=13

因此,是的,理论上我可以创建一个名为“我的程序”的脚本(或软链接),并将其用作运行我的文件的命令行。但在“非常悲伤,一点也不好”的等级上,这一比例相当高(

这意味着您应该以某种方式将二进制文件重命名为预期值

执行此操作有一些提示:

perldoc perlvar:

   $0      Contains the name of the program being executed.

           On some (but not all) operating systems assigning to $0
           modifies the argument area that the "ps" program sees. On some
           platforms you may have to use special "ps" options or a
           different "ps" to see the changes. Modifying the $0 is more
           useful as a way of indicating the current program state than it
           is for hiding the program you're running.

建议删除Java标记,因为这纯粹是一个Perl和Oracle连接/properties/trigger讨论。标记为正确。但是…实际上这不太可能。请参阅下面我的自我评论。
PROGRAM     VARCHAR2(48)    Operating system program name
   $0      Contains the name of the program being executed.

           On some (but not all) operating systems assigning to $0
           modifies the argument area that the "ps" program sees. On some
           platforms you may have to use special "ps" options or a
           different "ps" to see the changes. Modifying the $0 is more
           useful as a way of indicating the current program state than it
           is for hiding the program you're running.