Oracle9i Data Guard Broker
Release 1 (9.0.1)

Part Number A88807-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 next page

6
Data Guard Command-Line Interface Reference

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.

6.1 Starting 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>

6.1.1 DGMGRL Optional Parameters

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:

The following subsections specify the command format that you enter at the DGMGRL> prompt.

6.1.2 DGMGRL Command Format and Parameters

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.

Table 6-1  Summary of DGMGRL Commands
Command  Effect 

ALTER CONFIGURATION 

Alters a broker configuration state from online to offline, or from offline to online 

ALTER RESOURCE (property) 

Allows you to change the value of a property for the specified database resource object 

ALTER RESOURCE (state) 

Allows you to change the state of the specified database resource object 

ALTER SITE 

Allows you to change the state of a site object from online to offline, or from offline to online 

ALTER SITE (AUTO PFILE) 

Allows you to specify the initialization parameter file used to automatically restart the database of the site as needed by the client 

CONNECT 

Connects a given username to the specified database 

CREATE CONFIGURATION 

Creates a broker configuration, a primary site object, and a database resource object on the primary site 

CREATE SITE 

Creates a new standby site object and a database resource object, and adds them to the broker configuration 

DISABLE CONFIGURATION 

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 RESOURCE 

Disables a database resource object in the broker configuration so that the database resource object is no longer managed by the broker 

DISABLE SITE 

Disables the specified standby site object in the broker configuration so that the standby site object and any database resource objects on the standby site are no longer managed by the broker 

ENABLE CONFIGURATION 

Enables the broker configuration so that the broker can actively manage it 

ENABLE RESOURCE 

Enables a database resource object in the broker configuration so that the broker can actively manage it 

ENABLE SITE 

Enables a standby site object in the broker configuration so that the broker can actively manage it 

EXIT 

Exits the Data Guard command-line interface 

HELP 

Displays online help for the Data Guard command-line interface 

QUIT  

Quits the Data Guard command-line interface 

REMOVE CONFIGURATION 

Removes the broker configuration including all of its site objects and database resource objects 

REMOVE SITE 

Removes a standby site object from the broker configuration including all of the database resource objects running on the standby site 

SHOW CONFIGURATION 

Displays a brief or a detailed summary of information about the broker configuration 

SHOW DEPENDENCY TREE 

Displays the dependency tree and default online states for the broker configuration 

SHOW LOG 

Shows the Data Guard configuration log or the Oracle database alert log 

SHOW RESOURCE 

Displays a brief or a detailed summary of information about the named database resource object and its status 

SHOW SITE 

Displays a brief or a detailed summary of information about the site object in the broker configuration 

SHUTDOWN 

Shuts down a currently running Oracle database instance 

STARTUP 

Starts an Oracle instance with several options, including mounting and opening a database 

6.1.3 DGMGRL Command Usage Notes

To use the Data Guard command-line interface, the following must be true:

Command Examples

Example 1

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.
Example 2

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.

6.2 Stopping the Data Guard Command-Line Interface

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.


ALTER CONFIGURATION

Alters the intended (runtime) state of the broker configuration.

Format

ALTER CONFIGURATION SET STATE = state;

Command Parameters

state

The state in which you want the configuration to be running when the configuration is enabled. The possible states are:

OFFLINE
ONLINE

Usage Notes

Command Examples

Example 1

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.

ALTER RESOURCE (property)

Allows you to change the value of a property for the specified database resource object.

Format

ALTER RESOURCE resource-name [ON SITE site-name]

Command Parameters

resource-name

The name of the database resource object for which you want to set a property value.


site-name

The name of the site object where the database resource object is located.

property-name

The name of the property for which you want to set a new value. Section 2.8 describes the database resource properties in detail.

value

The new value for the property. Section 2.8 describes the values for each property.

Usage Notes

Command Examples

Example 1

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.


ALTER RESOURCE (state)

Allows you to change the state of the specified database resource object.

Format

ALTER RESOURCE resource-name [ON SITE site-name]

Command Parameters

resource-name

The name of the database resource object for which you want to change the state.


site-name

The name of the site object that contains the database resource object that you want to alter.

state

The state to which the database resource will transition when it is enabled.

Usage Notes

Command Examples

Example 1

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.


ALTER SITE

Allows you to change the state of a site object.

Format

ALTER SITE site-name

Command Parameters

site-name

The name of the site object for which you want to change state.

state

The state to which the site will transition when it is enabled. The possible states are:

OFFLINE
ONLINE

Usage Notes

Command Examples

