We have to export the security file to current server and copy to another server.
We are exporting security file using EXPORT command in MaxL.
Now we need to copy the security file to another server(not manually), that we need to schedule for every day or week.
Because we are keeping both server in Sync.
Is it possible to copy the file to another server?
If possible Can you please advice any way to write script for the above.
Maxl export will Writes the contents of the Essbase security file (essbase.sec) to a readable, text file (ASCII format) on the system where Essbase Server resides.
Exporting the contents of the Essbase security file is useful when you want to review the security information for an Essbase Server instance.
It is not helpful in migrating the security.
Better you can extract the users, groups and filter information using maxl commands.
Generate maxl scripts to redefine the security in the new server and execute them.
Once both are sync, you can replicate the activities after so that both servers are in sync consistently.
As Srinivas says, you will want to parse the output of your 'display' commands on the source system into 'create' and 'grant' commands to run against the target system. Since the easiest way of staying in sync is to run this kind of process on a schedule, you could also automate the parse / script creation with the batch tool of your choice rather than using Excel.
You might want to look at whether Life Cycle Management will do what you want on security - maybe you could save yourself reinventing the wheel (I don't know).
For example, lets say you have run the command 'display group all' on your source system.
This will have produced an output containing two columns, group name and group description, which you have transferred to Excel. If you haven't already done so, use 'Text to Columns' in Excel so that each field from the output has its own column in Excel.
So now the name and description output from 'display group all' is sitting in column A and B of an Excel sheet. Suppose it looks like this:
Next you would create a formula in (e.g.) column C, something like this (untested, but you get the idea):
="create or replace group " & A1 & " comment '" & B1 "';"
This produces output like the following which you copy and paste to create a new MaxL script...
create or replace group MyGroup1 comment 'Users';
create or replace group MyGroup2 comment 'Superusers';
create or replace group MyGroup3 comment 'Administrators';
...to run against your target system.
You will need to repeat this process for each 'display' command - groups, users, filters, filter rows, privileges etc. The specifics of the 'display' output and the syntax of the associated 'create' or 'grant' statements can be found in the MaxL section of the Essbase Technical Reference.