Oracle9i Data Guard Broker Release 1 (9.0.1) Part Number A88807-01 |
|
The Data Guard command-line interface allows you to manage a Data Guard configuration and its site and database resource objects directly from the command line, or from batch programs or scripts. You can use the Data Guard command-line interface as an alternative to the Oracle9i Data Guard Manager graphical user interface for managing a Data Guard configuration.
This chapter provides reference information for the Data Guard command-line interface.
To run the Data Guard command-line interface, you must have SYSDBA privileges.
Start the command-line interface by entering DGMGRL
at the command line prompt on a system where Oracle9i Data Guard is installed:
% DGMGRL [options
]
DGMGRL for Solaris: Version 9.0.1.0.0 - Production.
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Welcome to DGMGRL, type "help" for information.
DGMGRL>
You can supply optional parameters on the command line to indicate how you want the Data Guard command-line interface to display output such as command prompts, banners, and messages.
Specify none, one, or all of the following keywords when you invoke the DGMGRL command-line interface:
Echoes command input and output to the default display device. If you do not use this parameter, only the output from the command is displayed.
Accesses the DGMGRL help system. You can enter the word help
by itself to display help
for all of the DGMGRL commands, or you can include the name of a command (from Table 6-1) after the keyword help to display information about a specific command.
Displays output from DGMGRL commands in an abbreviated format. This mode is useful if you are directing the command output to a file or to another display tool.
The following subsections specify the command format that you enter at the DGMGRL>
prompt.
The DGMGRL commands allow you to create and maintain one broker configuration at a time. A broker configuration can consist of two sites: a primary site and a standby site.
After you invoke the command-line interface, you can enter any of the DGMGRL commands listed in Table 6-1. Each command and its associated parameters are described in detail in later sections of this chapter.
To use the Data Guard command-line interface, the following must be true:
DRS_START
dynamic initialization parameter is set to TRUE
.
Chapter 5 for more information about preparing and starting Oracle Data Guard. See Oracle9i Data Guard Concepts and Administration for more information about setting up the network files.
See Also:
HELP,
EXIT,
or QUIT
command), you must first connect to the primary database using the DGMGRL
CONNECT
command. You must have SYSDBA privileges to connect to the database.
Oracle9i Data Guard Concepts and Administration, the Oracle9i Database Administrator's Guide, and your operating system-specific documentation to set up remote access using the
See Also:
REMOTE_LOGIN_PASSWORDFILE
initialization parameter.
This example demonstrates how to connect to the DGMGRL command-line interface on the local system.
% DGMGRL Welcome to DGMGRL, type "help" for information. DGMGRL> CONNECT sys/change_on_install; Connected.
This example demonstrates how to connect to the DGMGRL command-line interface on a remote system.
DGMGRL> CONNECT sys/change_on_install@remote-stby; Connected.
When you are done working with the command-line interface and want to return to the operating system, enter the EXIT
or QUIT
command at the DGMGRL command prompt. For example:
DGMGRL> EXIT;
You can use either the EXIT
or the QUIT
command to leave the DGMGRL command-line interface.
Alters the intended (runtime) state of the broker configuration.
ALTER CONFIGURATION SET STATE = state;
The state in which you want the configuration to be running when the configuration is enabled. The possible states are:
SHOW CONFIGURATION
command to display the current default and intended states for the configuration.
ENABLE CONFIGURATION
command.
In the following example, the broker configuration will be in the online state the next time you enable the configuration.
DGMGRL> ALTER CONFIGURATION SET STATE = online; Succeeded.
Allows you to change the value of a property for the specified database resource object.
ALTER RESOURCE resource-name [ON SITE site-name]
The name of the database resource object for which you want to set a property value.
The name of the site object where the database resource object is located.
The name of the property for which you want to set a new value. Section 2.8 describes the database resource properties in detail.
The new value for the property. Section 2.8 describes the values for each property.
ALTER RESOURCE
command, the property change does not take effect until you enable configuration.
ALTER RESOURCE
command returns an error message. You must re-issue the ALTER RESOURCE
command and specify a site name with the ON SITE
option.
SHOW RESOURCE
command to display the current property values for the database resource object.
The ALTER RESOURCE
command in the following example changes the value of the LogArchiveTrace
property to be 127 for the database resource object named Sales_db.
DGMGRL> ALTER RESOURCE 'Sales_db' ON SITE 'Boston' SET PROPERTY LogArchiveTrace='127'; Property "LogArchiveTrace" updated.
The command-line interface returns the following message to indicate that the LogArchiveTrace property was updated successfully in the Data Guard configuration file:
Property "LogArchiveTrace"
updated
If the configuration is currently disabled, the property does not affect the actual database until the next time you enable the broker configuration with the ENABLE CONFIGURATION
command.
Allows you to change the state of the specified database resource object.
ALTER RESOURCE resource-name [ON SITE site-name]
The name of the database resource object for which you want to change the state.
The name of the site object that contains the database resource object that you want to alter.
The state to which the database resource will transition when it is enabled.
ALTER RESOURCE
command, the state change does not take effect until you enable the configuration with the
ENABLE CONFIGURATION
command.
SHOW RESOURCE
command to display information, such as the current runtime state, of a database resource object.
ALTER RESOURCE
command returns an error message. You must re-issue the ALTER RESOURCE
command and specify a site name with the ON SITE
option.
ONLINE
or OFFLINE
state. The ONLINE
state has the following substates:
PHYSICAL-APPLY-READY PHYSICAL-APPLY-ON (default state for a standby database) READ-ONLY READ-WRITE READ-WRITE-XPTON (default state for a primary database)
The ALTER RESOURCE
command in the following example changes the state of the Sales_db database resource to read/write.
DGMGRL> ALTER RESOURCE 'Sales_db' ON SITE 'Boston' SET STATE='read-write'; Succeeded.
Although the command completes successfully, the state of the Sales_db database resource object does not change until the next time that you enable the configuration with the ENABLE CONFIGURATION
command.
Allows you to change the state of a site object.
ALTER SITE site-name
The name of the site object for which you want to change state.
The state to which the site will transition when it is enabled. The possible states are:
ALTER SITE
command, the state change does not take effect until you next enable the configuration.
SHOW SITE
command to display information about a site object.
DGMGRL> ALTER SITE 'Boston' SET STATE='online'; Succeeded.
Allows you to specify an initialization parameter file that will be used to automatically restart the database of the site.
ALTER SITE site-name
The name of the site object for which you want to specify the automatic restart initialization parameter file.
The name of the initialization parameter file that will be used to automatically restart the database of the site.
SET AUTO PFILE=OFF
option and you receive a message telling you to restart a site, use the
SHUTDOWN
and
STARTUP
commands to restart your databases.
CONNECT
command.
SHOW SITE
command with the VERBOSE
option to display the current PFILE information for a site.
DGMGRL> ALTER SITE 'Boston' SET AUTO PFILE='/oracle/dbs/initbs.ora'; Succeeded.
DGMGRL> ALTER SITE 'Boston' SET AUTO PFILE=OFF; Succeeded.
Connects a given username to the specified database.
CONNECT username/password[@net-service-name];
Represents the username and password with which you want to connect to the database.
Consists of the Oracle Net service name of the site to which you want to connect. The exact syntax depends upon the Oracle Net communications protocol your Oracle installation uses. For more information, see the Oracle Net documentation.
CONNECT
command returns an error, check to see that a valid service name was specified.
This example connects to the default database on the local system.
DGMGRL> CONNECT sys/change_on_install; Connected.
This example connects to a remote database whose service name is prmy.
DGMGRL> CONNECT sys/change_on_install@prmy; Connected.
Creates a new broker configuration, and creates and adds a primary site object and a database resource object to the configuration.
CREATE CONFIGURATION configuration-name AS
PRIMARY SITE IS site-name
RESOURCE IS resource-name
HOSTNAME IS host-name
INSTANCE NAME IS instance-name
SERVICE NAME IS net-service-name
SITE IS MAINTAINED AS standby-type;
A user-friendly name for the configuration you are creating. Valid names contain any alphanumeric characters. If spaces are included in the name, the name must be enclosed in double or single quotation marks. The name must consist of 30 or fewer characters.
The user-friendly name of the primary site object.
The user-friendly name of the database resource object to be created for the primary site.
The host name for the primary site.
The instance name of the primary database.
Consists of the Oracle Net service name for the primary site. The exact syntax depends upon the Oracle Net communications protocol your Oracle installation uses. For more information, refer to the Oracle Net documentation.
Specify physical for the standby-type parameter. This specifies that if this site ever becomes a standby site then it will be maintained as a physical standby site.
CREATE CONFIGURATION
command does not start the database instance on the primary site. You must use the
STARTUP
command to start the database instance.
CREATE SITE
command.
host-name
and instance-name
parameters specify information the broker requires to uniquely identify a site in the configuration. To obtain the proper values for the host-name
and instance-name
parameters, use the values returned from the V$INSTANCE fixed view.
The following example shows a sample SQL*Plus statement that selects these values from the V$INSTANCE fixed view:
SQL> CONNECT sys/change_on_install AS SYSDBA; SQL> SELECT host_name, instance_name FROM v$instance; HOST_NAME INSTANCE_NAME --------------------------------------------------------------- boston bstn
In the example, the values boston
and bstn
should be supplied for the hostname
and instance-name
parameters in the CREATE CONFIGURATION
command.
The following example creates a new broker configuration named Sales.
DGMGRL> CREATE CONFIGURATION 'Sales' AS PRIMARY SITE IS 'Boston' RESOURCE IS 'Sales_db' HOSTNAME IS 'boston' INSTANCE NAME IS 'bstn' SERVICE NAME IS 'bstn' SITE IS MAINTAINED AS PHYSICAL; Configuration "Sales" added with primary site "Boston" Database resource "Sales_db" added.
Creates a new standby site object and database resource object and adds it to an existing broker configuration.
CREATE SITE site-name
RESOURCE IS resource-name
HOSTNAME IS host-name
INSTANCE NAME IS instance-name
SERVICE NAME IS net-service-name
SITE IS MAINTAINED AS standby-type;
A user-friendly name for the site object you are creating. Valid names contain any alphanumeric characters. If spaces are included in the name, the name must be enclosed in double or single quotation marks. The name must consist of 30 or fewer characters.
The user-friendly name of the database resource object to be created for the standby site.
The host name for the standby site.
The instance name of the primary database.
Consists of the Oracle Net service name of the standby site that you want to add. The exact syntax depends upon the Oracle Net communications protocol your Oracle installation uses. For more information, see the Oracle Net documentation.
Specify physical for the standby-type
parameter. This specifies that if this site ever becomes a standby site, then it will be maintained as a physical standby site.
Oracle9i Data Guard Concepts and Administration for information about creating a standby database
See Also:
CREATE SITE
command, you must create the broker configuration using the
CREATE CONFIGURATION
command.
CREATE SITE
command after you have connected to the primary database using the CONNECT
command.
CREATE SITE
command, the site object is created in a disabled state to allow you to add dependent database resource objects before the site goes online.
host-name
and instance-name
parameters specify information the broker requires to uniquely identify a site in the configuration. To obtain the proper values for the host-name
and instance-name
parameters, use the values returned from the V$INSTANCE fixed view.
The following example shows a sample SQL*Plus statement that selects these values from the V$INSTANCE fixed view:
SQL> CONNECT sys/change_on_install AS SYSDBA; SQL> SELECT host_name, instance_name FROM v$instance; HOST_NAME INSTANCE_NAME --------------------------------------------------------------- sf sfdb
In the example, the values sf
and sfdb
should be supplied for the host-name
and instance-name
parameters in the CREATE SITE
command.
The following example demonstrates how to add a standby site called San Francisco to the broker configuration.
DGMGRL> CREATE SITE 'San Francisco' RESOURCE IS 'reportingdb' HOSTNAME IS 'sf' INSTANCE NAME IS 'sfdb' SERVICE NAME IS 'dest2' SITE IS MAINTAINED AS PHYSICAL; Site "San Fransisco" added to configuration. Database resource "reportingdb" added.
Disables a broker configuration so that the configuration and all of its site objects and database resource objects are no longer managed by the broker.
DISABLE CONFIGURATION;
None.
DISABLE CONFIGURATION
command.
REMOVE CONFIGURATION
command for more information about removing the configuration.
The following example disables the broker configuration and all of its sites and database resources.
DGMGRL> DISABLE CONFIGURATION; Disabled.
Disables a database resource so that it is no longer managed by the broker.
DISABLE RESOURCE resource-name [ON SITE site-name];
The name of the database resource object that you want to disable.
The user-friendly name of the site containing the database resource that you want to disable.
DISABLE RESOURCE
command returns an error message. You must re-issue the DISABLE RESOURCE
command and specify a site name with the ON SITE
option.
The following example demonstrates how to disable the database resource reportingdb from the San Francisco site.
DGMGRL> DISABLE RESOURCE 'reportingdb' ON SITE 'San Francisco'; Disabled.
Disables the specified standby site object in the broker configuration so that the standby site object and any database resource objects on the site are no longer managed by the broker.
DISABLE SITE site-name;
The user-friendly name of the standby site that you want to disable.
DISABLE SITE
command. Use the
DISABLE CONFIGURATION
command to disable the primary site.
The following example demonstrates how to disable the San Francisco standby site.
DGMGRL> DISABLE SITE 'San Francisco'; Disabled.
Enables the broker to actively manage the broker configuration including all of its site objects and database resource objects.
ENABLE CONFIGURATION;
None.
ALTER CONFIGURATION
command.
READ-WRITE-XPTON
state), and the standby database resource object is enabled in the PHYSICAL-APPLY-ON
state. You can change the state of the database resource using the
ALTER RESOURCE (state)
command.
SHOW CONFIGURATION
command to display information about the configuration.
The following example enables a broker configuration.
DGMGRL> ENABLE CONFIGURATION; Enabled.
Enables the broker to actively manage the specified database resource object.
ENABLE RESOURCE resource-name [ON SITE site-name];
The name of the database resource object you want to manage with the broker.
The user-friendly name of the site object containing the database resource object that you want to enable.
ENABLE RESOURCE
command will remain disabled (and unmanaged by the broker) until you enable the site. See the
ENABLE SITE
command.
PHYSICAL-APPLY-ON
state. You can change the state of the database resource using the
ALTER RESOURCE (state)
command.
ENABLE RESOURCE
command returns an error message. You must re-issue the ENABLE RESOURCE
command and specify a site name with the ON SITE
option.
SHOW RESOURCE
command to display information about the database resource, including its default and intended states, and the properties of the database resource.
The following example enables the database resource object named Sales_db.
DGMGRL> ENABLE RESOURCE 'Sales_db'; Enabled.
Enables the broker to actively manage the specified standby site object, including its database resource objects.
ENABLE SITE site-name;
The user-friendly name of the standby site object you want to manage with the broker.
ENABLE CONFIGURATION
command.
DISABLE
commands).
PHYSICAL-APPLY-ON
state. You can change the state of the database resource using the
ALTER RESOURCE (state)
command.
The following example enables the standby site named Boston.
DGMGRL> ENABLE SITE 'San Francisco'; Enabled.
Exits the command-line interface.
EXIT;
QUIT
command.
The following example demonstrates how to exit (quit) the command-line interface.
DGMGRL> EXIT;
Displays online help for the Data Guard command-line interface.
HELP [<topic>];
The topic for which you want to display help information. If you do not specify a topic, the command lists all of the topics and the format. Valid topics are:
A database connection is not required to execute this command.
The following examples get help on the HELP
and CONNECT
commands.
DGMGRL> HELP HELP; Display the help for a given command DGMGRL> HELP CONNECT; Connect to a server connect <user>/<password>@<connect>;
Exits the Data Guard command-line interface.
QUIT;
The following example shows how to quit (exit) the command-line interface.
DGMGRL> QUIT;
Removes all of the configuration information from the Data Guard configuration file, and removes management of all of the site and database resource objects associated with the broker configuration.
REMOVE CONFIGURATION;
None.
DGMGRL> REMOVE CONFIGURATION; Removed configuration.
Removes the specified standby site object from the broker configuration.
REMOVE SITE site-name;
The user-friendly name of the standby site that you want to remove.
REMOVE CONFIGURATION
command to remove the primary site object.
DGMGRL> REMOVE SITE 'San Francisco'; Removed site "San Fransisco" from configuration.
Displays a brief or a detailed summary about the broker configuration.
SHOW CONFIGURATION [VERBOSE] [property-name];
The name of the property for which you want to display summary information. Available properties are:
See Section 2.8 for complete information about properties.
VERBOSE
option to display a detailed summary of the configuration.
ALTER CONFIGURATION
command to change the intended state of a configuration.
SHOW DEPENDENCY TREE
command to display the dependency tree and default path information for the configuration.
The following example provides a brief summary of the Sales configuration.
DGMGRL> SHOW CONFIGURATION; Configuration 'Sales' is Primary Site is 'Boston' Standby Site is 'San Francisco' Current status for "Sales": SUCCESS
The following example uses the VERBOSE
option to show complete information about the Sales configuration.
DGMGRL> SHOW CONFIGURATION VERBOSE; Configuration Name: 'Sales' Enabled: 'yes' Default state: 'ONLINE' Intended state: 'ONLINE' Number of sites: 2 Sites: Name: Boston Name: San Francisco
The following example shows the STATUS
property for the Sales configuration.
DGMGRL> SHOW CONFIGURATION STATUS; STATUS = 'SUCCESS'
Displays a dependency tree that shows a static map of what is going to be enabled in the broker configuration and the default online states for each database resource in the configuration.
SHOW DEPENDENCY TREE;
For detailed information about the configuration, use the SHOW CONFIGURATION
command.
The following example shows a configuration named Sales with two sites (Boston and San Francisco) and database resource objects called Sales_db and reportingdb. The database resource object (Sales_db) is brought online in its default state of READ_WRITE_XPTON
when Boston is running as the primary site. The other database resource object, reportingdb, is brought online in its default state of PHYSICAL_APPLY_ON
when San Francisco is running as the standby site.
DGMGRL> SHOW DEPENDENCY TREE; Sales Sales[ONLINE]->Boston Sales[ONLINE]->Boston[PRIMARY]->Sales_db Sales[ONLINE]->Boston[STANDBY]->Sales_db Sales[ONLINE]->San Francisco Sales[ONLINE]->San Francisco[PRIMARY]->reportingdb Sales[ONLINE]->San Francisco[STANDBY]->reportingdb Default Path: Sales[ONLINE]->Boston[PRIMARY] Sales[ONLINE]->Boston[PRIMARY]->Sales_db[READ-WRITE-XPTON] Sales[ONLINE]->San Francisco[STANDBY] Sales[ONLINE]->San Francisco[STANDBY]->reportingdb[PHYSICAL-APPLY-ON]
In the example, the reportingdb database resource has a dependency on whether the San Francisco is in the primary or the standby role. That is, the reportingdb database resource object cannot go online until the San Francisco site is a standby site.
Displays the Data Guard configuration log or database alert log from the named site object.
SHOW LOG [ALERT] [LATEST] ON SITE site-name;
Displays the database alert log for the specified site object.
Specifies the last 20 lines of the SHOW LOG
command output.
The user-friendly name of the site for which you want to display the Data Guard configuration log or the database alert log.
If you omit the ALERT
parameter, then the Oracle Data Guard configuration log for the named site is displayed.
The following example shows how to display the Data Guard configuration log for the Boston site.
DGMGRL> SHOW LOG ON SITE 'Boston'; DRSLOG LINE OBJECT_ID DATE LOG -------------------------------------------------------------------------------- 1 0 2000-11-01-12:19:30 DMON: Starting RSM processes 2 0 2000-11-01-12:19:30 1 built-in RSM process(es) and 1 generic RSM process(es) are enabled. 3 0 2000-11-01-12:19:35 DMON: no configuration found, server ready 4 0 2000-11-01-12:19:42 DMON: DR Server shutting down, DMON process exiting 5 0 2000-11-01-12:19:42 DMON: Shutting down RSMs 6 0 2000-11-01-12:20:02 DMON: Starting RSM processes 7 0 2000-11-01-12:20:02 1 built-in RSM process(es) and 1 generic RSM process(es) are enabled. 8 0 2000-11-01-12:20:07 DMON: no configuration found, server ready 9 0 2000-11-01-12:20:15 DMON: DR Server shutting down, DMON process exiting 10 0 2000-11-01-12:20:15 DMON: Shutting down RSMs 11 0 2000-11-01-12:20:20 DMON: Starting RSM processes 12 0 2000-11-01-12:20:20 1 built-in RSM process(es) and 1 generic RSM process(es) are enabled. 13 0 2000-11-01-12:20:25 DMON: no configuration found, server ready 14 1 2000-11-01-12:20:58 DMON: DRS OP 2: success. 15 2 2000-11-01-12:20:58 Add site Primary succeeded. 16 2 2000-11-01-12:20:58 DMON: DRS OP 3: success. 17 3 2000-11-01-12:20:58 Add site Standby succeeded. 18 3 2000-11-01-12:20:58 DMON: DRS OP 3: success. 19 4 2000-11-01-12:20:58 Adding internal resource Sales_db pid 16777217 parent_state ONLINE (1) vinst 0 20 4 2000-11-01-12:20:58 -- default_state OFFLINE (0) 21 4 2000-11-01-12:20:58 Adding internal resource Sales_db pid 16777217 parent_state PRIMARY (5) vinst 1 22 4 2000-11-01-12:20:58 -- default_state READ-WRITE-XPTON (11) 23 4 2000-11-01-12:20:58 Adding internal resource Sales_db pid 16777217 parent_state STANDBY (6) vinst 2 24 4 2000-11-01-12:20:58 -- default_state PHYSICAL-APPLY-ON (6) . . . .
The following example displays the last 20 lines of the SHOW LOG
command output for the Boston site.
DGMGRL> SHOW LOG LATEST ON SITE 'Boston'; DRSLOG LINE OBJECT_ID DATE LOG -------------------------------------------------------------------------------- 2961 913 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2962 914 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2963 915 2000-11-02-09:29:33 Parent 33554433 child 33554690 vinst 33554690 state 5 (PRIMARY) name reportingdb 2964 915 2000-11-02-09:29:33 Parent 33554433 child 33554691 vinst 33554691 state 6 (STANDBY) name reportingdb 2965 915 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=219) 2966 916 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2967 917 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2968 918 2000-11-02-09:29:33 Parent 1 child 16777217 vinst 16777217 state 1 (ONLINE) name Boston 2969 918 2000-11-02-09:29:33 Parent 1 child 33554433 vinst 33554433 state 1 (ONLINE) name San Fransisco 2970 918 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=204) 2971 920 2000-11-02-09:29:33 Parent 16777217 child 16777474 vinst 16777474 state 5 (PRIMARY) name Sales_db 2972 920 2000-11-02-09:29:33 Parent 16777217 child 16777475 vinst 16777475 state 6 (STANDBY) name Sales_db 2973 920 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=201) 2974 922 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2975 925 2000-11-02-09:29:33 Parent 33554433 child 33554690 vinst 33554690 state 5 (PRIMARY) name reportingdb 2976 925 2000-11-02-09:29:33 Parent 33554433 child 33554691 vinst 33554691 state 6 (STANDBY) name reportingdb 2977 925 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=219) 2978 928 2000-11-02-09:29:33 DMON: DRS OP 204: success. (len=61) 2979 929 2000-11-02-09:29:33 DMON: DRS OP 207: success. (len=79) 2980 935 2000-11-02-09:29:34 DMON: DRS OP 207: success. (len=79)
The following example displays the database alert log for the Boston site.
DGMGRL> SHOW LOG ALERT ON SITE 'Boston'; DRSLOG LINE LOG -------------------------------------------------------------------------------- . . . . 14 Starting ORACLE instance (normal) 15 Wed Nov 1 11:26:30 2000 16 Starting ORACLE instance (force) 17 LICENSE_MAX_SESSION = 0 18 LICENSE_SESSIONS_WARNING = 0 19 LICENSE_MAX_USERS = 0 20 Starting up ORACLE RDBMS Version: 9.0.0.0.0. 21 System parameters with non-default values: 22 _trace_files_public = TRUE 23 processes = 30 24 sessions = 38 25 _ksu_diag_kill_time = 30 29 shared_pool_size = 29360128 30 java_pool_size = 4M 31 _trace_events = 10432:6:ALL, 10435:6:LMON,LMD0, 10427:6:ALL, 10429:6:ALL 32 _trace_buffers = FGS:512;BGS:1024 33 disk_asynch_io = FALSE 34 _imr_max_reconfig_delay = 2000 35 control_files = /ade/ctrezza_bstn/oracle/dbs/t_cf1.f 36 _controlfile_enqueue_timeout= 10800 37 _db_block_cache_protect = TRUE 38 db_block_checksum = TRUE 39 db_block_size = 2048 40 compatible = 9.0.0 41 _kcl_debug = TRUE 42 log_checkpoints_to_alert = TRUE 43 instance_number = 1 44 transactions = 21 45 transactions_per_rollback_segment= 21 46 db_block_checking = TRUE 47 O7_DICTIONARY_ACCESSIBILITY= FALSE 48 db_domain = regress.rdbms.dev.us.oracle.com 49 global_names = FALSE 50 distributed_transactions = 10 51 commit_point_strength = 1 52 instance_name = bstn 53 audit_trail = FALSE 54 db_name = bstn 55 ifile = /ade/ctrezza_bstn/oracle/work/tkinit.ora 56 Wed Nov 1 11:26:34 2000
The following example displays the last 20 lines of the database alert log for the Boston site.
DGMGRL> SHOW LOG ALERT LATEST ON SITE 'Boston'; DRSLOG LINE LOG -------------------------------------------------------------------------------- 1672 Thu Nov 2 09:28:07 2000 1673 ALTER SYSTEM SET fal_server='' SCOPE=MEMORY SID='bstn'; 1674 ALTER SYSTEM SET fal_client='bstn' SCOPE=MEMORY SID='bstn'; 1675 Thu Nov 2 09:29:31 2000 1676 ALTER SYSTEM SET fal_server='' SCOPE=MEMORY SID='bstn'; 1677 ALTER SYSTEM SET fal_client='bstn' SCOPE=MEMORY SID='bstn'; 1678 Thu Nov 2 09:29:31 2000 1679 Beginning log switch checkpoint up to RBA [0x11.2.10], SCN:0x0000.00011b11 1680 Thread 1 advanced to log sequence 17 1681 Current log# 2 seq# 17 mem# 0: /ade/ctrezza_bstn/oracle/dbs/t_log2.f 1682 Thu Nov 2 09:29:31 2000 1683 ARC0: Beginning to archive log# 1 thread 1 seq# 16 1684 ARC0: Completed archiving log# 1 seq# 16 thrd# 1 1685 Thu Nov 2 09:29:32 2000 1686 ALTER SYSTEM SET fal_server='' SCOPE=MEMORY SID='bstn'; 1687 ALTER SYSTEM SET fal_client='bstn' SCOPE=MEMORY SID='bstn'; 1688 ALTER SYSTEM SET fal_server='' SCOPE=MEMORY SID='bstn'; 1689 ALTER SYSTEM SET fal_client='bstn' SCOPE=MEMORY SID='bstn'; 1690 Thu Nov 2 09:29:33 2000 1691 Completed checkpoint up to RBA [0x11.2.10], SCN: 0x0000.00
Displays a brief or a detailed summary and status of the specified database resource object.
SHOW RESOURCE [VERBOSE] resource-name [property-name] [ON SITE site-name];
The name of the database resource object for which you want to display information.
The name of the property for which you want to display summary information. See Section 2.8 for a list of database resource properties.
The name of the site object that has the database resource for which you want a brief summary.
VERBOSE
option to display a detailed summary.
ALTER RESOURCE (property)
command to alter the properties of a database resource object, or the
ALTER RESOURCE (state)
command to alter the state of a database resource object.
SHOW RESOURCE
command returns an error message. You must re-issue the SHOW RESOURCE
command and specify a site name with the ON SITE
option.
SHOW DEPENDENCY TREE
command.
The following example shows a brief summary of the database resource object called Sales_db.
DGMGRL> SHOW RESOURCE 'Sales_db'; Resource 'Sales_db' on site 'Boston' depends on 'Boston' Current status for "Sales_db": SUCCESS
The following example uses the VERBOSE
option to show complete information about the database resource object called Sales_db on the Boston site.
DGMGRL> SHOW RESOURCE VERBOSE 'Sales_db' ON SITE 'Boston'; Resource Name: Sales_db Manager Type: internal Standby Type: PHYSICAL Online States: ONLINE PHYSICAL-APPLY-READY PHYSICAL-APPLY-ON READ-ONLY READ-WRITE READ-WRITE-XPTON Properties: INTENDED_STATE = 'READ-WRITE' ENABLED = 'yes' IGNORE_STATUS = 'no' LogArchiveDestOptions = '' ArchiveDestDependency = '' StandbyArchiveDest = '' LogArchiveTrace = '127' FalServer = '' FalClient = '' StandbyFileManagement = 'Manual' ArchiveLagTarget = '0' PrimaryLogSeqNumbers = '(monitor)' PrimaryLogTimes = '(monitor)' SendQEntries = '(monitor)' LogXptStatus = '(monitor)' SbyLogSeqNumbers = '(monitor)' SbyLogTimes = '(monitor)' SbyLogQueue = '(monitor)' Properties for 'PRIMARY' state: DEFAULT_STATE = 'READ-WRITE-XPTON' EXPLICIT_DISABLE = 'no' REQUIRED = 'yes' Properties for 'STANDBY' state: DEFAULT_STATE = 'PHYSICAL-APPLY-ON' EXPLICIT_DISABLE = 'no' REQUIRED = 'no'
Displays a brief or detailed summary of the specified site object.
SHOW SITE [VERBOSE] site-name [property-name];
The user-friendly name of the site object for which you want to display information.
The name of the property for which you want to display summary information. Available properties are:
See Section 2.8 for complete information about properties.
VERBOSE
option to display a detailed summary.
SHOW DEPENDENCY TREE
command to display dependency tree information about a site object.
ALTER SITE
command to change the state of a site object.
The following example shows a brief summary of the site object called Boston. DGMGRL> SHOW SITE 'Boston'; Site 'Boston' is Hostname is 'boston' Instance name is 'bstn' Service name is 'bstn' Standby is maintained as 'physical' Site has 1 resource Resource is 'Sales_db' Current status for "Boston": SUCCESS
The following example uses the VERBOSE
option to show complete information
about the site object called Boston.
DGMGRL> SHOW SITE VERBOSE 'Boston';
Site
Name: 'Boston'
Hostname: 'boston'
Instance name: 'bstn'
Service Name: 'bstn'
Standby Type: 'physical'
Number Built-in Processes: '2'
Number Generic Processes: '0'
ENABLED: 'yes'
REQUIRED: 'yes'
DEFAULT STATE: 'PRIMARY'
INTENDED STATE: 'PRIMARY'
Number of resources: 1
Resources:
Name: Sales_db (default) (verbose name='Sales_db')
The following example shows the status property of the site object called Boston. DGMGRL> SHOW SITE 'Boston' STATUS; STATUS = 'SUCCESS'
Shuts down a currently running Oracle database instance.
None.
SHUTDOWN
command with no arguments is equivalent to using the SHUTDOWN NORMAL
command.
CONNECT
command.
SHUTDOWN
command:
ABORT
Proceeds with the fastest possible shutdown of the database without waiting for calls to complete or for users to disconnect from the database. Uncommitted transactions are not rolled back. Client SQL statements currently being processed are terminated. All users currently connected to the database are implicitly disconnected, and the next database startup will require instance recovery. You must use this option if a background process terminates abnormally.
IMMEDIATE
Does not wait for current calls to complete or users to disconnect from the database. Further connections are prohibited. The database is closed and dismounted. The instance is shut down, and no instance recovery is required on the next database startup.
NORMAL
This is the default option which waits for users to disconnect from the database. Further connections are prohibited. The database is closed and dismounted. The instance is shut down, and no instance recovery is required on the next database startup.
The following command shuts down the database in normal mode:
DGMGRL > SHUTDOWN; Database closed. Database dismounted. Oracle instance shut down.
Starts an Oracle database instance with any of the following options:
SHUTDOWN
ABORT
mode before restarting it.
RESTRICTED SESSION
system privilege to connect to the database.
DB_NAME
.
STARTUP
[FORCE]
[RESTRICT]
[PFILE=file-name]
[MOUNT [database-name] | OPEN [open-options] [database-name] | NOMOUNT];
The name of the initialization parameter file to be used when starting the database instance. If you do not specify the PFILE parameter option, then the default startup parameter file (specific to your operating system) is used.
The name of the database to mount or open. If you do not specify the database-name
parameter, the database name is taken from the initialization parameter DB_NAME
.
The mode of access in which you want the specified database to start. The possible modes are:
STARTUP
command if the broker configuration is enabled.
CONNECT
command.
STARTUP
command with no arguments is equivalent to using the STARTUP OPEN
command.
FORCE
option when you use the STARTUP
command and the current database instance is running, an error results. The FORCE
option is useful when you are debugging and when error conditions are occurring. Otherwise, it should not be used.
RESTRICT
option to allow only Oracle users with the RESTRICTED SESSION
system privilege to connect to the database. Later, you can use the ALTER SYSTEM
command to disable the restricted session feature.
PFILE
option to specify the initialization parameter file, the STARTUP
command uses your default initialization parameter file. The default initialization parameter file is platform specific. For example:
$oracle_home
/DBS/INIT$oracle_sid
.ORA
%oracle_home
%\DATABASE\INITORCL.
ORA
See your operating system-specific documentation for more information about the default initialization parameter file.
MOUNT
option to mount a database without opening it. If you do not specify a database name, the database name is taken from the initialization parameter DB_NAME
.
OPEN
option to mount and open the specified database.
NOMOUNT
option starts the database instance without mounting it. You cannot use the NOMOUNT
option with the MOUNT
or OPEN
options.
STARTUP
command to start an Oracle instance for an Oracle7 database server.
The following examples show two different methods for starting a database instance. Each command starts a database instance using the standard parameter file, mounts the default database in exclusive mode, and opens the database.
DGMGRL> STARTUP; DGMGRL> STARTUP OPEN database;
The following command shuts down the current instance, immediately restarts it without mounting or opening the database, and allows only database administrators to connect to it.
DGMGRL > STARTUP FORCE RESTRICT NOMOUNT;
The following command starts an instance using the parameter file testparm
without mounting the database:
DGMGRL > STARTUP PFILE=testparm NOMOUNT;
The following command shuts down a particular database, immediately restarts and opens it in parallel mode, allows access only to database administrators, and uses the parameter file MYINIT.ORA
.
DGMGRL > STARTUP FORCE RESTRICT PFILE=myinit.ora SHARED OPEN database;
The following example starts and mounts a database instance, but does not open it.
DGMGRL> CONNECT / ; Connected. DGMGRL> STARTUP MOUNT; ORACLE instance started.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|