Oracle *daily* TidBits” (#oratidbit) published on Facebook, Twitter, and Google+ during weekdays in October 2017. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well… Hope you find these helpful to learn something new or to remind you of its existence and use.

#oratidbit By default, the database retains optimizer statistics for 31 days. You can configure the retention period using the DBMS_STATS.ALTER_STATS_HISTORY_RETENTION procedure.
#oratidbit DBMS_STATS.REPORT_STATS_OPERATIONS generates a report of all statistics operations that occurred between two points in time. DBMS_STATS.REPORT_SINGLE_STATS_OPERATION generates a report of the specified operation.
#oratidbit #db12cR2 The terms ‘Patchset’, ‘Patchset Update’, and ‘Database Bundle Patch’ will no longer be meaningful for Oracle DB 12.2 software. RU (Release Update) and RUR (Release Update Revisions) replaces Patchset Update (PSU) strategy.
#oratidbit #db12cR2 New releases will be annual and the version will be the last two digits of the release year. The release originally planned as 12.2.0.2 will be release 18, and the release originally planned as 12.2.0.3 will be release 19.
#oratidbit #11gR2 11.2.0.4 Extended Support fee waived until Dec 2018. #12cR1 12.1.0.2 Extended Support fee waived until Jul 2019.
#oratidbit #db12cR2 New view DBA_STATEMENTS describes SQL statements in stored PL/SQL objects. It is now easier to find the stored program using SQL_ID of a statement.
#oratidbit #db12cR2 New view DBA_IDENTIFIERS displays information about the identifiers in all stored objects in the database.
#oratidbit #db12cR2 VALIDATE_CONVERSION function can be used to determine whether a given input value can be converted to the requested data type.
#oratidbit #db12cR2 The partition maintenance operations SPLIT PARTITION and SPLIT SUBPARTITION can be online operations, allowing concurrent DML operations with the ongoing partition maintenance operation.
#oratidbit #db12cR2 Database Configuration Assistant (DBCA) supports the creation of an Oracle Data Guard standby database from an existing primary database using the DBCA command-line interface.
#oratidbit #db12c Run SQL commands in RMAN without preceding the command with the SQL keyword and no need to enclose the SQL command in quotes.
#oratidbit #exadata18c New oedacli command to do various add/remove actions such as a node on a virtual cluster, database home on physical cluster, storage cell, database home, and so on.
#oratitbit #orcldb AWR_PDB_* Views on a CDB root show the AWR data stored on the CDB root, on a PDB show the AWR data stored on that PDB.
#oratidbit #orcldb The CDB_* views can be queried only by users with the SYSDBA system privilege or SELECT ANY DICTIONARY privilege, or SELECT_CATALOG_ROLE role, or by users with direct privileges granted to them.
#oratidbit #oracldb An INVISIBLE column in a table can be used as a partitioning key. A virtual column can be INVISIBLE.
#oratidbit #orcldb The ORAchk download zip file includes Health Check Catalog file ORAchk_Health_Check_Catalog.html. Catalog shows benefit and impact of the check and link to MOS notes.
#oratidbit #orcldb Oracle Health Check Collections Manager is a companion application (APEX) to ORAchk and EXAchk that gives an enterprise-wide view of the health check collection data.
#oratidbit #dbaas use the bkup_api utility to perform on-demand backups and to change how automatic backups are configured on Oracle Database Cloud Service.
#oratidbit #dbaas use the orec subcommand of the dbaascli utility to restore from backups on Oracle Database Cloud Service.
#oratidbit #dbaas use the dbpatchm subcommand of the dbaascli utility to apply patches on Oracle Database Cloud Service.
#oratidbit #dbaas use the oracle-dbcs-cli utility on your Linux computer to connect to Oracle Cloud and perform a variety of life-cycle and administration operations on Oracle Database Cloud Service deployments.

There are quite a lot of new features in the 12c database that I like and have discussed and talked about them at various events. On this #ThanksODC day, I would like to take the opportunity to thank Oracle Technology Network (or Oracle Developer Community) and Oracle ACE Program for all the support they provide to the DBA and Developer community to share and gain knowledge.

Two simple addition to the 12c database makes my life much easier on the security front. The requirement was to lock the user accounts that are not logged into the database for consecutive 60 days.

1.  Last Login Time 

In releases prior to Oracle Database 12c 12.1 to find out when a user last successfully logged into the database, we need to enable session auditing, which has some overhead and the DBA needs to set up routines to clean the audit table, etc. In 11g database, I had to enable session auditing (keep the session audit records for at least 61 days) and write a SQL querying DBA_USERS and DBA_AUDIT_SESSION to list out all the active users who did not use the database for 60 days.

In 12.1, Oracle automatically registers the successful login time in SYS.USER$ table and is visible in DBA_USERS. The LAST_LOGIN column of DBA_USERS shows the last login time of the user in the database. In 12.1 database, my requirement is met by writing a simple SQL against DBA_USERS using the LAST_LOGIN column! No auditing required. The result is used to build dynamic SQL to lock each account using ALTER USER ACCOUNT LOCK statement (similar to 11g).

BTW, have you noticed, when you login to the database using SQL*Plus, you will see the last login time displayed as well.

2.  Inactive Account Lock

My requirement got completely automated in 12.2 database. Oracle introduced the INACTIVE_ACCOUNT_TIME parameter for user profiles. The INACTIVE_ACCOUNT_TIME profile parameter locks a user account that has not logged in to the database instance in a specified number of days. The default value for INACTIVE_ACCOUNT_TIME is 35. The minimum setting is 15 and the maximum is 24855.

Thanks, Oracle!

#ThanksOTN

#ThanksODC

And thank you, @OracleBase, for doing the appreciation day again!

Oracle *daily* TidBits” (#oratidbit) published on Facebook, Twitter, and Google+ during weekdays in September 2017. You will also see these tidbits, one tidbit at a time, for each page refresh on the right side of this blog as well… Hope you find these helpful to learn something new or to remind you of its existence and use.

#oratidbit #db12cR2 The V$MANAGED_STANDBY view is deprecated in Oracle Database 12c Release 2 (12.2.0.1). Use the new view V$DATAGUARD_PROCESS.
#oratidbit #db12cR2 Starting in Oracle Database 12c Release 2 (12.2), the Advanced Replication feature of Oracle Database is unsupported. Start using Oracle GoldenGate.
#oratidbit #db12cR2 DBUA in Database 12cR2 has pause and continue functionality: You can stop the upgrade, and continue the upgrade at a later time.
#oratidbit #db12cR2 init parameter DATA_GUARD_SYNC_LATENCY defines the maximum amount of time (in seconds) that the primary database may wait before disconnecting subsequent destinations after at least one synchronous standby has acknowledged receipt of the redo.
#oratidbit #db12cR2 init parameter ENABLED_PDBS_ON_STANDBY specifies a subset of pluggable databases (PDBs) for replication on a physical standby of a multitenant container database (CDB). In prior releases, you had to specify either all PDBs or none.
#oratidbit #db12cR2 Oracle Diagnostic Pack can be used with an Oracle Active Data Guard standby database that is open read-only.
#oratidbit #db12cR2 When a physical standby database is converted into a primary, STANDBY_DB_PRESERVE_STATES init parameter lets you keep any sessions connected to the standby during the switchover/failover.
#oratidbit The Enterprise Manager Command Line Interface (EM CLI) enables to access Enterprise Manager functionality through a command-line interface or scripts. EMCLI operates in standard command mode, interactive mode or script mode.
#oratidbit OEM13c EMCLI client is downloaded from your OMS – https:///em/public_lib_download/emcli/kit/emclikit.jar. To be able to do scripting download emcliadvancedkit.jar.
#oratidbit The Oracle Database Provider for DRDA is a network front-end that enables client programs to connect to Oracle Database using the Distributed Relational Database Architecture (DRDA) protocol.
#oratidbit Starting with #DB12cR2, Oracle Net listener supports multiple redirects with the parameter, ALLOW_MULTIPLE_REDIRECTS_listener_name. It supports seamless migration of a PDB from a local database to Public Cloud.
#oratidbit Starting with #db12cR2, data compression can be set in the sqlnet.ora file using parameters SQLNET.COMPRESSION and SQLNET.COMPRESSION_LEVELS. Setting these parameters in the sqlnet.ora file affects all the connections using the sqlnet.ora file.
#oratidbit The Automatic Diagnostic Repository (ADR) is a systemwide tracing and logging central repository. The repository is a file-based hierarchical data store for depositing diagnostic information, including network tracing and logging information.
#oratidbit #db12cR2 Oracle RAC Reader Nodes facilitate Oracle Flex Cluster architecture by allocating a set of read/write instances running Online Transaction Processing (OLTP) workloads and a set of read-only database instances across Hub Nodes and Leaf Nodes in the cluster. In this architecture, updates to the read-write instances are immediately propagated to the read-only instances on the Leaf Nodes, where they can be used for online reporting or instantaneous queries.
#oratidbit Start and stop Oracle instances with Oracle Enterprise Manager, SQL*Plus, or SRVCTL. OEM and SRVCTL provide options to start and stop all of the instances in an Oracle RAC database with a single step.
#oratidbit If you stop database instances using “crsctl stop crs” or “crsctl stop cluster -all”, databases are stopped with “shutdown abort”.
#oratidbit Oracle database startup looks for initialization parameter file in $ORACLE_HOME/dbs directory. The file names checked are spfile<sid>.ora, spfile.ora, init<sid>.ora, in order.
#oratidbit In #db12cR2 the optimizer uses the UNION-ALL operator to perform the OR expansion. Earlier, CONCATENATION operator was used.
#oratidbit DBMS_STATS.GET_STATS_HISTORY_RETENTION function shows the current optimizer statistics history retention value. DBMS_STATS.GET_STATS_HISTORY_AVAILABILITY function retrieves the oldest time stamp when statistics history is available.
%d bloggers like this: