* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Basic Controller 8 database tasks for Oracle 9i servers Guideline
Survey
Document related concepts
Transcript
Guideline Basic Controller 8 database tasks for Oracle 9i servers Product(s): Controller 8X Area of Interest: Infrastructure Basic Controller 8 database tasks for Oracle 9i servers 2 Copyright Copyright © 2008 Cognos ULC (formerly Cognos Incorporated). Cognos ULC is an IBM Company. While every attempt has been made to ensure that the information in this document is accurate and complete, some typographical errors or technical inaccuracies may exist. Cognos does not accept responsibility for any kind of loss resulting from the use of information contained in this document. This document shows the publication date. The information contained in this document is subject to change without notice. Any improvements or changes to the information contained in this document will be documented in subsequent editions. This document contains proprietary information of Cognos. All rights are reserved. No part of this document may be copied, photocopied, reproduced, stored in a retrieval system, transmitted in any form or by any means, or translated into another language without the prior written consent of Cognos. Cognos and the Cognos logo are trademarks of Cognos ULC (formerly Cognos Incorporated) in the United States and/or other countries. IBM and the IBM logo are trademarks of International Business Machines Corporation in the United States, or other countries, or both. All other names are trademarks or registered trademarks of their respective companies. Information about Cognos products can be found at www.cognos.com This document is maintained by the Best Practices, Product and Technology team. You can send comments, suggestions, and additions to [email protected] . IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers 3 Contents INTRODUCTION........................................................................................................ 4 1.1 1.2 1.3 PURPOSE .............................................................................................................. 4 APPLICABILITY ....................................................................................................... 4 EXCLUSIONS AND EXCEPTIONS .................................................................................... 4 2 TROUBLESHOOTING (REPLACE THIS HEADING) ......................................... 4 2.1 2.2 OVERVIEW ............................................................................................................ 4 DETAILS ............................................................................................................... 6 IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers 4 Introduction 1.1 Purpose This document will demonstrate simple methods to 'standard’ tasks, when Controller 8 is configured to use an Oracle 9i server. 1.2 Applicability Controller 8.1 or higher 1.3 Exclusions and Exceptions There are no known exclusions or exceptions at the time the document was created. 2 Troubleshooting (replace this heading) 2.1 Overview This document will demonstrate simple methods to perform ‘standard’ tasks, when Controller 8 is configured to use an Oracle 9i server. NOTE: • This is an unofficial guide, and any IBM Cognos or Oracle official documentation takes precedence • There are many different methods of achieving the same thing, therefore this document should be taken as just a guideline – There may be a better method of performing the same task in your Oracle environment Prerequisites/assumptions This document assume that: • There is a single database (“CCR”) on your Oracle server • The database contains at least one user (e.g. “fastnet”) which you are using to associate with your Controller 8 system. For more details on how to achieve the above, see separate documents “02. Quick guide to installing Oracle 9i Server _and creating databases_ on Windows, for Controller 2.x or 8.x - Oct 2006.pdf” and “03. Quick guide to installing Oracle 9i Client on a Controller 8 Application server, and configuring afterwards.pdf”, also available from this author. Notes on Nomenclature used Fundamentally, these two database repository systems have a couple of differences, which are worth remembering since it is easy to get these confused: Microsoft SQL: • typically have one user (“fastnet”) • …but several different databases (e.g. “ControllerLIVE”, “ControllerTEST”, ControllerTRAIN”…) IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers So when Controller is launched, there is a choice of 3 different (separate) database connections, this would mean 3 separate databases on a SQL server. Oracle: • typically have one database (“CCR”) • …but several different users (e.g. “fastnet”, “controllerlive”, “controllertest”, …) So when Controller is launch, and there is a choice of 3 different (separate) database connections, this would mean 3 separate users on an Oracle server. IBM Cognos Proprietary Information 5 Basic Controller 8 database tasks for Oracle 9i servers 2.2 6 Details Task #1 – Creating a new “blank” Controller ‘database connection’ (1) Create a new Oracle user (inside the existing Oracle database) e.g. run the following script, which would create a new user “controllerlive”, with a password “c0gn0s” create user controllerlive identified by c0gn0s default tablespace frango_table temporary tablespace frango_temp; grant connect, resource, select_catalog_role, create any trigger, create any sequence to controllerlive; [NB: Incidentally, the privileges “create any trigger” and “create any sequence” can be revoked after installation, if desired.] e.g. (2) Create a new Controller connection to this user For full details, follow the steps as described inside document “03. Quick guide to installing Oracle 9i Client on a Controller 8 Application server, and configuring afterwards.pdf” However, to summarize: In the tree control in the left pane, expand IBM Cognos Controller Configuration > Web Services Server > Database Connections Click the New button in the main tool bar In the right pane, enter the following information: o Databasetype: Oracle (TIP: you can simply double-click on this cell to change it) Name: Anything (usually the name of the server and/or purpose is used to help identify the database e.g. “default” Provider: OraOLEDB.Oracle.1 User ID: The user ID used in the Create Controller Database step e.g. fastnet IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers Enter what you think are the correct details (e.g. see below) and then test • This will fail • Do not worry, click “save anyway” Workaround: • Open the appropriate UDL file, by right-clicking and choosing “properties” e.g. "C:\Program Files\cognos\c8\data\default.udl" • 7 Change to the following (“Oracle Provider for OLE DB”): IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers 8 TIP: If there is an existing Oracle database connection, then the above steps can be avoided, by instead doing: (a) make a copy of an existing UDL file (e.g. C:\Program Files\Cognos\C8\data\default.udl) and call it something appropriate (e.g. “controllerlive.udl”) (b) open up this new UDL file and modify it so that the username/password is correct. (c) Click OK (see below) (3) Use “Create DB” and “Run Steps” to fill the space with the correct tables Launch IBM Cognos Controller Configuration, and in the tree control in the left pane, select the database connection has just created, and click the Run (green “play”) button in the main tool bar o If a warning comes up saying "Unable to determine current database version", click the Create Db button 1 o If the Actual and DbConv versions at the top of the dialog do not match2 (e.g. in picture 512 doesn’t equal 577), click the Run Steps button (this takes a bit of time). 1 There is a requirement to change the group/local language settings as appropriate – e.g. to EN/EN 2 NB There is also an need to have to do this step after using the “createDB” step the first time. IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers Click the Close button (4) Inside Controller configuration, remember to click on “Report Server” and then “Repair” to ensure that the IBM Cognos 8 BI standard reports work properly! (5) Logon to Controller, and test NOTE: The system will be asked to run an “optimize” when Controller is logon. This is normal. IBM Cognos Proprietary Information 9 Basic Controller 8 database tasks for Oracle 9i servers 10 Task #2 – Backing up an existing Oracle ‘database’ 3 to a file For example, There may be a requirement to send a ‘database’ (actually, a “user”) to IBM Cognos support for analysis – see below steps (1) Launch a command prompt (2) Run a command similar to the following: exp fastnet/pswd@ccr file=fastnet.dmp statistics=none log=exp_fastnet.log [here we are assuming: • The Oracle administrative user ‘fastnet’ has a password of “pswd” • The Controller “database” repository name is ccr • The Controller ‘user’ that we’re interested here is “fastnet”] (3) The above process has created 2 files, and you should find that the “DMP” file compresses well (e.g. using WinZip): (4) You can now send this (ZIP) file to someone else (e.g. IBM Cognos Support), but you will ALSO need to tell them the Controller user name (e.g. “fastnet” in this case) so that the DMP file is usable when they receive it [TIP: The above command in step (2) should work, so long as you have the correct Oracle permissions assigned. However, just in case it doesn’t, you could use the following command: exp system/cognos@ccr owner=fastnet file=ccrfastnet.dmp log=ccrfastnet.log [here we are assuming: • The Oracle administrative user ‘system’ has a password of “cognos” • The Controller “database” repository name is ccr • The Controller ‘user’ that we’re interested here is “fastnet” However, please try to avoid doing this, because Cognos support have an automated import script which assumes that you have used “fastnet”. Therefore, this may delay action on your database, if we receive it in this format] 3 Actually, we shall just backup the “user” not the entire database… but in reality most people will refer to this as backing up the ‘database’! IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers 11 Task #3 – Restoring an Oracle backup (DMP) file over an existing user NOTE: If the intention is to create an entirely new database connection (not to overwrite an existing one) then you will have to create a new blank database connection first (see task #1 for details) and then do the following. (1) Delete all the existing information that exists inside the user To do this, assuming the user was “fastnet”, The requirement is to run the following script: drop user fastnet cascade; e.g. NOTE: Wait patiently (e.g. 20 minutes) for it to delete all the information! When it’s finished, you’ll see: (2) Recreate a basic user e.g. run the following (just like as described in Task#1 – step(1)): create user fastnet identified by c0gn0s default tablespace frango_table temporary tablespace frango_temp; grant connect, resource, select_catalog_role, create any trigger, create any sequence to fastnet; IBM Cognos Proprietary Information Basic Controller 8 database tasks for Oracle 9i servers 12 (3) Import (IMP) the exported (DMP) file To accomplish this, launch a “command prompt” and run a command similar to the following: imp newuser/pswd@ccr file=fastnet.dmp statistics=none full=yes log=imp_newuser.log [Oracle is assuming: • The Oracle user we shall use is ‘newuser’ with a password of “pswd” • The Controller “database” repository name is ccr] TIP: Earlier in this document (see task#2) I talked about how to create the DMP export via using the command “exp fastnet/pswd…” The requirement would be have to import via a command similar to: imp system/cognos@ccr file= ccrfastnet.dmp log= ccrfastnet-imp.log fromuser=fastnet touser=fastnet [here we are assuming: • The Oracle administrative user ‘system’ has a password of “cognos” • The Controller “database” repository name is ccr • The Controller ‘user’ that was originally the source (when the file was exported) was called “fastnet” • The Controller ‘user’ that is the destination is ALSO called “fastnet” (although it doesn’t have to be the same!) (4) Test! IBM Cognos Proprietary Information