DSRUTIL applyextent qualifier

Allows you to apply AI extents, generated by your source database, directly to a target database. This is useful when there is a source failure and there are AI blocks in transit between the server and agents.

Syntax

dsrutil db-name -C applyextent extent-name

Parameters

db-name
The name of the target database.
extent-name
The fully qualified path name of the extent to apply. See the topic below for details on how to identify an extent to apply.

Your Replication configuration must meet the following requirements in order to apply extents:

  • The agent must be in pre-transition state.
  • The transition property must be set to manual.
  • The source must save AI extents to remote storage that is accessible to the target's agent.
  • If you have AI streaming enabled, your RSB cache must be empty. The applyextent command will cause the AI blocks contained in the extent to be written to the RSB cache. If it is not empty, attempting to apply an extent, results in the following message:
    The extent cannot be applied. There are %d unapplied blocks remaining in the RSB
     cache. (19292)
    Note: While the replication agent main thread is in the applying-extent state, you cannot run the triggertranistion command. With AI Streaming replication, you cannot run subsequent applyextent commands while the agent is in the applying-extent state. The writer thread must first empty the RSB cache and the main agent thread will move out of the applying-extent state.

Identifying the AI extent to apply

Identifying the AI extent to apply is a multi-step process.

  • First, determine which extent to apply by using the following command:
    dsrutil db-name -C recovery Agent

    The recovery output provides the output After Image File Number and Completely Applied to Target, as shown:

                                  .
                                  .
                                  .
      Last AI Extent processed
       AIMAGE BEGIN date:              Tue Oct 18 13:33:31 2005
       AIMAGE NEW date:                Tue Oct 18 13:48:55 2005
       After Image File Number:        3
       File Last Opened:               Tue Oct 18 13:48:55 2005
       Completely Applied to Target:   No

    If Completely Applied to Target is No, use the After Image File Number provided. If Completely Applied to Target is Yes, increment the After Image File Number value by 1.

  • After determining the AI Image File number, locate the file, as follows:
    • If the source database is available, use the following command to generate a list of after-image extents for the source database:

      rfutil source-db-name -C aimage list

      Executing the command produces the following output:

      Extent:  1
      Status:  Full
        Type:  Variable Length
        Path:  /vobs_repl/solaris/bin/ks1.a1
        Size:  120
        Used:  1
       Start:  Wed Oct 26 08:32:12 2005
       Seqno:  1
      
      Extent:  2
      Status:  Full
        Type:  Variable Length
        Path:  /vobs_repl/solaris/bin/ks1.a2
        Size:  4728
        Used:  4534
       Start:  Wed Oct 26 08:32:14 2005
       Seqno:  2
      
      Extent:  3
      Status:  Busy
        Type:  Variable Length
        Path:  /vobs_repl/solaris/bin/ks1.a3
        Size:  4728
        Used:  4456
       Start:  Wed Oct 26 08:33:29 2005
       Seqno:  3
      
      Extent:  4
      Status:  Empty
        Type:  Variable Length
        Path:  /vobs_repl/solaris/bin/ks1.a4
        Size:  120
        Used:  0
       Start:  N/A
       Seqno:  0

      Match the Seqno from this output to the After Image File Number provided by the DSRUTIL recovery output. Apply all BUSY and FULL extents beginning with this extent.

    • If the source database is unavailable, but its after-image extents are available on a SAN or NAS device that the target machine has access to, you can determine the first after-image extent to apply, by examining the AI files.
      1. Change to the directory where the source after-image extents are stored, and then execute the following command:
        rfutil db-name -C aimage scan -a after-image-extent-name

        The database you specify in the db-name location in the command can be any database provided it has AI enabled and an AI block size that is the same as the original source database. However, this command must be run offline, so the database specified must be offline.

        The command produces the following output:

        After-image dates for this after-image file: (1633)
            Last AIMAGE BEGIN Wed Oct 26 08:32:12 2005 (1640)
            Last AIMAGE NEW Wed Oct 26 08:33:29 2005 (1641)
            This is aimage file number 3 since the last AIMAGE BEGIN. (1642)
            This file was last opened for output on Wed Oct 26 08:33:29 2005. (1643)
        
        
        41706 notes were processed. (1634)
        0 in-flight transactions. (3785)
        614 transactions were started. (1635)
        614 transactions were completed. (11138) At the end of the .ai file, 0 transactions were still active. (1636)
      2. Match the This is aimage file number n from this output to the After-Image File Number provided by the DSRUTIL recovery output. Apply all BUSY and FULL extents beginning with this extent.

For more information on applying extents, see Manually apply after-image extents.