{"id":1321,"date":"2016-12-30T22:20:19","date_gmt":"2016-12-30T22:20:19","guid":{"rendered":"http:\/\/www.theSQLReport.com\/?p=1321"},"modified":"2016-12-30T22:20:19","modified_gmt":"2016-12-30T22:20:19","slug":"teradata-viewing-failed-logon-information","status":"publish","type":"post","link":"https:\/\/www.theSQLReport.com\/?p=1321","title":{"rendered":"Teradata Viewing Failed Logon Information"},"content":{"rendered":"<p id=\"yui_3_16_0_ym19_1_1483133816570_2716\" class=\"yiv1536086885MsoNormal\">In Teradata, there is a way to view the reason that a username is not authenticating.\u00a0 Teradata is good about collecting information at the time of authentication.\u00a0 It can be verified, when an error like &#8220;Error: Logon failed!&#8221; occurs, if it is something like a bad password, or if the account is locked.<\/p>\n<pre id=\"yui_3_16_0_ym19_1_1483133816570_2714\" class=\"yiv1536086885MsoNormal\">select\r\n\u00a0 cast(cast(logdate as format 'YYYY-MM-DD') as varchar(100))\r\n\u00a0 ,cast(logtime as varchar(100))\r\n\u00a0 ,username\r\n\u00a0 ,cast(cast(logondate as format 'YYYY-MM-DD') as varchar(100))\r\n\u00a0 ,cast(logontime as varchar(100))\r\n\u00a0 ,ClientIpAddress\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0 ,ClientProgramName\r\n\u00a0 ,ClientSystemUserId\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\r\n\u00a0 ,event\r\n\u00a0 from dbc.logonoff\r\n\u00a0 where logdate &gt;= date '2016-12-01'\r\n\u00a0 and event not in ('Logon','Logoff')\r\n\u00a0 order by 1 desc, 2 desc<\/pre>\n<p id=\"yui_3_16_0_ym19_1_1483133816570_4328\" class=\"yiv1536086885MsoNormal\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/LogonEvent.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1328 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/LogonEvent.jpg\" width=\"921\" height=\"675\" \/><\/a><\/p>\n<p id=\"yui_3_16_0_ym19_1_1483133816570_4403\" class=\"yiv1536086885MsoNormal\">More columns can be added to the query with good information. To view all the information that can called from the &#8220;dbc.logonoff&#8221; view: &#8220;<em>help view dbc.logonoff<\/em>&#8220;<\/p>\n<p class=\"yiv1536086885MsoNormal\"><a href=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1325 size-full\" src=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff.jpg\" width=\"928\" height=\"606\" srcset=\"http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff.jpg 928w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff-300x196.jpg 300w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff-768x502.jpg 768w, http:\/\/www.theSQLReport.com\/wp-content\/uploads\/2016\/12\/HelpViewDbcLogonOff-210x137.jpg 210w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Teradata, there is a way to view the reason that a username is not authenticating.\u00a0 Teradata is good about collecting information at the time of authentication.\u00a0 It can be &hellip; <a class=\"readmore\" href=\"https:\/\/www.theSQLReport.com\/?p=1321\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":1328,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":["post-1321","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-teradata"],"_links":{"self":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1321"}],"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=1321"}],"version-history":[{"count":7,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1321\/revisions"}],"predecessor-version":[{"id":1330,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/posts\/1321\/revisions\/1330"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=\/wp\/v2\/media\/1328"}],"wp:attachment":[{"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1321"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1321"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.theSQLReport.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1321"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}