Regarding ExecuteCommand()

Post Reply
ryan
Posts: 59
Joined: Thu May 26, 2011 5:04 am
OLAP Product: COGNOS
Version: 9.0
Excel Version: 2007

Regarding ExecuteCommand()

Post 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.
Configuration Details
Microsoft Window Server 2003 Exterprise x64 Edition Service Pack 2
RAM 32 GB
using IBM Cognos Express Xcelerator (Version 10.1)
MS-Office Excel 2010 (12.0.6514.5000)SP2 MSO (12.0.6425.1000)
Microsoft .NET Framework 3.5
John Hammond
Community Contributor
Posts: 300
Joined: Mon Mar 23, 2009 10:50 am
OLAP Product: PAW/PAX 2.0.72 Perspectives
Version: TM1 Server 11.8.003
Excel Version: 365 and 2016
Location: South London

Re: Regarding ExecuteCommand()

Post by John Hammond »

tm1 service needs to run under windows id with rights to do the copy
ryan
Posts: 59
Joined: Thu May 26, 2011 5:04 am
OLAP Product: COGNOS
Version: 9.0
Excel Version: 2007

Re: Regarding ExecuteCommand()

Post 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.
Configuration Details
Microsoft Window Server 2003 Exterprise x64 Edition Service Pack 2
RAM 32 GB
using IBM Cognos Express Xcelerator (Version 10.1)
MS-Office Excel 2010 (12.0.6514.5000)SP2 MSO (12.0.6425.1000)
Microsoft .NET Framework 3.5
User avatar
qml
MVP
Posts: 1096
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Regarding ExecuteCommand()

Post 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.
Kamil Arendt
lotsaram
MVP
Posts: 3702
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Regarding ExecuteCommand()

Post 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...
ryan
Posts: 59
Joined: Thu May 26, 2011 5:04 am
OLAP Product: COGNOS
Version: 9.0
Excel Version: 2007

Re: Regarding ExecuteCommand()

Post 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.
Configuration Details
Microsoft Window Server 2003 Exterprise x64 Edition Service Pack 2
RAM 32 GB
using IBM Cognos Express Xcelerator (Version 10.1)
MS-Office Excel 2010 (12.0.6514.5000)SP2 MSO (12.0.6425.1000)
Microsoft .NET Framework 3.5
Post Reply