Oracle Context Option Administrator's Guide | ![]() Library |
![]() Product |
![]() Contents |
![]() Index |
The process of administering ConText Option can be divided into three main tasks:
Management of ConText Option users can be performed by any Oracle DBA user or the CTXSYS user. Management of ConText servers and queues is performed by the CTXSYS user.
Note: Many of the ConText server and queue administration tasks can be performed from the administration tool. These tasks are noted throughout the chapter.
This section provides details for performing the following user administration tasks from the command-line:
To create additional Oracle users for ConText Option, login to SQL*Plus as an Oracle DBA and use the SQL command CREATE USER.
For example:
create user app_dev identified by 123abc default tablespace app_tables;
Note: Do not use PL/SQL and SQL reserved words as the usernames for the users. In addition, certain words, such as ASCII, HTML, BLASTER, and FILTER, are used internally by ConText Option and, consequently, should not be used by themselves as usernames; however, they can be combined with other words to create descriptive usernames.
For more information about creating Oracle users, see Oracle7 Server SQL Reference.
For example:
grant ctxapp to app_dev
Note: The CTXADMIN role should only be assigned to the CTXSYS user.
For more information about the ConText roles, see "ConText Roles" in "Administration Concepts (Chapter 1)."
For more information about granting roles to users, see Oracle7 Server SQL Reference.
Note: In addition, ConText roles can be granted to users through the GUI administration tool.
To grant EXECUTE privileges to users, login to SQL*Plus as CTXSYS and use the GRANT command.
For example:
grant execute on ctx_query to ctxdev;
In this example, CTXSYS grants EXECUTE privileges to the user CTXDEV for all the stored procedures in the CTX_QUERY package.
The ConText Option packages which users may need EXECUTE privileges for are:
For more information about granting privileges to users, see Oracle7 Server SQL Reference.
This section provides details for performing the following ConText server administration tasks from the command-line:
Note: You can also use the administration tool to view the status of currently running ConText servers, change the personality mask for a server, and shut down servers.
For example:
ctxsrv -user ctxsys/ctxsys_passwd -personality QDML
Note: The userid specified for -user must be CTXSYS and the password must be the password for CTXSYS. Only CTXSYS can start ConText servers.
You can also use the ctxctl utility to start ConText servers. To start the ctxctl utility, type the following command on the command-line for the server machine:
ctxctl
The ctxctl utility provides a command-line where you can start, shut down, and view the status of your ConText servers.
Suggestion: If your machine supports running multiple ConText servers, to prevent contention between text operations, you should start one or more servers with the Query, DDL, and DML personalities, and one or more separate servers with the Linguistic and Loader personalties.
In addition, the Linguistic personality is only required for generating linguistic output. Once the output has been generated, the separate Linguistic server(s) could be shut down.
For more information about using ctxsrv and ctxctl, see "ctxsrv/ctxsrvx Executable" and "ctxctl Utility" in "Utilities and Executables (Chapter 8)."
For example, to view all the currently running ConText servers using CTX_SERVERS, you can use the following SQL statement:
column ser_name format a30
select ser_name, ser_status, ser_started_at from ctx_all_servers;
If a ConText server is running, the query will display results similar to the following output:
SER_NAME SER_STAT SER_START -------------------- -------- --------- DRSRV_1120 IDLE 18-MAR-96
For example:
execute ctx_adm.change_mask('DRSRV_1120' , 'QD')
This example shows a personality mask consisting of the Query (Q) and DDL (D) personalities replacing the existing personality mask for the ConText server.
Also, in this example, DRSRV_1120 is the ID (name) for the ConText server. A server ID is generated automatically when you start up a ConText server. You can use the ctxctl utility or the CTX_SERVERS view to obtain the ID for a ConText server.
For example:
execute ctx_adm.shutdown ('DRSRV_1120', 1)
In this example, DRSRV_1120 is the ID (name) of the ConText server and the shutdown method is 1 (immediate). An ID is generated automatically when you start up a ConText server. You can use the ctxctl utility or the CTX_SERVERS view to obtain the ID for a ConText server.
Note: You do not need to specify a server identifier when calling CTX_ADM.SHUTDOWN. If you do not specify an identifier, CTX_ADM.SHUTDOWN shuts down all currently running ConText servers. For example:
execute ctx_adm.shutdown
You can also use the ctxctl utility to shutdown ConText servers.
A ConText server performs the following tasks before shutting down:
This section provides details for performing the following ConText server administration tasks from the command-line:
You can use the following views to monitor requests in the DML Queue:
For more information about the structure of the DML Queue views, see "ConText Queue Views."
For example:
variable status varchar2
execute :status := ctx_svc.request_status(3341)
print status
In this example, a variable named STATUS is defined and REQUEST_STATUS is called to return the status of the request with handle 3341.
A handle is generated automatically when a request is submitted to the Services Queue using CTX_LING.SUBMIT.
For example:
execute ctx_svc.cancel(3341)
In this example, the request with handle ID 3341 is removed from the Services Queue.
For example:
execute ctx_svc.clear_error(3341)
In this example, the request with handle ID 3341 is removed from the Services Queue.
Suggestion: To remove all requests with a status of ERROR from the queue, specify a 0 (zero) handle when calling CLEAR_ERROR. For example:
execute ctx_svc.clear_error(0)
Note: A disabled queue continues to accept requests. The queues should be monitored regularly to prevent an excessive backlog of pending requests.
To enable or disable a queue, use the CTX_ADM.UPDATE_QUEUE_STATUS procedure.
For example:
execute ctx_adm.update_queue_status('DML_QUEUE', 'ENABLE_QUEUE')
execute ctx_adm.update_queue_status('TEXT_QUEUE', DISABLE_QUEUE')
In the first example, the DML Queue is enabled, which allows entries in the queue to be processed by ConText servers.
In the second example, the Text Queue (DDL and Query pipes) is disabled, which prevents all text queries and DDL requests from being processed by ConText servers.
For more information about disabling and enabling queues, see "CTX_ADM" in "PL/SQL Packages (Chapter 10)."
![]() ![]() Prev Next |
![]() Copyright © 1996 Oracle Corporation. All Rights Reserved. |
![]() Library |
![]() Product |
![]() Contents |
![]() Index |