11/20/09

Bulk User creation in Essbase

How can we create bulk users in Essbase ? say if there are 500 users need to be created at a time. what is the technique ?
Suppose you have 500 users in c:\user.csv, you can create batch of MaxL command using next JavaScript code. Copy the below code and name as gm.js, execute gm.js in Windows.

var fso = new ActiveXObject("Scripting.FileSystemObject");
var rs = fso.OpenTextFile("C:\ \user.csv");
var fso1 = new ActiveXObject("Scripting.FileSystemObject");

var ws = fso1.CreateTextFile("C:\ \MaxL.txt");
for(var i=1;i<=500;i++)
{
username = rs.ReadLine();
var x="create user " + username + "identified by " +"'password'" +" member of group " + "'testgroup'" ;
ws.WriteLine(x);
}

rs.Close();
ws.close();