Example 1
DGMGRL> ALTER SITE 'Boston' SET STATE='online';
Succeeded.

ALTER SITE (AUTO PFILE)

Allows you to specify an initialization parameter file that will be used to automatically restart the database of the site.

Format

ALTER SITE site-name

Command Parameters

site-name

The name of the site object for which you want to specify the automatic restart initialization parameter file.

initialization-file

The name of the initialization parameter file that will be used to automatically restart the database of the site.

Usage Notes

Command Examples

Example 1
DGMGRL> ALTER SITE 'Boston' SET AUTO PFILE='/oracle/dbs/initbs.ora';

Succeeded.
Example 2
DGMGRL> ALTER SITE 'Boston' SET AUTO PFILE=OFF;
Succeeded.

CONNECT

Connects a given username to the specified database.

Format

CONNECT username/password[@net-service-name];

Command Parameters

username/password

Represents the username and password with which you want to connect to the database.

net-service-name

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.

Usage Notes

Command Examples

Example 1

This example connects to the default database on the local system.

DGMGRL> CONNECT sys/change_on_install;
Connected.
Example 2

This example connects to a remote database whose service name is prmy.

DGMGRL> CONNECT sys/change_on_install@prmy;
Connected.

CREATE CONFIGURATION

Creates a new broker configuration, and creates and adds a primary site object and a database resource object to the configuration.

Format

CREATE CONFIGURATION configuration-name AS

Command Examples

Example 1

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.

CREATE SITE

Creates a new standby site object and database resource object and adds it to an existing broker configuration.

Format

CREATE SITE site-name

Command Examples

Example 1

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.

DISABLE CONFIGURATION

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.

Format

DISABLE CONFIGURATION;

Command Parameters

None.

Usage Notes

Command Examples

Example 1

The following example disables the broker configuration and all of its sites and database resources.

DGMGRL> DISABLE CONFIGURATION;
Disabled.

DISABLE RESOURCE

Disables a database resource so that it is no longer managed by the broker.

Format

DISABLE RESOURCE resource-name [ON SITE site-name];

Command Parameters

resource-name

The name of the database resource object that you want to disable.

site-name

The user-friendly name of the site containing the database resource that you want to disable.

Usage Notes

Command Examples

Example 1

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.

DISABLE SITE

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.

Format

DISABLE SITE site-name;

Command Parameters

site-name

The user-friendly name of the standby site that you want to disable.

Usage Notes

Command Examples

Example 1

The following example demonstrates how to disable the San Francisco standby site.

DGMGRL> DISABLE SITE 'San Francisco';
Disabled.




ENABLE CONFIGURATION

Enables the broker to actively manage the broker configuration including all of its site objects and database resource objects.

Format

ENABLE CONFIGURATION;

Command Parameters

None.

Usage Notes

Command Examples

Example 1

The following example enables a broker configuration.

DGMGRL> ENABLE CONFIGURATION;
Enabled.

ENABLE RESOURCE

Enables the broker to actively manage the specified database resource object.

Format

ENABLE RESOURCE resource-name [ON SITE site-name];

Command Parameters

resource-name

The name of the database resource object you want to manage with the broker.

site-name

The user-friendly name of the site object containing the database resource object that you want to enable.

Usage Notes

Command Examples

Example 1

The following example enables the database resource object named Sales_db.

DGMGRL> ENABLE RESOURCE 'Sales_db';
Enabled.

ENABLE SITE

Enables the broker to actively manage the specified standby site object, including its database resource objects.

Format

ENABLE SITE site-name;

Command Parameters

site-name

The user-friendly name of the standby site object you want to manage with the broker.

Usage Notes

Command Examples

Example 1

The following example enables the standby site named Boston.

DGMGRL> ENABLE SITE 'San Francisco';
Enabled.

EXIT

Exits the command-line interface.

Format

EXIT;

Usage Notes

Command Examples

Example 1

The following example demonstrates how to exit (quit) the command-line interface.

DGMGRL> EXIT;

HELP

Displays online help for the Data Guard command-line interface.

Format

HELP [<topic>];

Command Parameters

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:

ALTER
CONNECT
CREATE
DISABLE
ENABLE
EXIT
HELP
QUIT
REMOVE
SHOW
SHUTDOWN
STARTUP

Usage Notes

A database connection is not required to execute this command.

Command Examples

Example 1

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>;

QUIT

Exits the Data Guard command-line interface.

Format

QUIT;

Usage Notes

Command Examples

Example 1

The following example shows how to quit (exit) the command-line interface.

DGMGRL> QUIT;

