Friday, December 25, 2009

Auto Restart BO Servers with a Batch job and Schedule it

Video walkthrough (all the way at the bottom): How to automate Business Objects' Services/Servers in Central Configuration Manger so that they restart every night, every week or however you'd like to schedule them.

Topics Covered:
1) Creating a batch job to restart any/all Business Objects Services
2) Scheduling the batch job according to the need of your environment

Business Objects, as you all know (well, the BOE people at least) runs using several types of servers-which are called 'services' in Windows. But we will refer to them as 'servers' because that's how BO decided to call them and that's how we see them in CMC.

One of the most essential tasks of maintaining a promptly responsive, error free and fresh Business Objects environment is to restart Business Objects services on a regular basis. If you are an Admin or have access to the machine where your BO software is installed, you can see the activities of BO, including it's servers' activities from the Event Viewer. Every so often, there are warnings and errors that get generated by BO servers. Sometimes, the WebI Report Server may generate "...Communication failure" error or the CrystalRAS may generate some registry error, or the CMS may generate "Database Access Error..."; you get the idea.

Of course, you may Google the error messages and try to get to the bottom of the problem - which is the best approach, by the way, but if you just create a batch job to automatically restart all your BOE servers, you will see your environment performing significantly better and most errors will disappear.

I've seen on few sites the suggest the batch to restart the servers in this manner:


NET STOP “Web Intelligence Job Server”
NET START “Web Intelligence Job Server”

NET STOP “Program Job Server”
NET START “Program Job Server”

NET STOP “Report Application Server”
NET START “Report Application Server”

and so on - you get the idea. STOP and START a server right away. I, however have it set up slightly differently - STOP all and then START all. I don't know if mine is better or the aforementioned is better, but I like mine better because it just looks 'cool' and it has a symmetry to it. :)

For those of you who are like 'wtfff' at this point and or new BO admins setting up your 1st batch job, here's a brief intro to Command Prompt in Windows. Do this: Start > Run > CMD (and then hit enter). Type NET and hit Enter. These are the basic commands. We will use START and STOP commands for restarting BO servers because all BO servers are also found in the Services - Control Panel > Administrative Tools > Services or type "Services.msc" in the Run window (see above) and hit enter.

WARNING:  Make sure, you are NOT in your Production environment when you are trying / setting up this batch job. Because the moment you STOP a server - that's it, all users utilizing that server will get error message or a failure and if you happen to STOP CMS, then it'll be a chaos and you'll surely get some yelling from your boss. So, do you testing on your Development/Test environment and if you don't have any, schedule an outage and or take permission first.

Also, I came across many time where every server would STOP and START perfectly, except CMS-it doesn't start up, remains shut down. For that our systems analyst put a delay in between the STOP and START segment using the "sleep.exe" command, found in Windows Server 2003 Resource Kit Tools. And we also used the START command for CMS several times so that if the CMS doesn't start at the 1st attempt, it'll start up at one of the following attempts. If you do not have "sleep.exe" tool, then simply remove it from the code below and

NOTE: You must change the code below, because this code is meant for my environment only and every environment has as different number of servers that are up. For example, I have 4 Web Intelligence Report Servers, but you have only 2. So, edit/delete accordingly.


Code: BATCH Script to Automate Restarting of Business Objects Server  (click here to open the code below on a new page).

@echo off
rem
rem This script restart several services on this server (Business-Objects-Server)
rem
rem batch script created by: Administrator
rem batch script created on: 12242009

set log_file_fdr=C:\restart_service\logs
set log_file=bob_restart_svc.log
if not exist "%log_file_fdr%" md "%log_file_fdr%"

for /f "tokens=*" %%i in ('time/t') do set ttime=%%i
for /f "tokens=*" %%j in ('date/t') do set ddate=%%j

