admin 发表于 2019-8-19 15:47:15

172. Teamcenter populatefsc 中止在 TRANSLATIN状态


171. 更改运行调度程序的操作系统用户后,populatefsc 中止在 TRANSLATIN状态

问题
默认情况下,该模块使用 2 层的自动登录,如果操作系统用户不是 Teamcenter 用户,该
模块中的功能无法登录

ERROR - 2018/11/29-10:51:46.962 UTC - NoId - 515143: The login attempt failed: either the
user ID or the password is invalid.

方法
修改 populatefsc 脚本,增加登录信息
在 populatefsc.bat 文件中,在 TC_ROOT 和 TC_DATA 的设定后增加如下行
set TC_DBA_USER=infodba

在 populatefsc.pl 中 :

在 runPLMXMLExport 子程序下增加红色标记的代码

# This will be the full path to the executable.
my $exe_path= "$ENV{'TC_BIN'}${dir_separator}${exe_name}${exe_suffix}";
my $tcdbauser= "$ENV{'TC_DBA_USER'}";   
my $pwdfile= "$ENV{'TC_ROOT'}${dir_separator}security${dir_separator}server_infodba.pwf";
# Make sure we can find what we are executing.
die "The ${exe_name} executable was not found at the following location:
${exe_path}\n" unless -x ${exe_path};

# Start building the command line.
my @args= ( $exe_path, '-transfermode=ConfiguredDataExportDefault' );

# Take care of possible empty spaces in the argument values
my $outputFileStr = $hashRef->{'output_file'};
$outputFileStr = handleEmptySpaceInPath($outputFileStr);
my $scoUid = $hashRef->{'uid'};
$scoUid = handleEmptySpaceInPath($scoUid);

# Add the extra options.
addOption(\@args, '-xml_file=', $outputFileStr, 1);
addOption(\@args, '-uid=', $scoUid, 1);
addOption(\@args, '-u=', $tcdbauser, 1);   
addOption(\@args, '-pf=', $pwdfile, 1);

在 runLoadFscCache 子程序下增加红色标记的代码

# This will be the full path to the executable.
my $exe_path= "$ENV{'TC_BIN'}${dir_separator}${exe_name}${exe_suffix}";

my $tcdbauser= "$ENV{'TC_DBA_USER'}";
my $pwdfile= "$ENV{'TC_ROOT'}${dir_separator}security${dir_separator}server_infodba.pwf";
# Make sure we can find what we are executing.
die "The ${exe_name} executable was not found at the following location:
${exe_path}\n" unless -x ${exe_path};

# Figure out output information from command line input
my $outputFileStr = $hashRef->{'output_file'};
my $fscUri = $hashRef->{'targets'};

# Check possible empty space in the string
$outputFileStr= handleEmptySpaceInPath($outputFileStr);
$fscUri = handleEmptySpaceInPath($fscUri);

# Add the extra options.
my @args= ( $exe_path, '-f=load' );
addOption(\@args, '-plmxml=', $outputFileStr, 1);
addOption(\@args, '-fsctargets=', $fscUri, 1);
addOption(\@args, '-u=', $tcdbauser, 1);
addOption(\@args, '-pf=', $pwdfile, 1);



页: [1]
查看完整版本: 172. Teamcenter populatefsc 中止在 TRANSLATIN状态