REMOVE CONFIGURATION

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.


Caution:

When you use the REMOVE CONFIGURATION command, all information is deleted from the Data Guard configuration file and cannot be recovered. 


Format

REMOVE CONFIGURATION;

Command Parameters

None.

Usage Notes

Command Examples

Example 1
DGMGRL> REMOVE CONFIGURATION;
Removed configuration.

REMOVE SITE

Removes the specified standby site object from the broker configuration.


Caution:

When you use the REMOVE SITE command, all of the information about the standby site and the database resources on the site is deleted from the Data Guard configuration file and cannot be recovered. 


Format

REMOVE SITE site-name;

Command Parameters

site-name

The user-friendly name of the standby site that you want to remove.

Usage Notes

Command Examples

Example 1
DGMGRL> REMOVE SITE 'San Francisco';
Removed site "San Fransisco" from configuration.

SHOW CONFIGURATION

Displays a brief or a detailed summary about the broker configuration.

Format

SHOW CONFIGURATION [VERBOSE] [property-name];

Command Parameters

property-name

The name of the property for which you want to display summary information. Available properties are:

ENABLED
EXPLICIT_DISABLE
INTENDED_STATE
HEALTH_CHECK_INTERVAL
STATUS

See Section 2.8 for complete information about properties.

Usage Notes

Command Examples

Example 1

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
Example 2

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
Example 3

The following example shows the STATUS property for the Sales configuration.

DGMGRL> SHOW CONFIGURATION STATUS;
  STATUS = 'SUCCESS'

SHOW DEPENDENCY TREE

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.

Format

SHOW DEPENDENCY TREE;

Usage Notes

For detailed information about the configuration, use the SHOW CONFIGURATION command.

Command Examples

Example 1

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.


SHOW LOG

Displays the Data Guard configuration log or database alert log from the named site object.

Format

SHOW LOG [ALERT] [LATEST] ON SITE site-name;

Command Parameters

ALERT

Displays the database alert log for the specified site object.

LATEST

Specifies the last 20 lines of the SHOW LOG command output.

site-name

The user-friendly name of the site for which you want to display the Data Guard configuration log or the database alert log.

Usage Notes

If you omit the ALERT parameter, then the Oracle Data Guard configuration log for the named site is displayed.

Command Examples

Example 1

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)
    .
    .
    .
    .
Example 2

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)
Example 3

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
Example 4

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

SHOW RESOURCE

Displays a brief or a detailed summary and status of the specified database resource object.

Format

SHOW RESOURCE [VERBOSE] resource-name [property-name] [ON SITE site-name];

Command Parameters

resource-name

The name of the database resource object for which you want to display information.

property-name

The name of the property for which you want to display summary information. See Section 2.8 for a list of database resource properties.

site-name

The name of the site object that has the database resource for which you want a brief summary.

Usage Notes

Command Examples

Example 1

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
Example 2

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'

SHOW SITE

Displays a brief or detailed summary of the specified site object.

Format

SHOW SITE [VERBOSE] site-name [property-name];

Command Parameters

site-name

The user-friendly name of the site object for which you want to display information.

property-name

The name of the property for which you want to display summary information. Available properties are:

ENABLED
EXPLICIT_DISABLE
INTENDED_STATE
HEALTH_CHECK_INTERVAL
STATUS

See Section 2.8 for complete information about properties.

Usage Notes

Command Examples

Example 1
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
Example 2
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')
Example 3
The following example shows the status property of the site object called Boston.
DGMGRL> SHOW SITE 'Boston' STATUS;
  STATUS = 'SUCCESS'

SHUTDOWN

Shuts down a currently running Oracle database instance.

Format

Command Parameters

None.

Usage Notes

Command Examples

Example 1

The following command shuts down the database in normal mode:

DGMGRL > SHUTDOWN;

Database closed. 
Database dismounted. 
Oracle instance shut down.


STARTUP

Starts an Oracle database instance with any of the following options:

Format

STARTUP

Command Parameters

file-name

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.

database-name

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.

open-options

The mode of access in which you want the specified database to start. The possible modes are:

READ ONLY
READ WRITE

Usage Notes

Command Examples

Example 1

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;
Example 2

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;
Example 3

The following command starts an instance using the parameter file testparm without mounting the database:

DGMGRL > STARTUP PFILE=testparm NOMOUNT;
Example 4

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;
Example 5

The following example starts and mounts a database instance, but does not open it.

DGMGRL> CONNECT / ;
Connected.
DGMGRL> STARTUP MOUNT;
ORACLE instance started. 


Go to previous page 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