net stop "World Wide Web Publishing Service"
net stop "WinHTTP Web Proxy Auto-Discovery Service"
net stop "Crystal Reports Job Server (2)"
net stop "Crystal Reports Job Server"
net stop "Crystal Reports Page Server"
net stop "Crystal Reports Cache Server"
net stop "Program Job Server"
net stop "Report Application Server(4)"
net stop "Report Application Server(3)"
net stop "Report Application Server(2)"
net stop "Report Application Server"
net stop "Web Intelligence Job Server"
net stop "Web Intelligence Report Server(4)"
net stop "Web Intelligence Report Server(3)"
net stop "Web Intelligence Report Server(2)"
net stop "Web Intelligence Report Server"
net stop "Destination Job Server"
net stop "Event Server"
net stop "List of Values Job Server"
net stop "Output File Repository Server"
net stop "Input File Repository Server"
net stop "Connection Server"
net stop "Central Management Server"

sleep.exe 60

net start "Central Management Server"
net start "Connection Server"
net start "Input File Repository Server"
net start "Output File Repository Server"
net start "List of Values Job Server"
net start "Event Server"
net start "Destination Job Server"
net start "Web Intelligence Report Server"
net start "Web Intelligence Report Server(2)"
net start "Web Intelligence Report Server(3)"
net start "Web Intelligence Report Server(4)"
net start "Web Intelligence Job Server"
net start "Report Application Server"
net start "Report Application Server(2)"
net start "Report Application Server(3)"
net start "Report Application Server(4)"
net start "Program Job Server"
net start "Crystal Reports Cache Server"
net start "Crystal Reports Page Server"
net start "Crystal Reports Job Server"
net start "Crystal Reports Job Server (2)"
net start "WinHTTP Web Proxy Auto-Discovery Service"

net start "Central Management Server"

net stop "IISAdmin" /y
net start "IISAdmin"
net start "World Wide Web Publishing Service"
net start "FTP Publishing Service"
net start "HTTP SSL"
net start "Network News Transfer Protocol (NNTP)"
net start "Simple Mail Transfer Protocol (SMTP)"


sleep.exe 60

net start "Central Management Server"

sleep.exe 60

net start "Central Management Server"


echo %ddate% %ttime% Business-Objects-Server services have been restarted.>> "%log_file_fdr%\%log_file%"

:end
exit
------------------------------

Tuesday, December 22, 2009

How to Retreive List of Objects from an Universe

Visual walkthrough: How to extract list of all Objects, Conditions, Hierarchies, Tables, Joins, Contexts and Parameters from an Universe using Designer.

Topics Covered:
1) Exploring the Print/PDF Options of the Designer
2) Saving universe as PDF to get the list of all desired details of that universe

Steps:
[1] Once you have your universe opened, go to Tools > Options and select the appropriate options:



[2] Select your options. Make sure to select Objects and Hierarchies to get the tree structured view (see below, Step 6).



[3] Save the universe.



[4] Make sure to save the universe as PDF.



[5] Here's your universe summary:



[6] Universe details:



[7] And finally, snapshot of the actual universe; in this case, our favorite - Island Resort Marketing. You get the snapshot by selecting "Graphical Structure" from step 2.



End. 

Thursday, October 8, 2009

How to create Custom LOVs in Dimensions

Video walkthrough - How to Create and or Edit Custom List Of Values (LOVs) in Dimensions of Business Objects Universes.

Topics Covered:
1) Creating and Editing Context based Custom LOVs
2) Sneak peak at how Business Objects actually generates all Dimensions' List Of Values

Scenario:

You have 35 Customers which is tied to a "Customer" dimension. Amongst these customers, 25 of them made reservations and they are tied to a dimension called "Reservations" and 21 of them actually converted into sales and they are tied to "Sales" dimension.

While creating reports using the universe containing the above dimensions, if your Marketing team wants to see only the 25 customers in their Query filter or if your Accounting department wants to see only the 21 customers in their Query filter while building WebI reports, we'd need to create 2 additional dimensions based off of the original "Customer" dimensions and we may call them "Reservations Customers" and "Sales Customers". From the Designer, we will have to go to the properties of these latter 2 dimensions and modify their default LOV.

