Oracle Server Manager Release 2.3.2 Addendum
Using Reserved Words
If a reserved word is used as an object name in a Server Manager command, it must be enclosed in quotes. For example, to start up a database that is named with the reserved word V7, issue the command as follows:
STARTUP OPEN 'V7'
DESCRIBE
The DESCRIBE command, which describes a function, package, package body, procedure, table, or view, has several enhancements.
The syntax of the DESCRIBE command ::=
where:
- The shorthand DESC is now equivalent to the command DESCRIBE.
Attention: This means that DESC has been added to the list of Server Manager reserved words. If you have a database object named DESC, you need to place quotes around the name to show that it is an object name. For example:
INSERT INTO 'DESC' VALUES('onetwothree', 123); )
- The use of the object type is no longer required. If you do not specify an object type, Server Manager attempts to determine the object type. For the statement
DESCRIBE emp
Server Manager describes the table or view if a table or view with the name EMP exists.
If no table or view with that name exists in the user's schema, Server Manager searches for a PL/SQL function, procedure, or package with that name and describes it. For the statement
DESCRIBE payroll.emp
Server Manager looks for a table or view in schema PAYROLL with the name EMP.
If there is no PAYROLL schema or no EMP table/view in the PAYROLL schema, Server Manager will search the current schema for a package PAYROLL containing a function or procedure EMP.
If both a table EMP in schema PAYROLL and a package PAYROLL with function/procedure EMP in the current schema exist, the statement
DESCRIBE FUNCTION payroll.emp
This allows you to specify the type of the object you want to describe.
- Server Manager now has the capability to describe both functions and procedures contained in packages. Previously only functions and procedures not contained in packages could be described.
Note: Some versions of PL/SQL allow the user to describe a package by giving the package name, and some versions require the user to specify an object in the package to describe. Server Manager supports package description for those versions of PL/SQL which support this functionality.
SPOOL
When long lines of text are written to a spool file or to a terminal, newline codes are inserted in the text if the lines exceed the maximum allowable line length for the platform.
SET
Changes to the SET command are as follows:
- New APPINFO feature accessible from either Server Manager Line Mode or the SQL Worksheet. You use the SHOW command to display registration information. See SHOW APPINFO.
- FETCHROWS feature accessible from either Server Manager Line Mode or the SQL Worksheet.
The syntax of the SET command ::=
APPINFO | Registers the Server Manager application through the database's DBMS_APPLICATION_INFO package (Oracle 7.2 or later). By default, the APPINFO function is set to OFF. |
Application registration allows DBAs to see what software is currently running to better monitor resource utilization for database tuning. When APPINFO is turned on, application registration proceeds normally. If a SQL script is not being run, the default registration text string is "Oracle Server Manager." Optionally, you can create a customized registration text string. If a script is being run through Server manager, the script name is used as the registration text string. | |
- SET APPINFO ON registers Server Manager using the text string "Oracle Server Manager" , a customized text string, if one has been defined, or a SQL script name. APPINFO is automatically turned OFF if a database or system error occurs.
- SET APPINFO OFF turns off the function.
- SET APPINFO usertext replaces the default "Oracle Server Manager" registration string with a customized string (usertext). Note: usertext must be a contiguous string unless it is enclosed within single or double quotation marks.
Examples: | |
| Text String Registers as: |
| SET APPINFO abc abc |
| SET APPINFO abc def abc |
| SET APPINFO "abc def" abc def |
| SET APPINFO 'abc def' abc def |
| SET APPINFO "abc def Error |
| SET APPINFO 'abc def Error |
- To set APPINFO so that it is turned ON whenever you start Server Manager, enter the following command string at the operating system prompt:
>svrmgrl command="SET APPINFO ON" | |
Note: This procedure applies to Server Manager Line Mode only and not the SQL Worksheet.
FETCHROWS integer | Limits the number of rows returned by a query. Useful with ordered queries for finding the "top ten" items in a category, for example. Also used with unordered queries to find the "first n" records that satisfy a given criteria. integer must be in the range 1-999,999. |
| If integer is not specified, SQL statement processing returns to the default method, returning all rows. |
SHOW
The APPINFO option has been added to display the application registration information defined by SET APPINFO.
The syntax of the SHOW command ::=
where:
APPINFO | Shows the current status (ON/OFF) and the application registration text. |
Example
SHOW APPINFO
returns a display such as:
APPINFO ON (USERTEXT: Oracle Server Manager)