Page 1 of 1

Regarding ExecuteCommand()

Posted: Mon Sep 26, 2011 1:46 pm
by ryan
In our organisation DWH, Cognos BI and TM1 are not integrated, they are running on three different server systems.
.csv file generated by TM1 process should be sent to the DWH system for further process. Since TM1 cannot place the files in network drives which are not part of the TM1 Content Server, I have written a batch file to copy the file from one server file location to another server file location.

The code in the batch file(abc.bat) goes:
XCOPY \\130.100.101.61\budget \\130.100.101.76\dwhfiles

When I run the batch file from command prompt I am able to move the files available in \\130.100.101.61\budget folder to \\130.100.101.76\dwhfiles folder. Where as when I use the same batch file in ExecuteCommand() I am unable to move the files between the above said folders.

code @TM1 process goes:
ExecuteCommand('c:\abc.bat',0);

Can anyone help me in achieving this.

Thanks in advance.

Re: Regarding ExecuteCommand()

Posted: Mon Sep 26, 2011 1:59 pm
by John Hammond
tm1 service needs to run under windows id with rights to do the copy

Re: Regarding ExecuteCommand()

Posted: Mon Sep 26, 2011 3:00 pm
by ryan
John Hammond wrote:tm1 service needs to run under windows id with rights to do the copy
DWTEST123 is windows id in which I am executing the command. I am obliged if could provide me the specific tm1 service.

Re: Regarding ExecuteCommand()

Posted: Mon Sep 26, 2011 3:15 pm
by qml
Every service, including your TM1 service, is running under an account. You can check what that account is by logging on to your server, running services.msc and checking this service's properties. Then you need to make sure this accounts has the rights to execute a copy between the two locations.

Re: Regarding ExecuteCommand()

Posted: Mon Sep 26, 2011 3:58 pm
by lotsaram
ryan wrote:In our organisation DWH, Cognos BI and TM1 are not integrated, they are running on three different server systems.
.csv file generated by TM1 process should be sent to the DWH system for further process. Since TM1 cannot place the files in network drives which are not part of the TM1 Content Server, I have written a batch file to copy the file from one server file location to another server file location.

The code in the batch file(abc.bat) goes:
XCOPY \\130.100.101.61\budget \\130.100.101.76\dwhfiles

When I run the batch file from command prompt I am able to move the files available in \\130.100.101.61\budget folder to \\130.100.101.76\dwhfiles folder. Where as when I use the same batch file in ExecuteCommand() I am unable to move the files between the above said folders.

code @TM1 process goes:
ExecuteCommand('c:\abc.bat',0);

Can anyone help me in achieving this.

Thanks in advance.
Hi Ryan,

Your "workaround" won't work if the tm1 service (tm1sd.exe as configured for your specific tm1 server, look at the service properties ...) is running under LOCAL. When you run the .bat file it works because you have access to both the source and target locations. However when you call ExecuteCommand in the TI process it is the account specified in the "Log On" tab of the service properties that is running the batch file. Therefore that account (whatever is it) needs to be 1) a network account (not a local machine account) and 2) needs to have at least write access to the source and target folders.

This is basically what you were told before but hopefully it is clearer now...

Re: Regarding ExecuteCommand()

Posted: Tue Sep 27, 2011 5:59 am
by ryan
lotsaram wrote:
ryan wrote:In our organisation DWH, Cognos BI and TM1 are not integrated, they are running on three different server systems.
.csv file generated by TM1 process should be sent to the DWH system for further process. Since TM1 cannot place the files in network drives which are not part of the TM1 Content Server, I have written a batch file to copy the file from one server file location to another server file location.

The code in the batch file(abc.bat) goes:
XCOPY \\130.100.101.61\budget \\130.100.101.76\dwhfiles

When I run the batch file from command prompt I am able to move the files available in \\130.100.101.61\budget folder to \\130.100.101.76\dwhfiles folder. Where as when I use the same batch file in ExecuteCommand() I am unable to move the files between the above said folders.

code @TM1 process goes:
ExecuteCommand('c:\abc.bat',0);

Can anyone help me in achieving this.

Thanks in advance.
Hi Ryan,

Your "workaround" won't work if the tm1 service (tm1sd.exe as configured for your specific tm1 server, look at the service properties ...) is running under LOCAL. When you run the .bat file it works because you have access to both the source and target locations. However when you call ExecuteCommand in the TI process it is the account specified in the "Log On" tab of the service properties that is running the batch file. Therefore that account (whatever is it) needs to be 1) a network account (not a local machine account) and 2) needs to have at least write access to the source and target folders.

This is basically what you were told before but hopefully it is clearer now...
ThanQ guys, once I made the tm1sd.exe service as network account working file.