When you open MaxL Script Editor or MDX Script Editor, the Essbase Servers that appear in your Enterprise View are displayed in a drop-down list on the toolbar. When you execute MaxL or MDX statements from the editor, the statements are executed against the Essbase Server that you select from the drop-down list. If you were not connected to the selected Essbase Server when you opened the script editor, you are connected to it when you execute the script. The connection remains intact until you disconnect.
If you execute a MaxL script that contains a login statement to the Essbase Server that is selected in the drop-down list, and if you are already connected to the selected Essbase Server, the existing connection is used. If you are not yet connected, a connection is established. If the script also contains a logout statement, that statement is ignored; the connection remains intact until you disconnect.
For MaxL scripts, if you want to send statements to multiple Essbase Servers, you can use the login and logout MaxL statements in combination with an Essbase Server selection from the drop-down list. For example, assume that you open MaxL Script Editor, select Server1 from the Essbase Server drop-down list, and open the following script:
display application; login user1 'password' on Server2; display application; display database; logout; display database;
The statements are executed as follows:
The first statement is executed on Server1.
The information in the second statement (login user1 'password' on Server2) is stored for use with the third statement.
The third statement is sent, with the connection information from the second statement, to Server2. If the connection is successful, the display application statement is executed against Server2. If the connection is not successful, an error is returned.
The fourth statement is sent, with the connection information from the second statement, to Server2. If the connection is successful, the display database statement is executed against Server2. If the connection is not successful, an error is returned.
The stored connection information from the second statement is removed.
The last statement is executed on Server1.
Note: | A login statement by itself does not immediately establish a connection with Essbase Server. When MaxL Script Editor encounters a login statement, it stores the connection information contained in the statement for use with subsequent statements. Therefore, if a login statement contains invalid information (for example, an incorrect password), no error is returned until a following statement is encountered. In addition, a logout statement with no preceding login statement is ignored by the editor. A logout statement by itself does not disconnect a user from Essbase Server. |