WELCOME TO OBIEE 12C: USING BI APPLICATION ARCHIVE (BAR) FILES - OBIEE GURU

govtjobonline-Latest Government Jobs 2023 Recruitment Notifications

Latest Govt Jobs Whatsapp Group Links-Telegram

For Latest Govt Jobs 2023 or for Freejobalerts or Join

Latest Government Jobs 2023

Saturday 19 August 2017

WELCOME TO OBIEE 12C: USING BI APPLICATION ARCHIVE (BAR) FILES

    BI Application Archive (BAR) files are zipped-up copies of the RPD, Catalog and Security model metadata from a Service Instance. When deploying your BI application from one server to another you can now use these BAR files to transfer your metadata rather than transferring the RPD, catalog and security model separately. It’s also a simple method of taking point in time backups of your application.
    There is no web based tool for administering BAR files, it’s all done at command line through the Weblogic Scripting Tool (WLST) which is invoked with the following command:
    <obiee_home>/oracle_common/common/bin/wlst.sh
    (or wlst.cmd for windows)
    A quick aside…to exit from the WLST command line use the exit() command – you must include the two brackets, ‘exit’ by itself doesn’t work!
    Also note that all WLST commands are case sensitive and do include both upper and lower case letters, so the listBIServiceInstances command below cannot be spelt listbiserviceinstances.

    Before we look at the commands for exporting & importing BAR files, there are some parameters you will need to know before we start.

    Domain Home: This is the directory of the domain for your BI Install, this will usually be <obiee_home>/user_projects/domains/bi
    Service Instance Key: The instance key of the BI Service you are interacting with. A Domain home can contain many instances and the name of the instance key you create during the installation. The default name is ‘ssi’, bit obviously could be different.
    To view all the service instances use the WLST command listBIServiceInstances(domainHome):
    listBIServiceInstances('/u01/app/obiee/user_projects/domains/bi')
    obiee12c_BAR_image2
    So here I have one ServiceInstance and its key is ssi.
    You also need a working directory and an export directory. The working directory is where the export command will temporarily store files during its processing. The export directory is where the BAR files will be stored.
    I’ve created two new directories for this: /u01/workDir and /u01/exportDir. Anywhere will do, as long as the OS user you are running the scripts under has read/write access.

    So to create a BAR file from your service instance use the exportServiceInstance command. This takes the following parameters:

    Domain Home: e.g. <obiee_home>/user_projects/domains/bi
    Service Instance Key: e.g. ssi
    The working directory: e.g. /u01/workDir
    The export directory: e.g. /u01/exportDir
    There are then three unused parameters, supposedly reserved for future changes to the export command.
    Include Catalog Runtime Info: The Runtime info is user-based information, such as the users own folders. By default this parameter is set to ‘false’. Use ‘true’ if you do want user info. This parameter is optional.
    Include Credentials: This is a password field to encrypt the database connection credentials in the RPD. This field is optional and if not included the connection credentials are not exported.
    With three unused parameters and the final two being option you can run the exportServiceInstance command with just the first four parameters:
    exportServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/workDir','/u01/exportDir')
    
    If you do want to specify the last two parameters then use quotes to pass over the three unused parameters, e.g.:
    
    exportServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/workDir','/u01/exportDir','','','',true,'Password1')
    obiee12c_BAR_image3
    A log file is created of the export, under <obiee_home> /user_projects/domains/bi/bilogs/service_instances/ssi/metadata/ but it just contains the same text displayed on the screen during the export process.
    The export file will be called serviceInstanceKey.bar, e.g. ssi.bar in my case, in the export directory.
    obiee12c_BAR_image4
    At this point I’d usually rename it to something more meaningful to indicate what’s in the export file and the date taken.
    Running the export without the user runtime info and credentials parameters does indeed produce a smaller file (only slightly in my case, I don’t have much in my test environment!)
    exportServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/workDir','/u01/exportDir')
    obiee12c_BAR_image5
    Now we can look at importing an Application Archive file. You can import into the same serviceInstance that it was exported from (effectively restoring the metadata), or into a different serviceInstance (on the same server or another).
    In the examples below I’m importing into a new OBIEE 12c installation on a different server, although the serviceInstance has the same key of ‘ssi’.
    Before importing the files they need to be FTP’d across to the server where they are being imported into. The import command doesn’t need a working directory like the export command and to import you do specify the name of the file (with its full path), it doesn’t have to be named after the serviceInstance Key.
    When importing a BAR file you can choose whether to import all three components (RPD, catalog, security model), or just selected elements.  To import a BAR file you need to use the importServiceInstance command. This takes the following parameters:
    Domain Home: e.g. <obiee_home>/user_projects/domains/bi
    Service Instance Key: Of the service you are importing into, which may be different to the one it was exported from.
    BAR file to import: The full path and filename of the BAR file
    Import the RPD?: Should the RPD be imported from the BAR file. The default value is true, change to false if not wanted.
    Import the WebCat?: Should the Web Catalog be imported from the BAR file. The default value is true, change to false if not wanted.
    Import the Security model: Should the security model be imported from the BAR file. The default value is true, change to false if not wanted.
    Include Credentials: This is the password used to encrypt the database connection credentials in the RPD. If not provided the connection credentials will not be imported.
    Now according to the System Administrators guide for OBIEE 12c, there are two more parameters, one for to determine if user run-time info should be imported and another asking for the include credentials password again. These are not required and will produce an error if used. The importServiceInstance command can only have a maximum of seven parameters.
    Only the first three parameters are compulsory, the others are all optional, however you must include all parameters up to the last one you specify (you can’t for instance include the credentials password without the three content import options before it).
    So an example of the shortest form of the command would be:
    importServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/importDir/ssi.bar')
    This would import the RPD, catalog and security model, but not the user runtime info. The connection credentials would not be imported(if they are even in the file)
    And the longest form:
    importServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/importDir/ssi.bar',true,true,true,'Password1')
    In this case everything is imported. In most cases when you’re using a frequently used script for deploying content, say from development to production, the following command is probably best:
    importServiceInstance('/u01/app/obiee/user_projects/domains/bi','ssi','/u01/importDir/ssi.bar',true,true,false,'Password1')
    This imports the RPD (with connection credentials) and the catalog but not the security model or the user run-time information.
    So an example of running it produces the following:
    obiee12c_BAR_image6
    The import has completed and appears to have been successful…and indeed it has, but initially things look a little odd…my user (paulc in the screenshots below) can see the new dashboard that was in the export and the dashboard has data, so the RPD must have loaded too (with the connection credentials):
    obiee12c_BAR_image7
    Also the catalog is showing the run-time user info (i.e. the reports I had saved into my folder) and I can see the Revenue Reports shared folder.
    obiee12c_BAR_image8
    But…my user paulc is an administrator and had full admin rights…but no I don’t have the Administration option in the menu bar and I can’t create new Analyses, filters or prompts!
    obiee12c_BAR_image9

    Even weirder, if I load the Admin tool and connect on-line only the Sample App metadata is there (which I deleted), there’s no sign of my revenue data metadata even though the revenue reports are working on the dashboard!
    obiee12c_BAR_image11
    Clearly something hasn’t been completed. The importServiceInstance seems to import things ok, but it doesn’t perform a restart of the OBIEE services and this is clearly what’s needed.
    So after performing a full restart using the normal stop & start scripts I now have my admin permissions back and the on-line RPD does show my metadata:
    obiee12c_BAR_image13
    So the answer is always restart OBIEE after performing a BAR import. You needed to when deploying an RPD in 11g via the enterprise manager, so it’s no worse than before.
    The real improvement is the ease with which you can now include catalog and user run-time info and that it can now be scripted rather than manually working through the enterprise manager screens – a big tick in the box from me!
    Enjoy!

    Whatsapp group

    Govt Jobs Whatsapp Group Links 2023

    Telegram group

    Govt Jobs Telegram Group

    Facebook group

    Govt Job Online Facebook Group

    Follow on Facebook group

    Govt Jobs Online Facebook Page

    Subscribe to Youtube Channel

    Govtjobsonline Youtube

    Join Latest Govt Jobs Telegram Group here

    Join Government Jobs Whatsapp Group here (State Wise)

    Join State Wise Sarkari Results Telegram here

    1. ITI Jobs Notifications
    2. ITI Apprenticeship Program
    3. Diploma Jobs Notifications
    4. Engineering Jobs Notifications
    5. UPSC Jobs Notifications
    6. Court Jobs Notifications
    7. Staff Nurse Jobs Notifications
    8. NHM Jobs Notifications
    9. Exam Syllabus and Pattern
    10. SSC Recruitment

    No comments:

    Post a Comment

    Latest Govt Jobs Vacancy 2023