Oracle9i OLAP Services Concepts and Administration Guide for Windows
Release 1 (9.0.1) for Windows

Part Number A90371-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to beginning of chapter Go the next page

Administering an OLAP Service, 12 of 15


Command-line Administration

About OLAP Service Manager

OLAP Service Manager is a command-line program that supports many of the same features that are available through Instance Manager. With OLAP Service Manager, you can do the following:

You can run OLAP Service Manager interactively or as a batch command processor. By using it interactively, you can access its online Help facilities, which provide you with the information you need to formulate complete and syntactically correct commands. After you know the exact syntax of the commands you want to use, you can issue them in a batch environment. As an operating system command, OLAP Service Manager can be invoked from within scripts and at the DOS prompt within Windows NT.

You can schedule and launch scripts that contain OLAP Service Manager commands using the job-scheduling facility within Oracle Enterprise Manager.

When running on Windows NT, OLAP Service Manager can target local OLAP services, remote OLAP services offered on other Windows NT systems, and OLAP services offered on Unix systems that are accessible to the Microsoft network.

Setting the library path

OLAP Service Manager requires that the library path be set to include the lib subdirectory of Oracle home. You can run OLAP Service Manager using a script that sets the library path, or you can run it directly and assume responsibility for setting the library path yourself.

To set the library path for OLAP Service Manager, you set the appropriate environment variable to the lib subdirectory of Oracle home. The name of this variable varies among operating systems. To learn how to set it yourself, view the contents of cosvc.

Procedure: Running OLAP Service Manager

Follow these steps to run OLAP Service Manager interactively:

  1. Access the command line (DOS window in Windows NT).

  2. Change to the bin subdirectory of Oracle home.

  3. To see how to access the various types of Help, just type cosvc.

    The following text will be displayed.

    OLAP Service Manager, version: 9.0.0.0, build 72026 
    Copyright (c) 1998-2000 Oracle Corporation. All Rights Reserved.
    
    Usage: xscosvc [options] [command1[; command2[; commandn]]]
    
    For additional help, refer to the commands below:
    xscosvc help options:    Display list of available options
    xscosvc help commands:   Display list of available commands
    xscosvc help <option>:   Display help on a particular option
    xscosvc help <command>:  Display help on a particular command
    
  4. To run the utility interactively, use the -s and -i options.

    cosvc -s -i
    

    The utility displays a command prompt (->).

  5. Type in service-management commands. Enter one command per line, or delineate multiple commands with semicolons. Use the Help command to learn about the available commands and options.

    As you can see from the Usage line in step 3, input to OLAP Service Manager consists of a series of options followed by one or more commands.

  6. Type quit to return to the command line.

Common problems in starting OLAP Service Manager

If you are unable to run OLAP Service Manager, then you may be experiencing one of the following problems:

Syntax of the cosvc command

To manage OLAP services in batch mode, specify the full operation in a single command using cosvc. The input to OLAP Service Manager consists of a series of options followed by one or more commands.

cosvc [option parameter]... [command parameter]...

Example: Getting the status of an OLAP service

The following command queries the status of a local OLAP service named OLAPServer. The session is authenticated through the database with a user name of scott and a password of tiger. Depending on how you are running OLAP Service Manager, you may need to specify its full path name.

cosvc -u scott -p tiger status OLAPServer

The following information is sent to stdout.

OLAP Service Manager, version: 9.0.0.0, build: 72026.
Copyright (c) 1998-2000 Oracle Corporation.  All Rights Reserved.
Status of OLAPServer on olapsunprod:
    Pathname:       /home/oracle/bin/xsolap
    Description:    Oracle_OLAP_Server_9.0.0.0.0
    State:          running
    Startup mode:   automatic
    Event log path: /home/oracle/olap/OLAPServer/log

Redirecting output

OLAP Service Manager writes text output to stdout and stderr, which are typically defined as the screen. This implementation allows you to redirect output to a file, pipe it to another program, or capture and interpret output in a script.

If the output consists of multiple lines of text, then the end-of-line character will be represented in the native format. On Windows NT, the end-of-line character is CR+LF.

All text output from OLAP Service Manager is in English US ASCII format. All text output returned from OLAP Services is in the character set used by that OLAP service.

Handling errors

OLAP Service Manager returns a status code that indicates whether or not it successfully completed execution. You can write a batch program that traps the status code and proceeds conditionally, based on the type of error, rather than simply terminating.

The error messages are sent to stdout, but you can redirect this output to a log file for later analysis.

Tip: Use the -i option if you want OLAP Service Manager to ignore errors rather than terminating.

The following table identifies the error codes.

Status Code 

Status Message 

Processing completed successfully 

101 

Specified service does not exist 

102 

Command timed out 

103 

Bad command or help request 

104 

Cannot get current host name 

105 

Connect to service environment failed 

106 

Generic "command failed" 

107 

Syntax error or unsupported command 

108 

No network present 


Go to previous page Go to beginning of chapter Go to next page
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback