In Business Objects XI, if you want to query the repository to obtain lists of users, connections, reports or universe for administrator purpose, it is not as easy as it was in former 4-5-6 releases. In fact, in these previous release, such information was stored in repository database and could be obtained easily with queries like select * from obj_m_connection or using special universe plugged on it (aka managero) Then, since the new Business Objects XI release, repository metadata are no longer available in the same way using traditional SQL tool because repository tables now only contains ID and crypted data. Query repository using the Query builder tool To obtain such information, you have to use a very simple and rudimentary tool called Query Builder and which can be called using a browser at the following URL: http://<your system name: port> /AdminTools/querybuilder/query.jsp Log In to the Query Builder using an administrator account -- Page 1 / 6 --
Once connected, you face a SQL query tool like interface where you will enter your query. For example, to obtain the list of connections, enter the following one: Select * from ci_appobjects where si_kind = 'MetaData.DataConnection' Warning: Even if instruction used like select * from recall SQL language, it is in reality just a recalling-sql-business Objects-specific language with only few possibilities. To obtain more help about this query language, consult the following URL: http://devlibrary.businessobjects.com/businessobjectsxir2/en/devsuite.htm And search the following chapter: Business Objects Enterprise SDK >.Net developer guide and API references > SDK Fundamentals > How do I use the query language to retrieve classes from the CMS repository? -- Page 2 / 6 --
After having enter the instruction, click on Submit Query. The results are displayed as an infamous-table-kind without any native export to excel capability. Query repository using Business Objects Desktop Intelligence Launch Desktop Intelligence with the new report Wizard and click on Begin Select Universe and click on Next -- Page 3 / 6 --
Choose the activity Universe (for example) and click on Finish Then, create a simple query using just one objects and click on Run button Comment: This first step as not final use. It just aims to create existing report so you can do the query on any universe or also use a flat file for example. Another possibility is starting here the tutorial opening existing report. Select Tools / Macro / Visual Basic Editor (or Alt F11 short key) On the left side, right click on your document name and select Insert / Module Sub ListSecCx(dpInterface As DpVBAInterface) Dim DataRow(1 To 4) As String Dim dpcube_cx As DpVBACube Set dpcube_cx = DefineCube_CX(dpInterface.DpVBACubes(1)) Dim CMSName As String Dim esession As EnterpriseSession Dim istore As InfoStore Dim sessionmanager As SessionMgr Dim Results As InfoObjects Dim RowNum As Long Set sessionmanager = New CrystalEnterpriseLib.SessionMgr Set esession = sessionmanager.logon("administrator", "Password", "Cms Name", "secenterprise") Set istore = esession.service("", "InfoStore") Set Results = istore.query("select * from ci_appobjects where si_kind = 'MetaData.DataConnection'") For Each Name In Results RowNum = RowNum + 1 DataRow(1) = Name.Properties("SI_NAME") -- Page 4 / 6 --
DataRow(2) = Name.Properties("SI_OWNER") DataRow(3) = Name.Properties("SI_CREATION_TIME") DataRow(4) = Name.Properties("SI_UPDATE_TS") Call dpcube_cx.dpvbacolumns.addline(datarow) Next Name Exit Sub End Sub Function DefineCube_CX(dpCube_CX As DpVBACube) As DpVBACube Dim dpcol As DpVBAColumn Set DefineCube_CX = dpcube_cx DefineCube_CX.DpVBAColumns.SetNbColumns (4) Set dpcol = DefineCube_CX.DpVBAColumns(1) dpcol.name = "Connection Name" Set dpcol = DefineCube_CX.DpVBAColumns(2) dpcol.name = "Connection Owner" Set dpcol = DefineCube_CX.DpVBAColumns(3) dpcol.name = "Connection Creation Date" Set dpcol = DefineCube_CX.DpVBAColumns(4) dpcol.name = "Connection Update Date" End Function Then, on the bottom left corner, name it as you want and, on the main part, copy / past the previous code. Then, leave the Visual Basic Editor using Alt / F11 Short key Then, create a new data provider using the Insert / Table command Choose the following option and click on Begin button Choose Others then, Visual basic for Applications procedures and click on Finish -- Page 5 / 6 --
Choose the previously created subroutine and click on Run button The query result are inserted into your report You can now remove the first dummy query created in the first step and which is no longer needed. (Data / View Data / Delete) -- Page 6 / 6 --