Using WLST

Every Oracle BI Administrator should know the WLST. Eventually, the need will arise to use some advanced features against the application server - WLS - that hosts Oracle BI in order to automate or make short work of repetitive functions. In Oracle BI 12c, it's the lifecycle-management tools where administrators will make the most use of WLST. WLST is one of the ways in which you can interface with the application server. WLST is fairly straightforward to use. Its command-line interface is launched from a directory underneath the ORACLE_HOME installation root of Oracle BI 12c; typically, on the server for which the installation resides. However, WLST, when located on a networked server, may communicate with any another WebLogic Server located on the network.

Let's conduct a quick exercise that will show you how to launch the WLST interface. In addition, you'll run a few quick commands to return some simple data from the WLS server.

  1. Launch WLST from a Terminal or command-prompt window on the server where Oracle BI 12c is installed, using the path and command, <ORACLE_HOME>oracle_commoncommoninwlst.cmd:

    Example: C:obieeoracle_commoncommoninwlst.cmd

    Using WLST

    On a Nix OS, launch WLST using the./wlst.sh command in the similar path, <ORACLE_HOME>/oracle_common/common/bin/.

    The script first attempts to load a series of environment variables into the Terminal session so that WLST's required libraries can be assessed. This is all part of the program's procedure before the WLST engine can be ready for use on the command prompt or Terminal. As the launch message states, it can take up to a few minutes for the WLST prompt to ready itself for use.

    Once the environment variables have been loaded, you will be presented with a command-prompt cursor and are ready to access the WLST program in offline mode.

    Note

    Be sure to launch the WLST command from the file path specified above. Use the command-prompt or Terminal window so that you can view the output in real time. There are other ways to launch WLST, but those methods will not provide you with the access that you need for Oracle BI.

  2. At the command prompt, connect to the WLS server by entering the following and pressing Enter:

    connect('weblogic', '<password>','<server_name>:<port>');

    Example:

    connect('weblogic', 'Admin123','localhost:9500');

    Using WLST

    If the WLS server is running and the credentials are valid, a successful connection message will be returned. With a successful online connection, there are many commands that could be entered to explore the WebLogic Server, and to a small degree the Oracle BI server. To keep your first foray into WLST simple but powerful, let's programmatically create an embedded WLS LDAP user.

  3. Enter the following code lines into the command prompt; each line break should be a new line by pressing Enter:

    dauth=cmo.getSecurityConfiguration().getDefaultRealm().lookupAuthenticationProvider("DefaultAuthenticator")

    dauth.createUser('obi12cbook','Admin123','OBI 12c Book User')

  4. The result should be the silent (that is, no response message) creation of a new user within the WLS embedded LDAP directory.
  5. Quickly breaking down the preceding code, the first line instantiates the look-up function call for the identity provider defined as the argument. As we saw when walking through the WLS administration console, there are two default identity providers, one of which is named DefaultAuthenticator.
  6. The second line makes reference to the now instantiated dauth object and calls the createUser function, passing three arguments to the parameters: username, password, and username alias.

    Note

    Syntax errors are bound to happen when working with WLST as the code is case-sensitive. One point to note is that the majority of WLST commands comply with the camel-case coding convention.

  7. Open the WLS administration console and navigate to the myrealm Security Realm User and Groups tab. Refresh the page if needed to see the new user that you just created:

    Using WLST

  8. You could nearly manage all WLS operations via WLST. There is an entire document, http://docs.oracle.com/cd/E15523_01/web.1111/e13813/toc.htm, dedicated to WLST, which comes with the WLS offering from Oracle. The information we've offered gives you a practical insight into how to get started with WLST, as well as giving you an idea of what else it can do for you. For quick assistance, you can always type the, help(), command from the WLST prompt to get more information on using the tool.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.104.160