tag:blogger.com,1999:blog-4818542164384221282.post6880190322850993984..comments2024-02-12T19:54:33.009+08:00Comments on Grassroots Oracle: Automating Apex Backups from the DBScott Wesleyhttp://www.blogger.com/profile/18106937181788036683noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-4818542164384221282.post-88189489775326677762021-10-16T16:13:18.279+08:002021-10-16T16:13:18.279+08:00Or is it you
- don't have privileges to creat...Or is it you <br />- don't have privileges to create directory - unlikely based on error<br />- db doesn't have privileges on that folder?<br />Will also depend on who you're running this as, and is it on your own server? <br />Seems like you're doing it in the SQL workshop.Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-90748544543172202532021-08-07T01:56:14.820+08:002021-08-07T01:56:14.820+08:00Things have change since:
CREATE OR REPLACE DIREC...Things have change since:<br /><br />CREATE OR REPLACE DIRECTORY apex_backup AS 'C:\APEX_BACKUP' <br /><br />ORA-01031: insufficient privileges ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_210100", line 673 ORA-06512: at "SYS.DBMS_SYS_SQL", line 1658 ORA-06512: at "SYS.WWV_DBMS_SQL_APEX_210100", line 659 ORA-06512: at "APEX_210100.WWV_FLOW_DYNAMIC_EXEC", line 1855<br /><br /><br /><br />neverflwnoreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-31131359260105771122013-02-11T21:22:03.540+08:002013-02-11T21:22:03.540+08:00I remember battling this issue, but can't reca...I remember battling this issue, but can't recall a solution off the top of my head. <br />This would likely be a common issue - I'd try searching for anything related to output using UTL_FILEScott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-20262773628838856742013-01-17T19:24:02.274+08:002013-01-17T19:24:02.274+08:00It works, after set limit ln_amount to 1024 and in...It works, after set limit ln_amount to 1024 and increase the size of tablespace.<br /><br />But after execute that procedure line is break because<br />utl_file.put_line(lf_file, lc_buffer);<br />like<br />Varchar is insert into file as:<br /><br />Va<br />rchar<br /><br />So, I used UTL_FILE.PUT but after executing procedure, only first buffer was pasted at file but loop executed as required.Lovneeshhttps://www.blogger.com/profile/11219851644914520260noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-62076966812996198162013-01-17T15:45:10.221+08:002013-01-17T15:45:10.221+08:00Obviously something OS dependent - maybe relating ...Obviously something OS dependent - maybe relating to line feeds. <br /><br />Doco suggests LF would be included, but try lowering the value of ln_amount. The API default is 1024.Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-21386272179422099652013-01-17T15:36:15.670+08:002013-01-17T15:36:15.670+08:00After using Varchar2(n char), same error shown ORA...After using Varchar2(n char), same error shown ORA-06502.<br /><br />This error shown when I use this procedure on linux but when I use this on Windows it works fine.Lovneeshhttps://www.blogger.com/profile/11219851644914520260noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-22279869327432032172013-01-16T08:26:27.855+08:002013-01-16T08:26:27.855+08:00MY first question would be regarding character set...MY first question would be regarding character set. This procedure uses VARCHAR2(n BYTE). If you have characters outside the standard set that need more information, then you might reach that ORA-06502. <a href="http://www.oracle-base.com/articles/9i/character-semantics-and-globalization-9i.php" rel="nofollow">Try using VARCHAR2(n CHAR)</a><br /><br />My first guess?Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-12984498273343537072013-01-15T16:23:09.983+08:002013-01-15T16:23:09.983+08:00When i use this procedure on linux then I get an e...When i use this procedure on linux then I get an exception that is<br />ORA-06502: PL/SQL: numeric or value error: character string buffer too small<br />at<br />DBMS_LOB.READ (lc_clob,ln_amount, ln_pos, lc_buffer);<br /><br />I don't know, why it is so, can you help?Lovneeshhttps://www.blogger.com/profile/11219851644914520260noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-43831888662364796072013-01-10T06:46:55.881+08:002013-01-10T06:46:55.881+08:00Sounds fair enough - adjusted.Sounds fair enough - adjusted.Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-13880185449540948552013-01-10T00:16:08.852+08:002013-01-10T00:16:08.852+08:00I allways wondered:
UTL_FILE.FCLOSE(lf_file);
...I allways wondered:<br /><br /> UTL_FILE.FCLOSE(lf_file);<br /> DBMS_OUTPUT.PUT_LINE(SQLERRM);<br />should be:<br /> DBMS_OUTPUT.PUT_LINE(SQLERRM);<br /> UTL_FILE.FCLOSE(lf_file);<br /><br />Because first statement might clear "SQLERRM" content.<br />Damir Vadashttps://www.blogger.com/profile/15963017378937428976noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-65185146671611497052012-11-02T01:19:01.215+08:002012-11-02T01:19:01.215+08:00Scott,
Any time for EB beer.
Ping me when you are...Scott,<br /><br />Any time for EB beer.<br />Ping me when you are in Chicago :)<br /><br />VJAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-53412003843471229342012-09-27T12:14:04.600+08:002012-09-27T12:14:04.600+08:00Careful, I'll hold you to that - I like EB ;-)...Careful, I'll hold you to that - I like EB ;-)Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-18277896135864110372012-09-27T01:47:27.038+08:002012-09-27T01:47:27.038+08:00Scott,
Gr8 job. I owe you a beer :) :)Scott,<br /><br />Gr8 job. I owe you a beer :) :)VJnoreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-60499367837074878242012-09-08T04:25:10.198+08:002012-09-08T04:25:10.198+08:00Nice works!Nice works!Eric Cloutierhttps://www.blogger.com/profile/04286572849309614393noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-40046663371218404862012-01-05T16:47:45.543+08:002012-01-05T16:47:45.543+08:00Updated to
-- ignore some workspaces
-- limit quer...Updated to<br />-- ignore some workspaces<br />-- limit query to connected user<br />-- actual parameter name changesScott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-6223274083933895682010-02-23T14:17:47.802+08:002010-02-23T14:17:47.802+08:00Depending on OS, you may need to use UTL_FILE.PUT_...Depending on OS, you may need to use UTL_FILE.PUT_LINE, instead of UTL_FILE.PUT.<br /><br />SQL updatedScott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-46377417236206677142010-02-18T14:14:50.437+08:002010-02-18T14:14:50.437+08:00Stealing? Nay, it is but a mere gift ;-)Stealing? Nay, it is but a mere gift ;-)Scott Wesleyhttps://www.blogger.com/profile/18106937181788036683noreply@blogger.comtag:blogger.com,1999:blog-4818542164384221282.post-66287033568297629922010-02-18T14:10:51.620+08:002010-02-18T14:10:51.620+08:00Nice! I'll definitely be stealing that and giv...Nice! I'll definitely be stealing that and giving it a try.Jeffrey Kemphttps://www.blogger.com/profile/08514743151986599227noreply@blogger.com