Once we've successfully created custom LOVs of the 2 new customer dimensions, then if the Marketing team and the Accounting team drags in their respective customer dimensions in their Query Filter, they will only see 25 and 21 customers, not the entire list of 35 customers.

See video for complete walkthrough...



Sunday, August 16, 2009

Migrate Universes from Development to Production

Universe Migration steps:

This is one of the ways to migrate a universe from Development to Production universe if you want to keep them consistent and identical.

We'll use a generic example: X and Y are the same universe in different environments-Development and Production respectively. It's always best practice to archive all universes that need to be updated, using Import Wizard's BIAR (Business Intelligence Archive Resource).

So we have:
* Dev Environment: Universe X
* Production Environment: Universe Y

1) Update: Universe X (add dimensions, tables, etc - update this universe)

2) Copy: Copy Universe X and name it "Universe X - Copy" (in Development)

3) Migrate: "Universe X - Copy" to Production from Development (Using Import Wizard)

4) Backup: Universe Y (Either create a copy of this in Production or BIAR it)

5) Designer: Open "Universe X - Copy" (in Production)

6) Data source: Update Data Source of "Universe X - Copy" with the Data Source of "Universe Y"

7) Publish to Prod: Rename / Replace "Universe X - Copy" to "Universe Y"

8) Delete Universe Connection that got carried over by "Universe X - Copy" from Dev to Production.

9) Delete "Universe X - Copy" from Production

10) Delete "Universe X - Copy" from Test

Finally, the updated Universe X from Development is now the new Universe Y in Production.

Friday, August 14, 2009

Free Hand SQL: Crystal Reports and Static Parameters

Video - Topics covered

(This is a follow up video of our previous videos on Crystal Reports (Standard Report Wizard on Crystal Reports XIR2 and Static Parameters in Crystal Reports.)

1) How to create Crystal Reports using free hand SQL.

2) How to Create Static Parameter with Static List of Values. (again, using free hand SQL).



Wednesday, July 22, 2009

Static Parameters in Crystal Reports

Video - Topics covered:

This is a follow up video of our previous video on How to create Crystal report using Standard Report Wizard.

1) Static Parameters - Static parameters are used in prompts values or List of Values that do not change, or do not change frequently. For example, if a report requires a prompt to select a particular State, it would ideal to use a Static LOVs because the number of states is unlikely to change any time soon. Also, static parameters are very fast becuase all the LOVs are loaded in the report and Crystal Reports does not have to query the data source to retrieve the LOVs.

2) Static List of Values - used by Static parameters, can be retrieved and stored with Static Parameters created on a Crystal report using the 'Append All Database Values' feature. You can also import the LOVs from external text files or simply type your own LOVs.





Tuesday, July 21, 2009

Standard Report Wizard on Crystal Reports XIR2

Video - Topics covered:

1) Standard Report Wizard - How to create Crystal reports using database tables - i.e. simply dragging and dropping tables and joining them - much like in Designer creating universes.

2) Group Expert - as it's name suggests, this is an extended front end version of the 'group by' function of Crystal reports. Very easy to use and very useful. Those of you who write SQL a lot, know sometime it gets very painful when using Group By clause in your code. Not in Crystal Reports.

3) Design view - introduction to the sectional layout of Crystal reports, including Report Header, Page Headers, Group Headers (if you do not use any grouping in your report, you won't have Group Headers), Details - main data, Group Footers, Report Footers , Page Footer. So, it looks like this in Design view:

Report Header
Page Header
Group Header
DETAILS
Group Footer
Report Footer
Page Footer

4) Select Expert (Selection Formulas) - The name of this feature isn't very intuitive but this can be thought of as an extended front end of version of Where clause. We can restrict and manipulate data using this feature. For example, if we wanted to assign a custom Parameter/promot to an available field, we would use Record Selection Formulas.

5) Formula Workshop - Formula Editor Very intuitive. You can create all sorts of formulas using SQL or Crystal syntax. For example, UPPERCASE, NULL behaviors, data type conversions, mathematical calculations and so on.