Manage Your Test Master Databases

Manage your outdated Test Master database to free up space for a more current Test Master and snapshots. You can view a list of Test Master and snapshot databases, delete outdated clones, and refresh Test Master databases that are clones of an active database.

Display a List of Databases

View a list of database names, roles, and details.
  1. Log into the Test Master Server as opc , then sudo to root.
  2. Run the gDBClone listdbs command.
    [root@tstmstr gDBClone]# /opt/gDBClone/gDBClone listdbs
    Database Name    Database Type   Database Role      Master/Snapshot  Location/Parent
    -------------    -------------   -------------      ---------------  ---------------
    PRODDB           SINGLE          PRIMARY            n/a              ASM
    TSTDEV           SINGLE          PRIMARY            Snapshot         PRODDB
    TSTMSTR          SINGLE          PHYSICAL_STANDBY   Master           /u02/app/oracle/oradata/SDBP1/.ACFS/snaps/

Refresh a Clone Test Master Database

When you create a Test Master using RMAN active duplication or RMAN full database backup, the Test Master is not synchronized with the production database and the data quickly becomes outdated. When the data is stale, refresh the Test Master.
To refresh the Test Master, delete the Test Master and then use RMAN active duplication or RMAN backup from production, depending on which method you have configured, to create a new Test Master. When you use a physical standby database as the Test Master, the data in the Test Master is always synchronized with your production database and you don't need to refresh the data.
  1. Display a list of databases to confirm the Test Master name.
    [root@tstmstr gDBClone]# opt/gDBClone/gDBClone listdbs
    
  2. Delete and unregister the Test Master.
    The -force option unregisters the database. In this example, we're deleting the Test Master database named TSTMSTR
    [root@tstmstr gDBClone]# /opt/gDBClone/gDBClone deldb -tdbname TSTMSTR -force
  3. Create a Test Master using RMAN active duplication or RMAN full database backup, depending on which option you configured.

Delete a Test Master Database

Use the gDBClone deldb command with the -force option to delete and unregister a Test Master database.

When you want to refresh a Test Master that is either a full backup copy or a clone of the active database, delete and unregister the Test Master. Then, create a fresh Test Master by mounting a new database backup on the Test Master Server or by creating a clone of the active database.
  1. Log into the Test Master Server as opc , then sudo to root.
  2. Delete and unregister the Test Master.
    The -force option unregisters the database. If you don't use the -force option, the Oracle Database Configuration Assistant (DBCA) deletes the database. In this example, we're deleting the Test Master database named TSTDEV.
    [root@tstmstr gDBClone]# /opt/gDBClone/gDBClone deldb -tdbname TSTDEV -force
  3. (Optional) Use the listdbs command to display a list of databases and confirm that the deleted database doesn't appear in the list.
     [root@tstmstr gDBClone]# /opt/gDBClone/gDBClone listdbs