{"id":1427,"date":"2017-09-04T11:11:43","date_gmt":"2017-09-04T11:11:43","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1427"},"modified":"2018-12-24T16:48:43","modified_gmt":"2018-12-24T16:48:43","slug":"unlock-a-teradata-user-account","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=1427","title":{"rendered":"Unlock a Teradata User Account"},"content":{"rendered":"<p>1. Determine if the account is locked by failed password attempts.\u00a0 When the failed attempts equals the max logon attempts set in the user&#8217;s profile, the user will be displayed in the results.\u00a0 This is a good query, but will not work in all cases, depending on how the profile was setup.<\/p>\n<pre>SELECT \r\nDBC.USERS.USERNAME, \r\nDBC.USERS.LOCKEDDATE,\r\nDBC.USERS.LOCKEDTIME,\r\nDBC.USERS.LOCKEDCOUNT \r\nFROM DBC.USERS INNER JOIN DBC.PROFILES \r\nON DBC.USERS.PROFILENAME = DBC.PROFILES.PROFILENAME \r\nWHERE DBC.USERS.LOCKEDCOUNT &gt;=  DBC.PROFILES.MAXLOGONATTEMPTS;<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/TeradataViewLockedUsersAccounts.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1723 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/TeradataViewLockedUsersAccounts.jpg\" alt=\"Teradata show locked accounts\" width=\"523\" height=\"294\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/TeradataViewLockedUsersAccounts.jpg 523w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/TeradataViewLockedUsersAccounts-300x169.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/TeradataViewLockedUsersAccounts-210x118.jpg 210w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/a><\/p>\n<p>2. The SQL statement to unlock the account.<\/p>\n<pre>MODIFY USER\u00a0 &lt;user&gt;\u00a0 AS RELEASE PASSWORD LOCK;<\/pre>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/08\/ReleasePasswordLock.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1429 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/08\/ReleasePasswordLock.jpg\" alt=\"ReleasePasswordLock\" width=\"422\" height=\"139\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/08\/ReleasePasswordLock.jpg 422w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/08\/ReleasePasswordLock-300x99.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/08\/ReleasePasswordLock-210x69.jpg 210w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/p>\n<p>3. Rerun the query to verify that the account is no longer in the results.<\/p>\n<p><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/AfterReleasePasswordLock.jpg\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1726 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/AfterReleasePasswordLock.jpg\" alt=\"After release password lock\" width=\"539\" height=\"278\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/AfterReleasePasswordLock.jpg 539w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/AfterReleasePasswordLock-300x155.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2017\/09\/AfterReleasePasswordLock-210x108.jpg 210w\" sizes=\"(max-width: 539px) 100vw, 539px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1. Determine if the account is locked by failed password attempts.\u00a0 When the failed attempts equals the max logon attempts set in the user&#8217;s profile, the user will be displayed &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=1427\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1428,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[104,89,105],"class_list":["post-1427","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teradata","tag-lock","tag-password","tag-username"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1427"}],"collection":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1427"}],"version-history":[{"count":7,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1427\/revisions"}],"predecessor-version":[{"id":1724,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1427\/revisions\/1724"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1428"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1427"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1427"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}