{"id":3317,"date":"2020-02-16T22:31:26","date_gmt":"2020-02-16T21:31:26","guid":{"rendered":"http:\/\/van-maanen.com\/?p=3317"},"modified":"2020-02-16T22:31:26","modified_gmt":"2020-02-16T21:31:26","slug":"finding-errors-in-oracle","status":"publish","type":"post","link":"http:\/\/van-maanen.com\/?p=3317","title":{"rendered":"Finding errors in Oracle"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">It is possible to trap errors in the loading process. This is handy when we work on a migration project. We simply load a table and trap all possible errors. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let us use a simple table (emp_c) that must be loaded. However, one field is too narrow which loads to errors.  These error will be trapped in table err$_emp_c. When loading the table, an option is added that leads errors to this table.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">drop table emp_c;\ncreate table emp_c\n( employee_id number,\n ename varchar2(17)\n );\nexec dbms_errlog.create_error_log('emp_c');\ndesc err$_emp_c;\ninsert into emp_c\nselect employee_id , first_name||' '||last_name name\nfrom hr.employees\nlog errors reject limit unlimited;\nselect * from err$_emp_c;\ntruncate table err$_emp_c;<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After loading, we may investigate the errors with a simple select statement.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to trap errors in the loading process. This is handy when we work on a migration project. We simply load a table and trap all possible errors. Let us use a simple table (emp_c) that must be loaded. However, one field is too narrow which loads to errors. These error will be [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-3317","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"http:\/\/van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3317","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/van-maanen.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/van-maanen.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3317"}],"version-history":[{"count":0,"href":"http:\/\/van-maanen.com\/index.php?rest_route=\/wp\/v2\/posts\/3317\/revisions"}],"wp:attachment":[{"href":"http:\/\/van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3317"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3317"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/van-maanen.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3317"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}