DB Administration with Era

We will now see how to perform normal database admin task with Era.

In this lab you will Administor your ORACLE DB

Explore Your Database

  1. In Era, select Databases from the dropdown menu and Sources from the lefthand menu.

    ../../../_images/180.png
  2. Click into your Initials-proddb, this will take you back into the Database Summary page. This page provides details of the Database, Database Server access, Time Machine schedule, Compute/Network/Software profiles used to provision.

    • Database Summary:

    ../../../_images/259.png
    • Database Server:

    ../../../_images/340.png
    • Time Machine:

    ../../../_images/423.png
    • Profiles:

    ../../../_images/525.png

Snapshot Your Database

Before we take a manual snapshot of our Database, lets write a new table into our ProdDB.

Write New Table Into Database

  1. SSH (Terminal/Putty) into your Initials-proddb VM

    • User Name - oracle

    • Password - Nutanix/4u

    ssh oracle@PRODDB IP
    
  2. Launch sqlplus

    sqlplus / as sysdba
    
  3. Execute the following to create a table:

    CREATE TABLE testlabtable
    (
    column1 VARCHAR(30),
    column2 DATE
    );
    
  4. Verify the new table is there by executing the following to list the table:

    select owner as schema_name,
    table_name
    from sys.all_tables
    where table_name like 'TEST%';
    

Take Manual Snapshot of Database

  1. In Era, select Databases from the dropdown menu and Sources from the lefthand menu.

  2. Click on the Time Machine for your Database Initials-proddb_TM

    ../../../_images/617.png
  3. Click Actions > Log Catch Up.

    ../../../_images/1217.png
  4. Click **Yes*

  5. Once that is complete, click Actions > Snapshot.

    ../../../_images/715.png
    • Snapshot Name - Initials-proddb-1st-Snapshot

    ../../../_images/815.png
  6. Click Create

  7. Select Operations from the dropdown menu to monitor the registration. This process should take approximately 2-5 minutes.

Clone Your Database Server & Database

  1. In Era, select Time Machines from the dropdown menu and select Initials-proddb_TM

  2. Click Actions > Clone Database.

    • Snapshot - Initials-proddb-1st-Snapshot (Date Time)

    ../../../_images/915.png
  3. Click Next

    • Database Server - Create New Server

    • Database Server Name - Initials_oracle_prod_Clone1

    • Compute Profile - ORACLE_SMALL

    • Network Profile - Primary-ORACLE-Network

    • SSH Public Key Through - Select Text

    ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAii7qFDhVadLx5lULAG/ooCUTA/ATSmXbArs+GdHxbUWd/bNGZCXnaQ2L1mSVVGDxfTbSaTJ3En3tVlMtD2RjZPdhqWESCaoj2kXLYSiNDS9qz3SK6h822je/f9O9CzCTrw2XGhnDVwmNraUvO5wmQObCDthTXc72PcBOd6oa4ENsnuY9HtiETg29TZXgCYPFXipLBHSZYkBmGgccAeY9dq5ywiywBJLuoSovXkkRJk3cd7GyhCRIwYzqfdgSmiAMYgJLrz/UuLxatPqXts2D8v1xqR9EPNZNzgd4QHK4of1lqsNRuz2SxkwqLcXSw0mGcAL8mIwVpzhPzwmENC5Orw==
    
    ../../../_images/1014.png
  4. Click Next

    • Clone Name - Initials_proddb_Clone1

    • SID - Initialsprod

    • SYS and SYSTEM Password - Nutanix/4u

    • Database Parameter Profile - ORACLE_SMALL_PARAMS

    ../../../_images/1118.png
  5. Click Clone

  6. Select Operations from the dropdown menu to monitor the registration. This process should take approximately 30-50 minutes.

Delete Table and Clone Refresh

There are times when a table or other data gets deleted (by accident), and you would like to get it back. here we will delete a table and use the Era Clone Refresh action from the last snapshot we took.

Delete Table

  1. SSH (Terminal/Putty) into your Initials-proddb_Clone1 VM

    • User Name - oracle

    • Password - Nutanix/4u

    ssh oracle@PRODDB_Clone1 IP
    
  2. Launch sqlplus

    sqlplus / as sysdba
    
  3. Execute the following to Drop the table:

    DROP TABLE testlabtable;
    
  4. Verify the table is gone by executing the following to list the table:

    select owner as schema_name,
    table_name
    from sys.all_tables
    where table_name like 'TEST%';
    

Clone Refresh

  1. In Era, select Databases from the dropdown menu and Clones from the lefthand menu.

  2. Select the Clone for your Database Initials_proddb and Click Refresh.

    • Snapshot - Initials_proddb-1st-Snapshot (Date Time)

  3. Click Refresh

  4. Select Operations from the dropdown menu to monitor the registration. This process should take approximately 2-5 minutes.

Verify Table is Back

  1. SSH (Terminal/Putty) into your Initials-proddb_Clone1 VM

    • User Name - oracle

    • Password - Nutanix/4u

    ssh oracle@PRODDB_Clone1 IP
    
  2. Launch sqlplus

    sqlplus / as sysdba
    
  3. Verify the table is back by executing the following to list the table:

    select owner as schema_name,
    table_name
    from sys.all_tables
    where table_name like 'TEST%';
    

Takeaways