{"id":444,"date":"2011-04-22T14:27:59","date_gmt":"2011-04-22T12:27:59","guid":{"rendered":"http:\/\/www.oradba.ch\/?p=444"},"modified":"2011-10-12T08:17:49","modified_gmt":"2011-10-12T06:17:49","slug":"script-to-download-oracle-patch","status":"publish","type":"post","link":"https:\/\/www.oradba.ch\/wordpress\/2011\/04\/script-to-download-oracle-patch\/","title":{"rendered":"Script to download Oracle Patch"},"content":{"rendered":"<p>Downloading Oracle software, patch or patch-set via web browser is handy if you need the software on your client PC or if you just download small patch&#8217;s. As soon as you want, however, download a greater volume of patches or a large patch set, it gets cumbersome. After downloading the patch must be copied to the target system. All steps could be quite time consuming depending on your network throughput. <\/p>\n<h3>WGET Option<\/h3>\n<p>Since a while it is possible to select a <em>WGET Option<\/em> in the download dialog rather than downloading each file individual (red box in the picture below).<\/p>\n<p><a href=\"https:\/\/www.oradba.ch\/wordpress\/2011\/04\/script-to-download-oracle-patch\/mos-download_dialog-jpg\/\" rel=\"attachment wp-att-442\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/uploads\/MOS-download_dialog.jpg?resize=300%2C260&#038;ssl=1\" alt=\"MOS download dialog\" title=\"MOS-download_dialog.jpg\" width=\"300\" height=\"260\" class=\"aligncenter size-medium wp-image-442\" srcset=\"https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/uploads\/MOS-download_dialog.jpg?resize=300%2C260&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/uploads\/MOS-download_dialog.jpg?w=350&amp;ssl=1 350w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n<\/p>\n<p>In a new dialog box you then my download or copy the wget download script for the selected patch&#8217;s.<\/p>\n<p><a href=\"https:\/\/www.oradba.ch\/wordpress\/2011\/04\/script-to-download-oracle-patch\/mos-download_wget-jpg\/\" rel=\"attachment wp-att-443\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/uploads\/MOS-download_wget.jpg?resize=300%2C182&#038;ssl=1\" alt=\"MOS download wget\" title=\"MOS-download_wget.jpg\" width=\"300\" height=\"182\" class=\"aligncenter size-full wp-image-443\" \/><\/a><br \/>\n<\/p>\n<p>Before starting the download via script the MOS credential have to be modified eg. SSO_USERNAME=youraccount<br \/>\nSSO_PASSWORD=yourpassword<\/p>\n<h3>But&#8230;<\/h3>\n<p>So far so good, but currently it is now working. According to Oracle Support this is a known issue and there is the Bug <em><a href=\"https:\/\/support.oracle.com\/CSP\/main\/article?cmd=show&#038;type=BUG&#038;id=12372706\">12372706<\/a>: WGET SCRIPTS FROM MOS FAIL IN PRODUCTION<\/em>.<\/p>\n<p>To workaround each file has to be downloaded manually with wget.<\/p>\n<p><code lang=bash><br \/>\nwget --http-user=username --http-password=password --no-check-certificate \\<br \/>\n--output-document=filename \"paste the above copied address here in quotes\"<br \/>\n<\/code><\/p>\n<p>The URL&#8217;s can be copied from the download dialog above. If more than just one patch have to be downloaded wget can be put in a for loop which get&#8217;s the URL&#8217;s from a text file.<\/p>\n<h4>Download URL&#8217;s<\/h4>\n<p>Text File with Patch URL&#8217;s<br \/>\n<code lang=bash><br \/>\n#Linux x86-64<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_1of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_1of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_2of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_2of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_3of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_3of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_4of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_4of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_5of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_5of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_6of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_6of7.zip<br \/>\nhttps:\/\/updates.oracle.com\/Orion\/Services\/download\/p10098816_112020_Linux-x86-64_7of7.zip?aru=13149219&patch_file=p10098816_112020_Linux-x86-64_7of7.zip<br \/>\n<\/code><\/p>\n<h4>Download more patch<\/h4>\n<p>For loop to download the patch&#8217;s:<br \/>\n<code lang=bash><br \/>\nfor i in $(cat download_url.txt|grep -v ^#)<br \/>\ndo<br \/>\nOUTPUT_FILE=$(echo \"$i\"|cut -d= -f3)<br \/>\necho \"download $OUTPUT_FILE from '$i'\" >> $LOGFILE 2>&1<br \/>\nwget --http-user=MOS_USER --http-password=MOS_PASSWORD --no-check-certificate \\<br \/>\n-O $OUTPUT_FILE \"$i\" >> wget_logfile.log 2>&1<br \/>\ndone<br \/>\n<\/code><\/p>\n<h4>MOS Download Script<\/h4>\n<p>I&#8217;ve put everything in a small script. To download the patch a text with the download URL&#8217;s have to be specified<\/p>\n<p><code lang=bash><br \/>\nmos_download_url.sh -h<br \/>\nINFO : Usage, mos_download_url.sh  [-hv]<br \/>\nINFO :        -h             Usage (this message)<br \/>\nINFO :        -u <user>      MOS user account<br \/>\nINFO :        -p <password>  MOS password<br \/>\nINFO :        -f <file>      Text file with download url<br \/>\nINFO :                       Logfile : mos_download_url.sh-04-22-11-1422.log<br \/>\n<\/file><\/password><\/user><\/code><\/p>\n<p>Run the script with nohup on a stage server to download a few patchs.<br \/>\n<code lang=bash><br \/>\nnohup mos_download_url.sh  -u me@domain.com -p secret -f download_url.txt &<br \/>\n<\/code><\/p>\n<p>The mos_download_url.sh script can be downloaded in the <a href=\"\/scripts\">script section<\/a> of OraDBA or direct (<img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/www.oradba.ch\/wordpress\/wp-content\/plugins\/wp-downloadmanager\/images\/ext\/unknown.gif?w=625&#038;ssl=1\" alt=\"\" title=\"\" style=\"vertical-align: middle;\" \/>&nbsp;<a href=\"https:\/\/www.oradba.ch\/wordpress\/download\/mos_download_url.sh\">mos_download_url.sh<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For the CPU Patch test I&#8217;ll have to download a patch&#8217;s and patchset on a regular basis. Download the patch&#8217;s via a Web browser can be very time consuming. A download manager or a script based download is simplifying the  patch download. As a side effect when downloading with a script, the files can be stored directly on the database or a staging server.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,20],"tags":[29,28,18],"class_list":["post-444","post","type-post","status-publish","format-standard","hentry","category-oracle-database","category-oracle-metalink","tag-mos","tag-script","tag-trivadiscontent"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1aErb-7a","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2243,"url":"https:\/\/www.oradba.ch\/wordpress\/2017\/01\/oracle-cpu-psu-announcement-january-2017\/","url_meta":{"origin":444,"position":0},"title":"Oracle CPU \/ PSU Announcement January 2017","author":"Stefan","date":"18. January 2017","format":false,"excerpt":"Oracle has published the first Critical Patch Update in 2017. It's quite a huge update with not less than 270 new security vulnerability fixes across the Oracle products. For the Oracle Database itself are 5 security fixes available respectively 2 security fixes for the Oracle Database Server and 3 security\u2026","rel":"","context":"In &quot;11gR2&quot;","block_context":{"text":"11gR2","link":"https:\/\/www.oradba.ch\/wordpress\/category\/oracle-database\/11gr2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":504,"url":"https:\/\/www.oradba.ch\/wordpress\/2011\/05\/oracle-database-firewall-patch\/","url_meta":{"origin":444,"position":1},"title":"Oracle Database Firewall Patch","author":"Stefan","date":"10. May 2011","format":false,"excerpt":"Since a couple of week's a bunch of patch are available for Oracle Database Firewall. The latest seems to be available since today.","rel":"","context":"In &quot;Bundle Patch&quot;","block_context":{"text":"Bundle Patch","link":"https:\/\/www.oradba.ch\/wordpress\/category\/patches\/bp\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":757,"url":"https:\/\/www.oradba.ch\/wordpress\/2012\/01\/update-oracle-released-cpu-psu-january-2012\/","url_meta":{"origin":444,"position":2},"title":"Update: Oracle released CPU \/ PSU January 2012","author":"Stefan","date":"24. January 2012","format":false,"excerpt":"Oracle has officially released the CPU \/ PSU Patches for january 2012. The Critical Patch Updates contains 78 security fixes across all products. But only two out of this 78 fixes are for Oracle databases.","rel":"","context":"In &quot;11gR1&quot;","block_context":{"text":"11gR1","link":"https:\/\/www.oradba.ch\/wordpress\/category\/oracle-database\/11gr1\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":431,"url":"https:\/\/www.oradba.ch\/wordpress\/2011\/04\/oracle-cpu-pre-release-announcement-april-2011\/","url_meta":{"origin":444,"position":3},"title":"Oracle CPU Pre-Release Announcement &#8211; April 2011","author":"Stefan","date":"19. April 2011","format":false,"excerpt":"Late last week Oracle published the Oracle Critical Patch Update Pre-Release Announcement - April 2011. The official Oracle Critical Patch Update for April 2011 will be released somewhen on the 19th of april. This CPU includes up to 73 security fixes for all kind of Oracle products. 6 out of\u2026","rel":"","context":"In &quot;Critical Patch Update&quot;","block_context":{"text":"Critical Patch Update","link":"https:\/\/www.oradba.ch\/wordpress\/category\/patches\/cpu\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":788,"url":"https:\/\/www.oradba.ch\/wordpress\/2012\/05\/important-links-around-the-oracle-cpu-psu-april-2012\/","url_meta":{"origin":444,"position":4},"title":"Important links around the Oracle CPU \/ PSU April 2012","author":"Stefan","date":"8. May 2012","format":false,"excerpt":"A few weeks ago oracle officially released the CPU \/ PSU Patches for April 2012. The Critical Patch Updates contains 88 security fixes across all products. But only 6 out of this 88 fixes are for Oracle databases. This post will summarize a bit the information and links around this\u2026","rel":"","context":"In &quot;Critical Patch Update&quot;","block_context":{"text":"Critical Patch Update","link":"https:\/\/www.oradba.ch\/wordpress\/category\/patches\/cpu\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":683,"url":"https:\/\/www.oradba.ch\/wordpress\/2011\/10\/oracle-cpu-psu-pre-release-announcement-october-2011\/","url_meta":{"origin":444,"position":5},"title":"Oracle CPU \/ PSU Pre-Release Announcement October 2011","author":"Stefan","date":"14. October 2011","format":false,"excerpt":"Oracle has recently published the Pre-Release Announcement for the CPU Patch. This Critical Patch Update contains 56 new security vulnerability fixes for several Oracle products. 4 of these fixes are just for the Oracle Database Server.","rel":"","context":"In &quot;10gR2&quot;","block_context":{"text":"10gR2","link":"https:\/\/www.oradba.ch\/wordpress\/category\/oracle-database\/10gr2\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/444","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/comments?post=444"}],"version-history":[{"count":12,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/444\/revisions"}],"predecessor-version":[{"id":7838,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/posts\/444\/revisions\/7838"}],"wp:attachment":[{"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/media?parent=444"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/categories?post=444"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oradba.ch\/wordpress\/wp-json\/wp\/v2\/tags?post=444"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}