{"id":2101,"date":"2017-10-10T00:33:45","date_gmt":"2017-10-10T05:33:45","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=2101"},"modified":"2026-02-07T15:29:22","modified_gmt":"2026-02-07T21:29:22","slug":"odc-appreciation-day-two-cool-12c-security-features-thanksodc-thanksotn","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2017\/2101\/","title":{"rendered":"ODC Appreciation Day: Two Cool 12c Security Features #ThanksODC #ThanksOTN"},"content":{"rendered":"<p><a href=\"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2017\/10\/ODC.png?ssl=1\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignleft wp-image-2106 \" src=\"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2017\/10\/ODC.png?resize=248%2C97&#038;ssl=1\" alt=\"\" width=\"248\" height=\"97\" \/><\/a>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.<\/p>\n<p>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.<\/p>\n<p><strong>1. \u00a0Last Login Time\u00a0<\/strong><\/p>\n<p>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.<\/p>\n<p>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.\u00a0In 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).<\/p>\n<p>BTW, have you noticed, when you login to the database using SQL*Plus, you will see the last login time displayed as well.<\/p>\n<p><strong>2. \u00a0Inactive Account Lock<\/strong><\/p>\n<p>My requirement got completely automated in 12.2 database. Oracle introduced the INACTIVE_ACCOUNT_TIME parameter for user profiles.\u00a0The INACTIVE_ACCOUNT_TIME profile parameter locks a user account that has not logged in to the database instance in a specified number of days.\u00a0The default value for INACTIVE_ACCOUNT_TIME is 35. The minimum setting is 15 and the maximum is 24855.<\/p>\n<p>Thanks, Oracle!<\/p>\n<p><a href=\"https:\/\/twitter.com\/hashtag\/ThanksOTN\" target=\"_blank\" rel=\"noopener\">#ThanksOTN<\/a><\/p>\n<p><a href=\"https:\/\/twitter.com\/hashtag\/ThanksODC\" target=\"_blank\" rel=\"noopener\">#ThanksODC<\/a><\/p>\n<p>And thank you, <a href=\"https:\/\/oracle-base.com\/blog\/2017\/09\/25\/odc-appreciation-day-2017-thanksodc\/\" target=\"_blank\" rel=\"noopener\">@OracleBase,<\/a>\u00a0for doing the appreciation day again!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 &#8230; <a title=\"ODC Appreciation Day: Two Cool 12c Security Features #ThanksODC #ThanksOTN\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2017\/2101\/\" aria-label=\"Read more about ODC Appreciation Day: Two Cool 12c Security Features #ThanksODC #ThanksOTN\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":64,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[133],"tags":[40],"class_list":["post-2101","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oracledb","tag-oracle-12c"],"acf":[],"jetpack-related-posts":[{"id":2121,"url":"https:\/\/bijoos.com\/oraclenotes\/2017\/2121\/","url_meta":{"origin":2101,"position":0},"title":"Adaptive Query Performance Fixes for #DB12c Release 1","author":"Biju","date":"December 5, 2017","format":false,"excerpt":"We all know adaptive query feature introduced in Oracle Database Release 1 is a problem. Recently I had the opportunity to review few 12cR1 databases and found that to alleviate the performance problems, the DBA set parameter OPTIMIZER_FEATURES_ENABLE=11.2.0.4 in Oracle Database 12c Release 1 (12.1.0.2). This observation is the catalyst\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1462,"url":"https:\/\/bijoos.com\/oraclenotes\/2014\/1462\/","url_meta":{"origin":2101,"position":1},"title":"East Coast Oracle #ECO14 Conference","author":"Biju","date":"November 3, 2014","format":false,"excerpt":"Today I am traveling to Raleigh, North Carolina for the East Coast Oracle conference. Very excited to be part of this conference, as I have activities planned for all three days. This is the first time attending and presenting at ECO. Though I attended OOW14, ECO14 will be the conference\u2026","rel":"","context":"In &quot;Certification &amp; Learning&quot;","block_context":{"text":"Certification &amp; Learning","link":"https:\/\/bijoos.com\/oraclenotes\/category\/certification-learning\/"},"img":{"alt_text":"eco14","src":"https:\/\/i0.wp.com\/bijoos.com\/oraclenotes\/wp-content\/uploads\/2014\/11\/eco14-300x115.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":86,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/86\/","url_meta":{"origin":2101,"position":2},"title":"Oracle Database 12c &#8211; Few Links","author":"Biju","date":"June 27, 2013","format":false,"excerpt":"Thought of sharing few good links I came across on Oracle Database 12c. Cloud Database Plug into the Cloud with Oracle Database 12c Oracle Multitenant Upgrade, Migrate and Consolidate to Oracle Database 12c Tuning and Optimizer: \u00a0What to expect from the Optimizer with Oracle Database 12c(PDF) SQL Plan Management with\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1566,"url":"https:\/\/bijoos.com\/oraclenotes\/2015\/1566\/","url_meta":{"origin":2101,"position":3},"title":"OCA12c &#8211; 1Z0-061 &#8211; Additional Reading 01","author":"Biju","date":"September 4, 2015","format":false,"excerpt":"[Additional] Reading material for 1z0-061 Oracle Database 12c SQL Fundamentals test. Chapter 1: Introducing Oracle Database 12c RDBMS\u00a0introduces you to the features of Oracle Database 12c and the aspects of relational database. 1.1 Describe the features of Oracle Database 12c 1.2 Describe the salient features of Oracle Cloud 12c 1.3\u2026","rel":"","context":"In &quot;Certification &amp; Learning&quot;","block_context":{"text":"Certification &amp; Learning","link":"https:\/\/bijoos.com\/oraclenotes\/category\/certification-learning\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1667,"url":"https:\/\/bijoos.com\/oraclenotes\/2016\/1667\/","url_meta":{"origin":2101,"position":4},"title":"NoCOUG Journal Column &#8211; February 2016 Issue","author":"Biju","date":"January 16, 2016","format":false,"excerpt":"In the February 2016 issue of the NoCOUG Journal, for\u00a0the Many Things Oracle column, I\u00a0discuss some of the v$ views that are lesser known or not widely used. I also touch up on the MGMTDB cluster repository database in Oracle Clusterware 12c. Read here... This is a Collector's Edition, and\u2026","rel":"","context":"In &quot;Certification &amp; Learning&quot;","block_context":{"text":"Certification &amp; Learning","link":"https:\/\/bijoos.com\/oraclenotes\/category\/certification-learning\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":82,"url":"https:\/\/bijoos.com\/oraclenotes\/2013\/82\/","url_meta":{"origin":2101,"position":5},"title":"Oracle Database 12c is now GA&#8230; (Finally!!)","author":"Biju","date":"June 25, 2013","format":false,"excerpt":"Oracle Database 12c is released today [June 25]... there is a wealth of new features in 12c database, most major ones were discussed by Oracle speakers in conferences since OOW 2012... The major feature is the introduction of container databases and pluggable databases. Database 12c software is available for download\u2026","rel":"","context":"In &quot;Oracle Database&quot;","block_context":{"text":"Oracle Database","link":"https:\/\/bijoos.com\/oraclenotes\/category\/oracledb\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/2101","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/comments?post=2101"}],"version-history":[{"count":1,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/2101\/revisions"}],"predecessor-version":[{"id":2998,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/2101\/revisions\/2998"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=2101"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=2101"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=2101"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}