Bo Xi r2 Query Builder Training
Bo Xi r2 Query Builder Training
Overview
The purpose of the this document is to introduce Technical Engineers to
the BusinessObjects XI Release 2 Query Builder. The Query Builder is a
useful application that allows users to query the Central Management
Server (CMS) for object information that may not be readily available
through the default Central Management Console (CMC) or InfoView
user interface.
Contents
PREREQUISITES .......................................................................................... 3
QUERY BUILDER ......................................................................................... 3
ACCESSING THE QUERY BUILDER ................................................................ 3
QUERY BUILDER HELP FILES ....................................................................... 4
SELECT Properties......................................................................................5
InfoObject Properties...................................................................................... 5
ProcessingInfo Properties .............................................................................. 6
SchedulingInfo Properties ............................................................................. 7
System Properties ........................................................................................... 8
CI_INFOOBJECTS .......................................................................................... 8
CI_SYSTEMOBJECTS ..................................................................................... 8
CI_APPOBJECTS............................................................................................. 9
WHERE Condition......................................................................................9
CMS Performance and Processing the WHERE Condition....................... 9
Using the TOP N function ........................................................................... 10
6/13/2007 10:42:00 AM
Page 1
SI_NAMEDUSER.......................................................................................... 13
SI_NEXTRUNTIME ...................................................................................... 13
SI_OWNERID................................................................................................ 14
SI_PARENTID ............................................................................................... 14
SI_PLUGIN_OBJECT.................................................................................... 14
SI_RECURRING............................................................................................ 14
SI_RUID.......................................................................................................... 14
SI_RUNNABLE_OBJECT............................................................................. 14
SI_SCHEDULE_STATUS ............................................................................. 14
SI_UPDATE_TS............................................................................................. 15
SI_INSTANCE ............................................................................................... 15
Crystal Report............................................................................................27
View Latest Instance ID of Report .............................................................. 27
Retrieve All Instances for a Report Object................................................. 27
Counting the Number of Historical Instances for a Report..................... 28
List Report Parameter................................................................................... 29
Finding FRS Location for Report ................................................................ 29
Reporting Database Logon Information .................................................... 29
Desktop Intelligence...................................................................................39
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 2
Scheduling .................................................................................................43
Determining Report Scheduling Status...................................................... 43
All Recurring Scheduled Reports ............................................................... 44
General Scheduled Report Information ..................................................... 44
Servers .......................................................................................................46
Servers Registered with the CMS ............................................................... 46
Current CMS Load........................................................................................ 46
Listing CMS Members in the Cluster ......................................................... 47
Server IOR (Interoperable Object Reference) ............................................ 47
Authentication...........................................................................................47
Authentication Used to Logon .................................................................... 47
Authentication Plug-in Information........................................................... 48
LDAP Configuration Information .............................................................. 48
Windows AD Configuration Information ................................................. 50
Prerequisites
It is recommended that you have access to a BusinessObjects XI Release 2
installation before continuing with the rest of the documentation.
Query Builder
The BusinessObjects XI Release 2 Query Builder is a sample application
that enables users to submit simple SELECT statements to retrieve
information from the CMS InfoStore. Although the query language is a
subset of the commonly used Structured Query Language (SQL), it does
not support table joins or embedded SELECT statements.
The syntax of a typical SELECT statement follows:
SELECT <Properties>
FROM <Categories>
WHERE <Conditions>
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 3
Figure 1
Once the link is clicked, the logon dialog appears (see Figure 2). Note
that your query results are dependent on your user rights within the
Enterprise system so you should use an Enterprise account with
Administrator rights.
Figure 2
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 4
Figure 3
SELECT Properties
The Query Language Reference lists four primary property types (see
Figure 4) that can be accessed from a query result. A brief definition of
each is provided below.
Figure 4
InfoObject Properties
The InfoObject contains all the properties used to describe a
BusinessObjects Enterprise object that is stored in the Central
Management Server (CMS) repository.
The image below lists some of the available properties you can add to
the SELECT statement (see Figure 5). The properties are logically named
so finding what you need is not difficult. A brief definition of each
property is also provided in the pane to the right for each property.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 5
Figure 5
ProcessingInfo Properties
The ProcessingInfo properties contain the information related to the
processing of a report object. This includes properties such as, the
database logon, the report format, prompting, the selection formula, and
the printer information.
To query for processing information you must add the
SI_PROCESSINFO prefix first and then the property name afterwards.
For example, to verify if a report object contains a default database
logon, parameter value and record selection formula, add the following
properties to your SELECT statement:
SELECT
SI_PROCESSINFO.SI_DBNEEDLOGON,
SI_PROCESSINFO.SI_LOGON_INFO,
SI_PROCESSINFO.SI_PROMPTS,
SI_PROCESSINFO.SI_RECORD_FORMULA
FROM
CI_INFOOBJECTS
WHERE
SI_ID = Report ID
The image below lists some of the available properties you can add to
your SELECT statement (see Figure 6). A brief definition of each
property is also provided in the pane on the right for each property.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 6
Figure 6
SchedulingInfo Properties
The SchedulingInfo properties are related to the scheduling of an
InfoObject. These properties mostly include the how, where, and when a
report will be processed.
To query for scheduling information you must add the
SI_SCHEDULEINFO prefix first and then the property name after.
For example, if a user needs to verify the current processing state of a
report and the machine the report is currently being processed on, a user
can add the following properties in their SELECT statement:
SELECT
SI_SCHEDULEINFO.SI_PROGRESS,
SI_SCHEDULEINFO.SI_MACHINE_USED
FROM
CI_INFOOBJECTS
WHERE
SI_ID = Report ID
The image below shows some of the available properties you can add to
your SELECT statement (see Figure 7). A brief definition of each
property is also provided in the pane on the right for each property.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 7
Figure 7
System Properties
System properties provide information about the system and its
administrative functions such as the CMS cluster name and the CMS
cluster members.
The image below shows the available properties you can add to your
SELECT statement (see Figure 8). A brief definition of each property is
also provided in the pane on the right for each property.
Figure 8
CI_INFOOBJECTS
The info object table allows users to retrieve folder, report and report
instance information from the CMS InfoStore.
CI_SYSTEMOBJECTS
The system object table allows users to retrieve information regarding
servers, users, groups, destinations and events from the CMS InfoStore.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 8
CI_APPOBJECTS
The application object table allows users to retrieve information
regarding business views, business view connections, universe
connections, universes, list of values, command objects, repository
objects and Business Objects applications.
WHERE Condition
A good rule of thumb when creating queries is to use indexed properties
in the WHERE clause to narrow down your result set. The more you are
able to filter down the result set using indexed fields the better.
As well, adding as many indexed fields within the same sized result set
may not necessarily improve performance.
For example, if you have the SI_SCHEDULE_STATUS condition in your
predicate, adding another indexed property like SI_INSTANCE will not
improve performance. If SI_SCHEDULE_STATUS is equal to 1,
SI_INSTANCE must be equal to 1 so adding SI_INSTANCE will only
add additional processing overhead in the query.
In the query above, the CMS will retrieve all the instances in the system
first and then search through the result set (from only those objects
whose SI_INSTANCE property = 1) for the report named Test Report.
More Efficient:
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 9
SELECT
*
FROM
CI_INFOOBJECTS
WHERE
SI_NAME='Test Report' AND SI_INSTANCE=1
In the case above, the CMS will only retrieve reports named Test
Report and then search through the result set (from only those objects
whose SI_NAME = Test Report for report instances.
SI_CUID
This is the unique cluster ID of the InfoObject. This property uniquely
identifies objects within the Enterprise cluster. If the object is migrated to
a different deployment of Enterprise, the SI_CUID remains the same so
the ID reference is not corrupted.
SI_GUID
This is the unique global object ID of the InfoObject. This property is a
globally-unique identifier for an object. If the object is migrated to a
different deployment of Enterprise, the SI_GUID changes.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 10
SI_HIDDEN_OBJECT
This property indicates whether or not an object is hidden.
To query for hidden objects, you must specify that SI_HIDDEN_OBJECT
= 1 or SI_HIDDEN_OBJECT != 0; otherwise, by default, only non-hidden
objects are returned.
SI_ID
This is a number that uniquely identifies an object in the Enterprise
system. The number is assigned at creation time, and is never changed
until the object is destroyed. No two objects have the same ID, even if
they are different types of objects; that is, you will never find a report
that has the same ID as a folder.
SI_INSTANCE_OBJECT
This is a boolean value specifying whether or not the Enterprise object is
a report instance that is the result of a job that has already run. Instead of
using SI_INSTANCE_OBJECT to determine the status of an instance, it is
recommended that you use SI_SCHEDULE_STATUS Property. An
instance may be runnable (it is scheduled to run and create another
instance), or it may not be runnable (it is the result of a job that has
already run). Use this property to retrieve only those instances that have
already been run, and the SI_RUNNABLE_OBJECT Property to retrieve
only those instances that are runnable.
Values set in BOOLEAN:
1 = True
0 = False
6/13/2007 10:42:00 AM
ProgID
SI_KIND
CrystalEnterprise.AuditAdmin
AuditAdmin
CrystalEnterprise.CacheServerAdmin
CacheServerAdmin
CrystalEnterprise.Calendar
Calendar
bo_xi_r2_query_builder_training.pdf
Page 11
6/13/2007 10:42:00 AM
CrystalEnterprise.Category
Category
CrystalEnterprise.CMSAdmin
CMSAdmin
CrystalEnterprise.Connection
Connection
CrystalEnterprise.Report
CrystalReport
CrystalEnterprise.Diskunmanaged
Diskunmanaged
CrystalEnterprise.Event
Event
CrystalEnterprise.EventServerAdmin
EventServerAdmin
CrystalEnterprise.Excel
Excel
CrystalEnterprise.FavoritesFolder
FavoritesFolder
CrystalEnterprise.Folder
Folder
CrystalEnterprise.FileServerAdmin
FileServerAdmin
CrystalEnterprise.Ftp
Ftp
CrystalEnterprise.FullClient
FullClient
CrystalEnterprise.Hyperlink
Hyperlink
CrystalEnterprise.Inbox
Inbox
CrystalEnterprise.JobServerAdmin
JobServerAdmin
CrystalEnterprise.LicenseKey
LicenseKey
CrystalEnterprise.Managed
Managed
CrystalEnterprise.ObjectPackage
ObjectPackage
CrystalEnterprise.Overload
Overload
CrystalEnterprise.PageServerAdmin
PageServerAdmin
CrystalEnterprise.PersonalCategory
PersonalCategory
CrystalEnterprise.Pdf
CrystalEnterprise.Powerpoint
Powerpoint
CrystalEnterprise.Profile
Profile
CrystalEnterprise.Program
Program
CrystalEnterprise.Publication
Publication
bo_xi_r2_query_builder_training.pdf
Page 12
CrystalEnterprise.ReportAppServerAdmin ReportAppServerAdmin
CrystalEnterprise.Rtf
Rtf
CrystalEnterprise.Server
Server
CrystalEnterprise.Shortcut
Shortcut
CrystalEnterprise.Smtp
Smtp
CrystalEnterprise.SSOAdmin
SSOAdmin
CrystalEnterprise.Txt
Txt
CrystalEnterprise.Universe
Universe
CrystalEnterprise.User
User
CrystalEnterprise.Usergroup
Usergroup
CrystalEnterprise.Webi
Webi
CrystalEnterprise.WebiServerAdmin
WebiServerAdmin
CrystalEnterprise.Word
Word
SI_NAME
This property stores the name of an object. It can be used both to display
the object's name and to search for a particular object. This is not a
unique value; therefore, different objects may have the same names. To
list objects by a unique value use the SI_ID property.
SI_NAMEDUSER
Returns True if the license being used is a named user. If False, the
license being used is a concurrent user.
Values set in BOOLEAN:
1 = True
0 = False
SI_NEXTRUNTIME
This property stores the date and time when the report will next be run.
The format of the date in the query string must be
yyyy.mm.dd.hh.mm.ss, where you can omit anything starting from the
right, and the separator can be any separator character. The time part
must be in UTC time (GMT with no daylight savings) and it must use the
24 hour clock.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 13
SI_OWNERID
The ID of the user who owns the InfoObject. This property can be used
to list all the reports, and folders, for a particular user. Similar to the
SI_ID property, this value is unique.
SI_PARENTID
The SI_PARENTID property is a numeric Long value; it refers to the
unique ID for a particular object's parent. It can be used to locate all the
children for a particular object.
SI_PLUGIN_OBJECT
Returns True if the InfoObject is a plug-in, and False otherwise.
Value is set as BOOLEAN:
1 = True
0 = False
SI_RECURRING
Returns True if the InfoObject is a recurring instance, and False
otherwise. An instance that is recurring is also runnable. However, a
runnable instance may not be recurring. To retrieve only runnable
objects, use the SI_RUNNABLE_OBJECT Property. To check the current
status of an instance, use the SI_SCHEDULE_STATUS Property
Value is set as BOOLEAN:
1 = True
0 = False
SI_RUID
Returns the unique ID of the InfoObject in the object package.
SI_RUNNABLE_OBJECT
Returns True if the report object is runnable, and False otherwise.
Value is set as BOOLEAN:
1 = True
0 = False
SI_SCHEDULE_STATUS
The current status of the scheduled job.
Schedule Status Values:
Value Description
3
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 14
SI_UPDATE_TS
This is a time stamp property that stores the last time the object was
modified. An object is modified when any of its properties change. Note
that although the date is returned in the format MM/DD/YYYY
HH:MM:SS AM/PM, the format of the date in the query string must be
yyyy.mm.dd.hh.mm.ss, where you can omit anything starting from the
right, and the separator can be any separator character. The time part
must be in local time and it must use the 24 hour clock.
SI_INSTANCE
This property can be used to find all instances of a particular report.
When a report is scheduled to run on a recurring basis (for example,
hourly), two instances are created: a runnable instance, which is able to
run and create another instance, and an instance object, which is the
result of a job that has already run. Use the SI_RUNNABLE_OBJECT
property to retrieve only those instances that are runnable, and use the
SI_INSTANCE_OBJECT property to retrieve only those instances that
have already been run.
Values set as BOOLEAN:
1 = True
0 = False
bo_xi_r2_query_builder_training.pdf
Page 15
database fields (non-binary) that you can use to query directly against
the database.
Equivalencies Table
CMS
Database Field
Enterprise
SDK Property
CMS_INFOOBJECTS5.OBJECTID
SI_ID
CMS_INFOOBJECTS5.PARENTID
SI_PARENTID
CMS_INFOOBJECTS5.OWNERID
SI_OWNERID
CMS_INFOOBJECTS5.TYPEID
SI_OBTYPE
CMS_INFOOBJECTS5.SCHEDULESTATUS
SI_SCHEDULE_STATUS
CMS_INFOOBJECTS5.NEXTRUNTIME
SI_NEXTRUNTIME
CMS_INFOOBJECTS5.LASTMODIFYTIME
SI_UPDATE_TS
CMS_INFOOBJECTS5.SI_INSTANCE_OBJECT
SI_INSTANCE_OBJECT
CMS_INFOOBJECTS5.SI_PLUGIN_OBJECT
SI_PLUGIN_OBJECT
CMS_INFOOBJECTS5.SI_HIDDEN_OBJECT
SI_HIDDEN_OBJECT
CMS_INFOOBJECTS5.SI_NAMEDUSER
SI_NAMEDUSER
CMS_INFOOBJECTS5.SI_RECURRING
SI_RECURRING
CMS_INFOOBJECTS5.RUNNABLE_OBJECT
SI_RUNNABLE_OBJECT
CMS_INFOOBJECTS5.OBJECTID
The main purpose of running a direct query against the database is to
further narrow down your record set by collecting the OBJECTIDs
(SI_IDs) necessary for your SDK query. Once the OBJECTIDs are
collected you can run a more efficient query in the Query Builder using
the IN operator in the WHERE clause.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 16
For example, to collect the OBJECTIDs for all recurring reports in the
system database, run the following query:
If you do not know how to write your own SQL against the CMS database create a
Crystal, Web Intelligence, or Desktop Intelligence report to filter the data.
SELECT
ObjectID
FROM
CMS_InfoObjects5
WHERE
(SI_RECURRING = 1) AND (SI_RUNNABLE_OBJECT = 1)
CMS_INFOOBJECTS5.PARENTID
The PARENTID field is the best filter strategy for your WHERE clause.
Every InfoObject within the CMS database will always have a
PARENTID.
If we start at the lowest level, ObjectID 11, 12, 7006, 7010,.. PARENTID
will be 19 since the objects live beneath ObjectID 19 (19 Users), and
ObjectID 19 (19 Users) PARENTID will be 4 since it lives beneath
ObjectID 4 (4 SMARTYPANTS.CRYSTALD.NET) (see Figure 9).
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 17
Figure 9
SELECT
ObjectID
FROM
CMS_InfoObjects5
WHERE
(PARENTID = 19) AND (TYPEID = 19)
Result Set Sample for ObjectID = (11, 12, 7006, 7010, 7014, 7018, 7022,
7026)
The TYPEID property is used to further ensure that the object retrieved is
a user object. For more information on the TYPEID property see the
CMS_INFOOBJECTS5.TYPEID section.
With the result set collected, run the following SDK query in the Query
Builder to translate all of the binary properties:
Query Builder SQL:
SELECT
*
FROM
CI_SYSTEMOBJECTS
WHERE
SI_ID IN (11, 12, 7006, 7010, 7014, 7018, 7022, 7026)
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 18
CMS_INFOOBJECTS5.OWNERID
The OWNERID field is rarely used to query the database other than to
find how many objects a particular user owns within the XI Release 2
system.
If the OWNERID information is required, use an SDK query to identify
the SI_OWNERID first in order to find your information. Since the
OWNERID field is stored as a number it will hold very little value until
you find out the username that is assigned to the unique value.
Run the following SDK query to get the SI_OWNERID value for a user.
Query Builder SQL:
SELECT
SI_NAME, SI_OWNERID
FROM
CI_SYSTEMOBJECTS
WHERE
SI_NAME = Username AND SI_KIND = User
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 19
CMS_INFOOBJECTS5.TYPEID
The SI_KIND and SI_PROGID SDK properties are stored in the database
as binary fields; therefore, the TYPEID field must be used to filter out
specific object types if required.
The table below links the static TYPEID value for each InfoObject type
available within the XI Release 2 system. Note that these values may
change between Enterprise product versions. The following is a listing
for XI Release 2 only:
6/13/2007 10:42:00 AM
TYPEID
ProgID
SI_KIND
22
CrystalEnterprise.Calendar
Calendar
45
CrystalEnterprise.Category
Category
41
CrystalEnterprise.Connection
Connection
CrystalEnterprise.Report
CrystalReport
331
CrystalEnterprise.Diskunmanaged
Diskunmanaged
21
CrystalEnterprise.Event
Event
319
CrystalEnterprise.Excel
Excel
18
CrystalEnterprise.FavoritesFolder
FavoritesFolder
CrystalEnterprise.Folder
Folder
11
CrystalEnterprise.FullClient
FullClient
310
CrystalEnterprise.Hyperlink
Hyperlink
48
CrystalEnterprise.Inbox
Inbox
24
CrystalEnterprise.LicenseKey
LicenseKey
290
CrystalEnterprise.ObjectPackage
ObjectPackage
280
CrystalEnterprise.Overload
Overload
47
CrystalEnterprise.PersonalCategory
PersonalCategory
279
CrystalEnterprise.Pdf
278
CrystalEnterprise.Powerpoint
Powerpoint
bo_xi_r2_query_builder_training.pdf
Page 20
277
CrystalEnterprise.Profile
Profile
276
CrystalEnterprise.Program
Program
275
CrystalEnterprise.Publication
Publication
270
CrystalEnterprise.Rtf
Rtf
16
CrystalEnterprise.Server
Server
CrystalEnterprise.Shortcut
Shortcut
265
CrystalEnterprise.Txt
Txt
264
CrystalEnterprise.Universe
Universe
19
CrystalEnterprise.User
User
20
CrystalEnterprise.Usergroup
Usergroup
260
CrystalEnterprise.Webi
Webi
259
CrystalEnterprise.Word
Word
The following SQL will perform a count of all the Crystal Reports owned
by the Administrator account:
Direct Database SQL:
SELECT
COUNT(OBJECTID)
FROM
CMS_InfoObjects5
WHERE
OWNERID = 12 and TYPEID = 2
CMS_INFOOBJECTS5.SCHEDULESTATUS
Be cautious when using the SCHEDULESTATUS field when directly
querying the system database. Some of the values have more than one
meaning.
For example, When looking at the values available in the table, a value of
9 may mean the scheduled job is in pending state because it is waiting
for a file event, schedule event, or it has not reached its next runtime.
The most reliable values are 3 or 1 since these values do not change over
time.
6/13/2007 10:42:00 AM
Value
Description
bo_xi_r2_query_builder_training.pdf
Page 21
To find the number of failed jobs within the XI Release 2 system use the
following SQL:
Direct Database SQL:
SELECT
COUNT(OBJECTID)
FROM
CMS_InfoObjects5
WHERE
SCHEDULESTATUS = 3
CMS_INFOOBJECTS5.NEXTRUNTIME
Do not use this field to filter. The field is not declared as a DATETIME
field but a VARCHAR. Your results will be incorrect.
CMS_INFOOBJECTS5.LASTMODIFYTIME
Do not use this field to filter. The field is not declared as a DATETIME
field but a VARCHAR. Your results will be incorrect.
CMS_INFOOBJECTS5.SI_INSTANCE_OBJECT
The SI_INSTANCE_OBJECT field can be used to collect all successfully
run jobs. The field can be used to distinguish between the recurring
instances and archived instances within the system. If the value is True
(1), the object is an archived instance and cannot be run again.
To collect all the archived instances within the system run the following
query:
Direct Database SQL:
SELECT
ObjectID
FROM
CMS_InfoObjects5
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 22
WHERE
SI_INSTANCE_OBJECT = 1
Result Set Sample for ObjectID = (11, 12, 7006, 7010, 7014, 7018, 7022,
7026)
Use the result set to run the following Enterprise SDK query:
Query Builder SQL:
SELECT
*
FROM
CI_INFOOBJECTS
WHERE
SI_ID IN (11, 12, 7006, 7010, 7014, 7018, 7022, 7026)
CMS_INFOOBJECTS5.SI_NAMEDUSER
The SI_NAMEDUSER field can be used to return all named or
concurrent users within the XI Release 2 system.
Set the value to True (1) for named users and False (0) for concurrent
users in the WHERE clause.
The following query will return only the named users within the system:
Direct Database SQL:
SELECT
ObjectID
FROM
CMS_InfoObjects5
WHERE
SI_NAMEDUSER = 1
Result Set Sample for ObjectID = (11, 12, 7006, 7010, 7014, 7018, 7022,
7026)
Query Builder SQL:
SELECT
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 23
*
FROM
CI_SYSTEMOBJECTS
WHERE
SI_ID IN (11, 12, 7006, 7010, 7014, 7018, 7022, 7026)
CMS_INFOOBJECTS5.SI_RECURRING
SI_RECURRING is another field that can be used to collect all the
recurring report instances from the system.
The following SQL will return all the Crystal report recurring instances
that are owned by the Administrator within the XI Release 2 system:
Direct Database SQL:
SELECT
ObjectID
FROM
CMS_InfoObjects5
WHERE
SI_RECURRING = 1 AND SI_OWNERID = 12 AND TYPEID = 2
Query Samples
This section provides a list of sample queries to use in the Query Builder.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 24
The query above will return all users in the system specifying the
following object information:
Name
SI_NAME
Definition
Username
SI_ID
SI_OWNERID
SI_KIND
SI_ALIASES
SI_NAMEDUSER
SI_CHANGEPASSWORD
SI_USERGROUPS
SI_PASSWORDEXPIRE
SI_USERFULLNAME
SI_LASTLOGONTIME
bo_xi_r2_query_builder_training.pdf
Page 25
FROM
CI_SYSTEMOBJECTS
WHERE
SI_KIND = 'usergroup'
The query above will return all the groups within the system specifying
the following information:
Name
SI_NAME
Definition
Group Name
SI_DESCRIPTION
Group Description
SI_ID
SI_ALIASES
SI_GROUP_MEMBERS
The query above will return all currently logged on users within the
Enterprise system specifying the following information:
6/13/2007 10:42:00 AM
Name
SI_NAME
Definition
The user account logged on.
SI_APSNAME
SI_AUTHEN_METHOD
SI_DESCRIPTION
bo_xi_r2_query_builder_training.pdf
Page 26
SI_CREATION_TIME
Crystal Report
View Latest Instance ID of Report
SELECT
SI_ID, SI_PARENTID, SI_NAME, SI_LAST_SUCCESSFUL_INSTANCE_ID
FROM
CI_INFOOBJECTS
WHERE
SI_ID = ReportID
OR
SELECT
SI_ID, SI_PARENTID, SI_NAME, SI_LAST_SUCCESSFUL_INSTANCE_ID
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = Report Name AND SI_INSTANCE = 0 AND
SI_KIND = CrystalReport
The queries above will return the Last Successful Instance ID for a report
object. The ID is used for the View Latest Instance link for each
schedulable report in InfoView.
The query provides the following information:
Name
SI_LAST_SUCCESSFUL
_INSTANCE_ID
SI_ID
SI_PARENTID
SI_NAME
Definition
The SI_ID value of the latest instance
scheduled.
This ID is used as the SI_PARENTID
value for each report instance it creates
beneath it.
The parent ID of the Report. The value
is usually the Folder unique SI_ID it
resides in.
The report name.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 27
SELECT
SI_SCHEDULEINFO.SI_STARTTIME, SI_NAME,
SI_INSTANCE
FROM
CI_INFOOBJECTS
WHERE
SI_PARENTID = ParentID AND SI_INSTANCE = 1
ORDER BY SI_ID DESC
Definition
Report Instance Name
SI_INSTANCE
SI_SCHEDULEINFO.SI_
STARTTIME
6/13/2007 10:42:00 AM
Definition
The total number of instances created
by the report object.
bo_xi_r2_query_builder_training.pdf
Page 28
NOTE
Name
SI_NAME
Definition
The report name.
SI_PROCESSINFO.SI_P
ROMPTS
SI_DEFAULT_VALUES are not the parameter values that are going to be used to
process the report. When the report is processed, the SI_CURRENT_VALUES property
values are used instead.
The query above will return the physical file location of the report object
in the file repository.
bo_xi_r2_query_builder_training.pdf
Page 29
The query above will return the database information specifying the
following information:
Name
SI_NAME
Definition
The report name
SI_PROCESSINFO.SI_
LOGON_INFO
Report ID
The query above will return the Business Views unique SI_ID and
SI_CUID value that Crystal Reports is using to link back to the Business
View.
Name
SI_NAME
Definition
The report name.
SI_BUSINESSVIEWS
SI_PROCESSINFO.SI_B
USINESS_VIEW_INFO
The query above will return all the Business Views within the XI Release
2 system.
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 30
SI_NAME
SI_CUID
Definition
The unique ID of the Business View. This value is
used in Crystal Report properties
SI_BUSINESSVIEWS property to link back the
Business View.
Business View Name
The Business View cluster ID. This value is referenced
in Crystal Reports
SI_PROCESSINFO.SI_BUSINESS_VIEW_INFO
property to maintain a link between the two objects.
SELECT
SI_NAME, SI_REPORTS
FROM
CI_APPOBJECTS
WHERE
SI_NAME = 'Business View Name'
The query above will return all the unique report SI_IDs using the
Business View as a data source.
The property values returned specify the following information:
6/13/2007 10:42:00 AM
Name
SI_NAME
Definition
The name of the Business View
SI_REPOR
TS
bo_xi_r2_query_builder_training.pdf
Page 31
To return the name of the reports, run a second query using the SI_IDs
returned from SI_REPORTS property:
SELECT
SI_NAME, SI_KIND
FROM
CI_INFOOBJECTS
WHERE
SI_ID IN (reportid1, reportid2, reportid3)
Definition
The report name.
SI_KIND
The query above returns all the Business View and universe connections
within the XI Release 2 system. There is no predetermined identifier to
separate Business View and universe connections.
The values returned are:
Name
SI_NAME
Definition
The connection name.
SI_ID
bo_xi_r2_query_builder_training.pdf
Page 32
FROM
CI_APPOBJECTS
WHERE
SI_KIND = universe
The query above lists all of the universes and their associated universe
connections within the Enterprise XI Release 2 system by specifying the
following information:
Name
SI_NAME
Definition
The name of the universe.
SI_ID
SI_FILES
SI_DATA
CONNEC
TION
SELECT
SI_NAME, SI_WEBI, SI_DATACONNECTION
FROM
CI_APPOBJECTS
WHERE
SI_KIND = universe and SI_NAME = Universe Name
The query above returns all the Web Intelligence documents assigned to
the universe by specifying the following information:
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 33
Name
SI_NAME
Definition
The name of the universe.
SI_WEBI
SI_DATACONNECTION
To list the Web Intelligence report names run the following query:
SELECT
SI_NAME
FROM
CI_INFOOBJECTS
WHERE
SI_ID IN (ID from SI_WEBI, ID from SI_WEBI)
The query above returns the SI_ID of the derived or core universes by
specifying the following information:
Name
SI_NAME
Definition
The universe name.
SI_DERIVEDUNIVERSE
SI_COREUNIVERSE
SI_DATACONNECTION
SI_SHORTNAME
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 34
To return the name of the derived or core universes run a second query
using the SI_IDs returned from SI_COREUNIVERSE and
SI_DERIVEDUNIVERSE.
SELECT
SI_NAME
FROM
CI_INFOOBJECTS
WHERE
SI_ID = SI_ID from SI_COREUNIVERSE OR
SI_DERIVEDUNIVERSE
The query above will return the Web Intelligence reports universe
connection information. The value returned will be the SI_ID of the
universe.
To return the properties for the universe run the following query:
SELECT
SI_NAME, SI_DATACONNECTION
FROM
CI_APPOBJECTS
WHERE
SI_ID = SI_UNIVERSE values
SELECT
SI_NAME, SI_PROCESSINFO.SI_WEBI_PROMPTS,
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 35
SI_PROCESSINFO.SI_HAS_PROMPTS,
SI_PROCESSINFO.SI_PROMPT_USER_VIEWING
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = webi report name and SI_KIND = webi
The query above will return the parameter prompt information within
the Web Intelligence document by specifying the following information.
Name
SI_NAME
Definition
The Web Intelligence report name.
SI_PROCESSINFO
.SI_WEBI_PROMP
TS
SI_PROCESSINFO
.SI_HAS_PROMP
TS
SI_PROCESSINFO
.SI_PROMPT_USE
R_VIEWING
The query above will specify if the Web Intelligence reports have precached outputs turned on.
The properties return the following information:
6/13/2007 10:42:00 AM
Name
SI_NAME
Definition
The Web Intelligence report name.
SI_PROCESSINFO.SI_PR
ECACHE_HTML
bo_xi_r2_query_builder_training.pdf
Page 36
SI_PROCESSINFO.SI_PR
ECACHE_OUTPUTS
OR
SELECT
SI_ID, SI_PARENTID, SI_NAME, SI_LAST_SUCCESSFUL_INSTANCE_ID
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = Report Name AND SI_INSTANCE = 0 AND
SI_KIND = webi
The queries above will return the Last Successful Instance ID for a report
object. The ID is used for the View Latest Instance link for each
schedulable report in InfoView.
The query provides the following information:
Name
SI_LAST_SUCCESSFU
L_INSTANCE_ID
SI_ID
SI_PARENTID
SI_NAME
Definition
The SI_ID value of the latest instance
scheduled.
The unique ID of object. This ID is used as
the SI_PARENTID value for each report
instance it created.
The parent ID of the report. The value is
usually the unique folder SI_ID the report
resides in.
The Web Intelligence report name
bo_xi_r2_query_builder_training.pdf
Page 37
SI_SCHEDULEINFO.SI_STARTTIME, SI_NAME,
SI_INSTANCE
FROM
CI_INFOOBJECTS
WHERE
SI_PARENTID = ParentID AND SI_INSTANCE = 1
ORDER BY SI_ID DESC
The SI_PARENTID value will be the main Report Objects SI_ID value.
The query above will return all instances for a report object specifying
the following information:
Name
SI_NAME
SI_INSTANCE
SI_SCHEDULEINF
O.SI_STARTTIME
Definition
The name of the Web Intelligence report
instance.
This property is used to confirm that the
object is an instance.
The date and time that the instance actually
began being processed.
Definition
The total number of instances created by the Web
Intelligence report object.
bo_xi_r2_query_builder_training.pdf
Page 38
CI_INFOOBJECTS
WHERE
SI_KIND = webi AND SI_NAME = webi report name
The query above will return the physical file location of the Web
Intelligence report.
Name
SI_NAME
Definition
The report name.
SI_FILES
Desktop Intelligence
Desktop Intelligence Universe Connection and Data Providers
SELECT
SI_NAME, SI_UNIVERSE,
SI_PROCESSINFO.SI_FULLCLIENTDATAPROVIDERS
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = deski report name and SI_KIND =
FullClient
The query above will return the Desktop Intelligence reports universe
connection and data provider information. The value returned for
SI_UNIVERSE is the unique SI_ID of the universe. The
SI_FULLCLIENTDATAPROVIDERS will return the universe name or
the data provider name the report is using.
To return the name of the universe run the following query:
SELECT
SI_NAME, SI_DATACONNECTION
FROM
CI_APPOBJECTS
WHERE
SI_ID = SI_UNIVERSE values
bo_xi_r2_query_builder_training.pdf
Page 39
SI_PROMPT_USER_VIEWING
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = deski report name and SI_KIND =
fullclient
The query above will return the parameter information specifying the
following information.
Name
SI_NAME
Definition
Desktop Intelligence report name.
SI_HAS_PROMPTS
SI_PROMPT_USER_VIEWING
The query above will return the reports pre-cache settings by specifying
the following information:
Name
SI_NAME
Definition
The Desktop Intelligence report name.
SI_PROCESSINFO.SI_P
RECACHE_HTML
SI_PROCESSINFO.SI_P
RECACHE_XLS
SI_PROCESSINFO.SI_P
RECACHE_PDF
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 40
SI_PROCESSINFO.SI_P
RECACHE_OUTPUTS
OR
SELECT
SI_ID, SI_PARENTID, SI_NAME, SI_LAST_SUCCESSFUL_INSTANCE_ID
FROM
CI_INFOOBJECTS
WHERE
SI_NAME = Deski Report Name AND SI_INSTANCE = 0 AND
SI_KIND = FULLCLIENT
The queries above will return the Last Successful Instance ID for a report
object. The ID is used for the View Latest Instance link for each
schedulable report object in InfoView.
The query properties provide the following information:
Name
SI_LAST_SUCCESSFU
L_INSTANCE_ID
SI_ID
SI_PARENTID
SI_NAME
Definition
The SI_ID value of the latest instance
scheduled.
The unique ID of object report object. This
value will be the SI_PARENTID for each
instance the report creates.
The parent ID of the report. The value is the
unique SI_ID of the folder the report resides
in.
The Desktop Intelligence report name.
bo_xi_r2_query_builder_training.pdf
Page 41
SI_SCHEDULEINFO.SI_STARTTIME, SI_NAME,
SI_INSTANCE
FROM
CI_INFOOBJECTS
WHERE
SI_PARENTID = ParentID AND SI_INSTANCE = 1
ORDER BY SI_ID DESC
Definition
The Desktop Intelligence report instance name.
SI_INSTANCE
SI_SCHEDULEINFO.S
I_STARTTIME
Definition
The total number of instances created by the
Desktop Intelligence report object.
SELECT
SI_NAME, SI_FILES
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 42
FROM
CI_INFOOBJECTS
WHERE
SI_KIND = FULLCLIENT AND SI_NAME = deski report name
The query above will return the physical file location of the Desktop
Intelligence report object by specifying the following information:
Name
SI_NAME
Definition
The report name.
SI_FILES
License Key
License Keys and Product Version
SELECT
SI_LICENSE_KEY, SI_PRODUCT_VERSION
FROM
CI_SYSTEMOBJECTS
WHERE
SI_KIND ='LicenseKey'
The query above will return the Enterprise XI Release 2 license key and
the product version.
The query above will return the unlocked Enterprise features the
license key allows for.
Scheduling
Determining Report Scheduling Status
SELECT
SI_SCHEDULEINFO.SI_PROGRESS, SI_NAME
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 43
FROM
CI_INFOOBJECTS
WHERE
SI_SCHEDULE_STATUS = 0
Definition
New
Outstanding
Running
Complete
The query above will return all the recurring reports within the XI
Release 2 system by specifying the following properties:
Name
SI_NAME
Definition
The recurring report name.
SI_SCHEDULEINFO.SI_STARTTIME
SELECT
SI_NAME, SI_SCHEDULEINFO.SI_SUBMITTER,
SI_PARENTID, SI_KIND, SI_NEXTRUNTIME,
SI_PROCESSINFO.SI_DBNEEDLOGON,
SI_PROCESSINFO.SI_LOGON_INFO,
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 44
SI_PROCESSINFO.SI_PROMPTS,
SI_PROCESSINFO.SI_RECORD_FORMULA,
SI_FORMAT_INFO, SI_DEPENDENCIES
FROM
CI_INFOOBJECTS
WHERE
SI_ID = Report ID
The query above returns the most common properties for a scheduled
report.
Name
SI_NAME
Definition
The scheduled report name.
SI_SCHEDULEINFO.SI_S
UBMITTER
SI_PARENTID
SI_KIND
SI_NEXTRUNTIME
SI_PROCESSINFO.SI_DB
NEEDLOGON
SI_PROCESSINFO.SI_LO
GON_INFO
SI_PROCESSINFO.SI_PRO
MPTS
SI_PROCESSINFO.SI_REC
ORD_FORMULA
SI_FORMAT_INFO
SI_DEPENDENCIES
To return the names of the events, run the following query using the
SI_DEPENDENCIES values.
SELECT
SI_NAME
FROM
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 45
CI_SYSTEMOBJECTS
WHERE
SI_KIND = event
Servers
Servers Registered with the CMS
SELECT
SI_DISABLED, SI_NAME, SI_SERVER_KIND,
SI_SERVER_IS_ALIVE, SI_FRIENDLY_NAME,
SI_SERVER_NAME, SI_NTSERVICE_NAME,
SI_REGISTER_TO_APS
FROM
CI_SYSTEMOBJECTS
WHERE
SI_KIND = 'server'
The query above will return the current status of all the Enterprise XI
Release 2 Servers registered with the CMS by specifying the following
information:
Name
SI_NAME
Definition
The name of the XI Release 2 Server.
SI_DISABLED
SI_SERVER_KIND
SI_SERVER_IS_ALIVE
SI_FRIENDLY_NAME
SI_SERVER_NAME
SI_NTSERVICE_NAME
SI_REGISTER_TO_APS
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 46
FROM
CI_SYSTEMOBJECTS
WHERE
SI_KIND='Server' and SI_SERVER_KIND = 'APS'
The query above returns the current number of users connected to the
CMS.
The above query returns the IOR (Interoperable Object Reference) for
each server. The CMS keeps track of each registered server IOR for
communication. In general terms, the IOR is a data structure associated
with a CORBA object that contains enough information to locate that
object from anywhere on the network. For XI Release 2 servers the IOR
includes, among other things, the port and host name of the server.
The encrypted string can be decrypted through an internal command
line utility.
Authentication
Authentication Used to Logon
SELECT
SI_NAME, SI_AUTHEN_METHOD
FROM
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 47
CI_SYSTEMOBJECTS
WHERE
SI_KIND='Connection'
The query above returns the currently logged on users in the Enterprise
system and the authentication type used.
Name
SI_NAME
Definition
The user name.
SI_AUTHEN_METHOD
SELECT
SI_NAME, SI_MAPPED_GROUPS, SI_DEFAULT_DOMAIN,
SI_AVAIL, SI_SSO_ENABLED
FROM
CI_SYSTEMOBJECTS
WHERE
SI_NAME IN ('secWinAD', 'secEnterprise', 'secLDAP',
'secWindowsNT')
The query above will return the authentication groups mapped into the
Enterprise system.
Name
SI_NAME
Definition
The authentication type.
SI_MAPPED_GROUPS
SI_DEFAULT_DOMAIN
SI_AVAIL
SI_SSO_ENABLED
SELECT
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 48
The query above will return the configuration settings for the LDAP
server.
Name
SI_NAME
Definition
The LDAP plug-in name
SI_AVAIL
SI_BASE_DN
SI_SSO_ENABLED
SI_LDAP_SERVER_TYPE
SI_SSL_SERVER_AUTH_S
TRENGTH
SI_MAPPED_GROUPS
SI_HOST_AND_PORT
SI_APS_ADMIN_DN
6/13/2007 10:42:00 AM
Member Name
Value
Description
ceWEAK
ceCert
ceCNCHECK
ceNONE
bo_xi_r2_query_builder_training.pdf
Page 49
ceWEAK
ceCert
ceCNCHECK
ceNONE
CeWEAK does not require the client to trust the LDAP server's certificate
authority (CA). Therefore, no configuration is needed for the cert7.db
database. In the ceCert scenario, the client must trust the CA of the
LDAP server's certificate. This requires that the LDAP server CA's
certificate is added to the cert7.db database. The ceCNCHECK option
requires that the client must trust the CA of the LDAP server's certificate,
and the CN attribute of the LDAP server's certificate matches its DNS
hostname. In order to accomplish this, the LDAP server CA's must be
added to the cert7.db, and the LDAP server must trust the client's
certificate.
Description
Windows AD plug-in name.
SI_AVAIL
SI_MAPPED_GROUPS
SI_DEFAULT_DOMAIN
SI_APS_ADMIN_DN
SI_SSO_ENABLED
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 50
SI_KERBEROS_ENABLED
SI_CACHE_SECCONTEXT
SI_SERVER_SSPI_SPN
6/13/2007 10:42:00 AM
bo_xi_r2_query_builder_training.pdf
Page 51