export database ‘AppName.’DbName’ using server report_file ‘ReportFileName’ to data_file ‘D:\export.txt’;
When the above line is executed from a MaxL editor in EAS, it writes to the specified path on the server but not client.
How do we make it work to write to a client?
Share a folder on your machine to yourself with Full control & use that UNC path to export the file…
export database ‘AppName.’DbName’ using server report_file ‘ReportFileName’ to data_file ‘\\ComputerName\SharedFolder\export.txt’;
Did it work? No, it errors out saying…
Unable to open file ['\ComputerName\SharedFolder\export.txt']
If you have noticed, you will find that there is only a single backslash before the ComputerName when there should be two. Ok, so now try this one…
export database ‘AppName.’DbName’ using server report_file ‘ReportFileName’ to data_file ‘\\\\ComputerName\SharedFolder\export.txt’;
Still errors out but you are seeing it correct with two backslashes…
Unable to open file ['\\ComputerName\SharedFolder\export.txt']
This is because of the security of the shared folder… we had given the share a permission to ourselves thinking we are executing it but that is not how it looks to be working.
We have to give the Essbase server the permission to write to the location…
- Right click on the folder & select properties.
- Click on the Sharing tab & add the Essbase server with Change & Read permission. Full Control is not required. Also remove the Everyone
- Now go to the security tab & add the Essbase server with Write & Modify permission.
Now try to execute the script again, now it should work. If it doesn’t work feel free to play around with security & try again.