ExecuteCommand on SFTP file transfer

Post Reply
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

ExecuteCommand on SFTP file transfer

Post by fleaster »

Ok, am tearing out my hair on this one (not that I had much in the first place!) - am trying to trigger an SFTP file transfer via TI, but it does not appear to be working.

Code: Select all

Command1 = 'cmd /c scp2 \\APAUSXXXX\TM1\TempTest\TEST_SFTP_170919-1010.txt ufbXXXX@XXXXX1012.apac.XXXXXXXX.net:/var/app/XXXXXXXXXXXX/apac/uat1/AU/ODS/TEST_SFTP_170919-1010.txt' ;

ExecuteCommand(Command1, 1);
Considerations:
1. the command line works perfectly when executed from the server in DOS
2. similarly a .bat file with this command line works perfectly on the server
3. when the same command line is executed using TI, nothing happens
4. when the same .bat file is executed using TI, nothing happens
5. tested a simple DOS copy function executed from TI, and it works fine

...what other factors should I test? any ideas what the issue could be? :)

thanks!

Matt
Last edited by fleaster on Thu Oct 05, 2017 12:12 am, edited 1 time in total.
AmbPin
Regular Participant
Posts: 173
Joined: Sat Mar 20, 2010 3:03 pm
OLAP Product: TM1
Version: 9.5.2
Excel Version: 2007-10

Re: ExecuteCommand on SFTP file transfer

Post by AmbPin »

Does the account that the TM1 service is running as have all necessary permissions?
Yo could test this by right-click and run-as on your BAT file using the TM1 service account credentials.
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: ExecuteCommand on SFTP file transfer

Post by Drg »

1. Run service as user with same premission
2. cmdd= 'cmd /c " YOUR COMMAND HERE "';
3. Maybe need use powershell ????
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: ExecuteCommand on SFTP file transfer

Post by fleaster »

Thanks for the responses... yes, I have run it via direct logon to the server and it works perfectly... might have a look into Powershell, otherwise am not sure what else can be tried :(

M.
Drg
Regular Participant
Posts: 159
Joined: Fri Aug 12, 2016 10:02 am
OLAP Product: tm1
Version: 10.2.0 - 10.3.0
Excel Version: 2010

Re: ExecuteCommand on SFTP file transfer

Post by Drg »

fleaster wrote: Tue Sep 19, 2017 11:24 pm Thanks for the responses... yes, I have run it via direct logon to the server and it works perfectly... might have a look into Powershell, otherwise am not sure what else can be tried :(

M.
Use double quotes!!!
dr.nybble
MVP
Posts: 160
Joined: Wed Aug 17, 2011 3:51 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: Excel 2007

Re: ExecuteCommand on SFTP file transfer

Post by dr.nybble »

Process Monitor can be a helpful tool to diagnose what is going on as well (https://docs.microsoft.com/en-us/sysint ... ds/procmon)
Post Reply