{"id":532,"date":"2012-06-24T00:30:42","date_gmt":"2012-06-24T00:30:42","guid":{"rendered":"http:\/\/www.thestupidbox.com\/blog\/?p=532"},"modified":"2021-06-25T04:08:55","modified_gmt":"2021-06-25T04:08:55","slug":"oraclebulkcopy-privileges","status":"publish","type":"post","link":"http:\/\/thestupidbox.com\/blog\/oraclebulkcopy-privileges\/","title":{"rendered":"OracleBulkCopy Privileges"},"content":{"rendered":"<p>I had to export an excel file into a DB. The excel file contains cross tab information. So I had to store it in the DB as normal table. When I insert row by row, it took 150 seconds for a 800 row excel file.<\/p>\n<p>&nbsp;<\/p>\n<p>So decided to optimize using OracleBulkCopy. When I tested in staging server, it took only 48 seconds for the same file.<\/p>\n<p>&nbsp;<\/p>\n<p>After deploying the solution in production, I was getting the following error as the production environment is using a restricted\/scaled down user.<\/p>\n<pre>ORA-01031: insufficient privileges<\/pre>\n<p>Even after granting the user, Insert privilege, the same error.<\/p>\n<p>&nbsp;<\/p>\n<p>Finally found out &#8220;<strong>Select<\/strong>&#8221; privilege is also required. Though, not sure why this is required.<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I had to export an excel file into a DB. The excel file contains cross tab information. So I had to store it in the DB as normal table. When I insert row by row, it took 150 seconds for&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[58],"tags":[154,155],"class_list":["post-532","post","type-post","status-publish","format-standard","hentry","category-technical","tag-oraclebulkcopy","tag-oraclebulkcopy-privileges"],"_links":{"self":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/532","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/comments?post=532"}],"version-history":[{"count":3,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/532\/revisions"}],"predecessor-version":[{"id":536,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/posts\/532\/revisions\/536"}],"wp:attachment":[{"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/media?parent=532"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/categories?post=532"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/thestupidbox.com\/blog\/wp-json\/wp\/v2\/tags?post=532"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}