Customer needs to connect to a 3rd party database using the Smarts perl libraries.
Smarts 10.1.x
Perl that is included with Smarts utilizes a minimal distribution installation.
Verify your version of Smarts
/opt/InCharge/IP/smarts/bin/sm_server --version
sm_server:
linux_rhAS50-x86-64/206320000
IP_NETWORK_SUITE: V10.1.5.0(195243), 10-Jun-2021 16:06:14 Copyright 2021, VMware Inc - Build 61
Foundation V10.1.5.0(195100), 04-Jun-2021 16:58:43 Copyright 2021, VMware Inc - Build 65
Create a symbolic link - you might have to make some changes to the Smarts BASE_DIR path to reflect your environment.
mkdir /vmware
mkdir /vmware/musalp
mkdir /vmware/musalp/PERL
mkdir /vmware/musalp/PERL/perl-64
mkdir /vmware/musalp/PERL/perl-64/lib
cd /vmware/musalp/PERL/perl-64/lib
ln -s /opt/InCharge/IP/smarts/toolbox/perl/lib/5.32.0 5.32.0
Set up your environment - you might have to make some changes to the Smarts BASE_DIR path to reflect your environment.
/opt/InCharge/IP/smarts/bin/sm_perl /opt/InCharge/IP/smarts/perl/lib/sm_perl_cfgfix.pl
Install a C compiler.
yum install gcc.x86_64
download DBI-1.643.tar.gz, or some similar version.
cp DBI-1.643.tar.gz /tmp
cd /tmp
gunzip DBI-1.643.tar.gz
tar xvf DBI-1.643.tar
Compile the source – you might have to make some changes to the Smarts BASE_DIR path to reflect your environment.
cd /tmp/DBI-1.643
/opt/InCharge/IP/smarts/bin/sm_perl Makefile.PL
make
make test
make install
Create a test perl script to verify the module was compiled and installed successflly.Run your script - you might have to make some changes to the Smarts BASE_DIR path to reflect your environment.
vi /tmp/my_script.pl
use DBI;
Run your script - you might have to make some changes to the Smarts BASE_DIR path to reflect your environment.
/opt/InCharge/IP/smarts/bin/sm_perl -I /opt/InCharge/IP/smarts/perl/5.32.0/lib/ /tmp/my_script.pl
Note:
The sm_perl utility is packaged within the Smarts installer for internal perl related use-cases.
Attempts to make use of sm_perl for custom operations and assistance with respect to the same would be classified under the Customization Assistance Request.