EM Express 12c Performance Page

EM Express 12c Performance Page

 

Oracle EM Express Performance Page provides the ability to administrate the Users, Roles, and Profile requirements of an Oracle database.  This article covers the general layout of EM Express Performance Page and its functional usage.

 

  1. Logon the EM Express as an administrative user.   In this case we will use the URL:  https://10.30.15.63:5500/em.   This indicates the EM Express is installed on server 10.30.15.63, listening on port 5500 (which is the default).  NOTE:  You may receive a certificate warning but select continue to site option.   Enter your sysdba credentials at the sign in page and mark the check box as sysdba, normally this is the user name and password you used to create the database.

  1. From the top level drop down memory you have four options: Configuration, Storage, Security and Performance.

  1. The Performance option allows access to view performance of the database via the Performance Hub and perform performance optimization via the SQL Tuning Advisor.

  1. The Performance Hub option allows you to view the performance of your database based on multiple criteria and via a Summary, Activity, Workload, Monitored SQL, ADDM views. This can provide insight into the optimization of your instance and database configurations.

  1. The SQL Tuning Advisor option allows you to tune individual SQL statements and monitor executing SQL within the database. NOTE:   This option requires additional Tuning Pack license.

This article summarized the feature and use of the Performance Page of Oracle 12c EM Express.

 

Larry Catt

OCP

Oracle 12c – Flashback Version Query

Flashback Version Query is used to get metadata and historical data for a particular time interval.  This is done by VERSIONS BETWEEN clause with time interval being either timestamps or SCN using the following pseudo columns:

  • VERSIONS_START
  • VERSIONS_END
  • VERSIONS_XID
  • VERSIONS_OPERATIONS

 

Return columns are from START date and up until (not including) the END date.

 

EXAMPLE:

 

 

  1. Logon to your Oracle 12c database as user scott.

 

[oracle@linux2 flash_recovery_area]$ sqlplus scott/password

SQL*Plus: Release 12.1.0.2.0 Production on Fri Jan 6 07:33:45 2015

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Last Successful login time: Wed Jan 04 2015 07:45:52 -05:00

Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production

With the Partitioning, OLAP, Advanced Analytics, Real Application Testing

and Unified Auditing options

SQL>

 

  1. Create a table fb_scott.

 

SQL> create table fb_test(fname varchar2(30), amt number);

Table created.

 

  1. Select current system timestamp

 

select systimestamp from dual;

SQL> select systimestamp from dual;

SYSTIMESTAMP

—————————————————————————

06-JAN-15 07.44.13.923919 AM -05:00

SQL>

 

  1. Insert values into your new table fb_test and commit insert.

 

insert into scott.fb_test(fname,amt) values(‘Larry’,111);

commit;

SQL> insert into scott.fb_test(fname,amt) values(‘Larry’,111);

commit;

1 row created.

SQL>

Commit complete.

SQL>

 

  1. Now perform 3 update operations on table fb_test and commit between each update.

 

update scott.fb_test set amt=222 where fname=’Larry’;

commit;

update scott.fb_test set amt=333  where fname=’Larry’;

commit;

update scott.fb_test set amt=444 where fname=’Larry’;

commit;

 

SQL> update scott.fb_test set amt=222 where fname=’Larry’;

commit;

update scott.fb_test set amt=333  where fname=’Larry’;

commit;

update scott.fb_test set amt=444 where fname=’Larry’;

commit;

1 row updated.

SQL>

Commit complete.

SQL>

1 row updated.

SQL>

Commit complete.

SQL>

1 row updated.

SQL>

Commit complete.

SQL>

 

  1. Finally select current systimestamp from dual.

 

select systimestamp from dual;

SQL> select systimestamp from dual;

SYSTIMESTAMP

—————————————————————————

06-JAN-15 07.45.55.308034 AM -05:00

SQL>

 

 

  1. Select the past versions of your table fb_test using the versions between clause.

 

select versions_starttime, versions_endtime, versions_xid, versions_operation as op, amt

from scott.fb_test  versions between timestamp to_timestamp (’06-JAN-15 07:44:13′, ‘DD-MON-YY HH24:MI:SS’) and to_timestamp (’06-JAN-15 07:45:55′, ‘DD-MON-YY HH24:MI:SS’) where fname=’Larry’;

 

Results:

 

SQL> select versions_starttime, versions_endtime, versions_xid, versions_operation as op, amt

from scott.fb_test  versions between timestamp to_timestamp (’06-JAN-15 07:44:13′, ‘DD-MON-YY HH24:MI:SS’) and to_timestamp (’06-JAN-15 07:45:55′, ‘DD-MON-YY HH24:MI:SS’) where fname=’Larry’;

  2

VERSIONS_STARTTIME

—————————————————————————

VERSIONS_ENDTIME

—————————————————————————

VERSIONS_XID     O        AMT

—————- – ———-

06-JAN-15 07.45.30 AM

090009006F0B0000 U        444

06-JAN-15 07.45.30 AM

06-JAN-15 07.45.30 AM

02001500AF0B0000 U        333

VERSIONS_STARTTIME

—————————————————————————

VERSIONS_ENDTIME

—————————————————————————

VERSIONS_XID     O        AMT

—————- – ———-

06-JAN-15 07.45.27 AM

06-JAN-15 07.45.30 AM

04000A00680A0000 U        222

06-JAN-15 07.45.12 AM

06-JAN-15 07.45.27 AM

VERSIONS_STARTTIME

—————————————————————————

VERSIONS_ENDTIME

—————————————————————————

VERSIONS_XID     O        AMT

—————- – ———-

080021001F0C0000 I        111

SQL>

 

  1. This completes viewing previous versions of a table in Oracle 12c.

 

Larry Catt

OCP

Oracle 12c – Migrating Data by Using Oracle Data PUMP

You can use Data Pump to migrate an existing Oracle database into an empty 12c Database with or without transportable option.  This is known as full transportable export/import if transportable option is in use.  Non-transportable tablespaces like SYSTEM and SYSAUX cannot use transportable option and must use conventional data movement.

 

Considerations when using Data Pump to populate new 12c Oracle database.

  1. You can use Data Pump to do this but oracle recommends upgrading to 11.2.0.3 or higher to ensure that registered options and components are included in export.
  2. When doing this with 11.2.0.3 or higher set VERSION=12 option in data pump export. This is for transportable tablespaces.
  3. For Network-based full transportable imports use parameter FULL=YES, TANSPORTABLE=ALWAYS, and TANSPORT_DATAFILES=datafile_name for source db higher than 11.2.0.3 but lower then 12.1
  4. File-based full transportable imports only require use of TRANSPORT_DATAFILE=datafile_name.
  5. Default Data Pump directory object DATA_PUMP_DIR does not work with PDBs, you have to create an explicit directory object within the PDB for export and import operations.

 

 

Larry Catt

OCP