{"id":10,"date":"2012-01-03T17:01:00","date_gmt":"2012-01-03T17:01:00","guid":{"rendered":"https:\/\/bijoos.com\/oraclenotes\/?p=10"},"modified":"2012-01-03T17:01:00","modified_gmt":"2012-01-03T17:01:00","slug":"sequences-nearing-limit","status":"publish","type":"post","link":"https:\/\/bijoos.com\/oraclenotes\/2012\/10\/","title":{"rendered":"Sequences Nearing Limit"},"content":{"rendered":"<div dir=\"ltr\">Happy New Year 2012!&nbsp;<\/p>\n<p>During the holidays we hit a production issue on the EBS instance. It was one of the Sequences reaching the maximum limit, but took a lot of time for our admins and Oracle support to figure out where the issue was&#8230; If we had the following SQL as part of the monitoring jobs, could have avoided the issue altogether&#8230;<\/p>\n<p>This was added to monitoring tool immediately&#8230; \ud83d\ude42<\/p>\n<pre class=\"lang:default decode:true  crayon-selected\">SELECT sequence_owner,\nsequence_name,\nlast_number,\nmax_value,\ncache_size\nFROM dba_sequences\nWHERE last_number &gt; max_value - CASE\nWHEN max_value &gt; 50000 THEN 10000\nELSE 200\nEND\nAND cycle_flag = 'N'\nAND max_value != -1;<\/pre>\n<p>&nbsp;<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Happy New Year 2012!&nbsp; During the holidays we hit a production issue on the EBS instance. It was one of the Sequences reaching the maximum limit, but took a lot of time for our admins and Oracle support to figure out where the issue was&#8230; If we had the following SQL as part of the &#8230; <a title=\"Sequences Nearing Limit\" class=\"read-more\" href=\"https:\/\/bijoos.com\/oraclenotes\/2012\/10\/\" aria-label=\"Read more about Sequences Nearing Limit\">Read more<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"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":""},"categories":[22],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","hentry","category-scripts-tools"],"acf":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":0,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"wp:attachment":[{"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bijoos.com\/oraclenotes\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}