<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3213857575606318559</id><updated>2011-11-07T06:27:35.695-08:00</updated><category term='DOAG Regionaltreffen'/><category term='UIX'/><category term='DISPLAY'/><category term='news'/><category term='loose weight'/><category term='Misc'/><category term='Discoverer OLAP'/><category term='poll'/><category term='I liked the article and I am quoting from it the following:-'/><category term='from chemistry notes'/><category term='upgrade'/><category term='GLOBAL.LLL'/><category term='JDeveloper'/><category term='restore'/><category term='redhat'/><category term='Popup LOV'/><category term='bde_wf_data.lst'/><category term='ATG'/><category term='ATG_PF.RUP'/><category term='apps'/><category term='SAGE Computing Services'/><category term='ODM'/><category term='email'/><category term='priority'/><category term='APPS DBA'/><category term='4689213'/><category term='LOV'/><category term='patch'/><category term='keyboard mapping'/><category term='Oracle Web 2.0'/><category term='adcfgclone.pl'/><category term='Data Mining'/><category term='Physical Standby Database Example'/><category term='Oracle User Groups'/><category term='Month End Processes'/><category term='beta'/><category term='oca'/><category term='Discoverer'/><category term='load balancer'/><category term='online'/><category term='BISE1'/><category term='adautocfg.sh'/><category term='ADF Business Components'/><category term='SID'/><category term='Oracle eBusiness Suite'/><category term='Audience'/><category term='AIX'/><category term='Dashboards'/><category term='BI EE Answers'/><category term='Excel'/><category term='virtualization'/><category term='ORA-01031'/><category term='support'/><category term='dba books'/><category term='Consulting'/><category term='FND_INSTALL_PROCESSES'/><category term='oth'/><category term='tag'/><category term='ocp'/><category term='Oracle'/><category term='Business Intelligence'/><category term='Using DBMS_METADATA in Procedure'/><category term='Purchasing'/><category term='notifications'/><category term='downloads'/><category term='data protector'/><category term='Ask DBMS Direct'/><category term='Links'/><category term='b-tree'/><category term='Virtual'/><category term='Oracle RAC'/><category term='RW-50004'/><category term='ORA-02049'/><category term='scripts'/><category term='date parameter'/><category term='customization'/><category term='purge'/><category term='shay shmeltzer'/><category term='exam'/><category term='keys shortcut'/><category term='docs'/><category term='OLAP'/><category term='10.1.3.2.1'/><category term='Oracle APEX'/><category term='Office'/><category term='hyperion'/><category term='Using Logminer Example'/><category term='DBMS Direct at Oracle® Technology Network'/><category term='IE and page cannot be displayed'/><category term='RDBMS'/><category term='APP-PAY-06041'/><category term='concurrent manager'/><category term='clone'/><category term='sql'/><category term='Oracle Demos for Scott Tiger'/><category term='adpreclone.pl'/><category term='checklist'/><category term='BI Publisher'/><category term='index'/><category term='ADF Faces'/><category term='DBAs book'/><category term='Dropping all User Objects Example'/><category term='ORA-01403'/><category term='metalink'/><category term='bde_wf_data.sql'/><category term='JavaServer Faces'/><category term='keys'/><category term='signon'/><category term='PL/SQL'/><category term='I was reading Steven&apos;s article Journey of a Thousand Miles'/><category term='Oracle® Advanced Replication Example'/><category term='10.1.3.2'/><category term='10g'/><category term='Row-level Dependency Tracking ROWDEPENDENCIES Example'/><category term='adctrl'/><category term='Environment'/><category term='firefox'/><category term='Australia'/><category term='adconfig.sh'/><category term='cke'/><category term='all-generic-ide'/><category term='tips'/><category term='concurrent request'/><category term='HR'/><category term='wf_notifications'/><category term='epm'/><category term='Just Another Good DBA Day'/><category term='Data Warehouse'/><category term='fmrweb.res'/><category term='performance'/><category term='Blogs'/><category term='NTLM'/><category term='DATA_TOP'/><category term='Enterprise Manager Upgrade Hints'/><category term='Oracle® 11g Database Hints'/><category term='Open World'/><category term='slow'/><category term='etcetera'/><category term='security'/><category term='1Z1-233'/><category term='dbms'/><category term='AD_DEFERRED_JOBS'/><category term='openworld'/><category term='the oracle'/><category term='R12'/><category term='Distributed Transaction Waiting for Lock'/><category term='Development'/><category term='Apex'/><category term='Mix'/><category term='SQL Developer'/><category term=': Discoverer'/><category term='10.1.3.3'/><category term='DBA'/><category term='RMAN Backup and Recovery Example'/><category term=': BI Enterprise Edition'/><category term='vista'/><category term='adaddnode.pl'/><category term='hp'/><category term='OLAP Workshop : Basic Overview of OLAP Concepts'/><category term='others'/><category term='adpatch'/><category term='wiki'/><category term='workflow'/><category term='Designer'/><category term='Knowledge Transfer'/><category term='cloning'/><category term='forums'/><category term='11i'/><category term='4676589'/><category term=': Oracle'/><category term='AWM'/><category term='ER digram'/><category term='download'/><category term='OAM'/><category term='forms'/><category term='FRM-40815'/><category term='Discoverer Excel'/><category term='database'/><category term='merge'/><category term='linux'/><category term='0t'/><category term='sharing'/><category term='vision'/><category term='D4O'/><category term='otn'/><category term='document'/><category term='rapidwiz'/><category term='tutorial'/><category term='RUP 4'/><category term='BI Enterprise Edition'/><category term='MV Refresh and atomic_refresh'/><category term='Java'/><category term='book'/><category term='chart'/><category term='Commandments'/><category term='custom schema'/><category term='Forecasting'/><category term='certification'/><category term='Oracle Database FAQs'/><category term='SBA'/><category term='solution beacon'/><category term='webcache'/><category term='Warehouse Builder'/><category term='IE'/><category term='APPS.FND_CORE_LOG'/><category term='data'/><category term='pci=nommconf'/><category term='password'/><category term='bitmap'/><category term='Books'/><title type='text'>The Oracle</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default?start-index=101&amp;max-results=100'/><author><name>oracle</name><uri>http://www.blogger.com/profile/17492945335064288694</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>528</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1538732854241909636</id><published>2008-10-07T05:43:00.000-07:00</published><updated>2008-10-07T05:44:56.253-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>What If Saturated Fat Is Not the Problem?</title><content type='html'>An article in dLife, written by Richard Feinman, PhD:&lt;br /&gt;&lt;br /&gt;Here’s an idea to chew on: The carbs in your diet tell your body what to do with the fat you eat, so it’s the type and amount of carbohydrates that matter when it comes to your weight and health.&lt;br /&gt;&lt;br /&gt;Virtually every bit of health information today includes the advice to avoid saturated fat — the so-called evil stuff that lurks in animal foods like steak and eggs. The basis for this recommendation is that research has shown a correlation between saturated fat intake and total cholesterol and LDL (“bad cholesterol”). The problem with these studies is that the effects are not large, there is wide variation among individuals and, in most of these studies, the predicted benefit in incidence of cardiovascular disease did not materialize. In addition, we now know much more about risk factors for cardiovascular disease (CVD) beyond LDL. No assessment of CVD risk can be made without considering HDL (“good cholesterol”), triglycerides, and the size of the LDL particle. Plenty of research shows that these markers can worsen when people reduce their intake of saturated fat and that they can improve by reducing the intake of carbohydrates.&lt;br /&gt;&lt;br /&gt;You don’t have to be a medical researcher to recognize that this is a politically charged issue. The thing that is missing for the public is an impartial evaluation of all the data on saturated fat. My personal opinion is that there is much contradictory data and a recent review of the situation suggests that there is not sufficient evidence to make any recommendations.&lt;br /&gt;&lt;br /&gt;There is a sense that, in the absence of definitive evidence, lowering saturated fat will at least do no harm. This is not right. The problem for people with diabetes is what happens when saturated fat is replaced with carbohydrate, and research has repeatedly shown that this may actually be harmful. Consider that, according to the Centers for Disease Control and Prevention, during the onset of the current epidemic of obesity and diabetes, almost all of the increase in calories in the American diet has been due to carbohydrate. The percent of total fat and saturated fat in our diet decreased. In men, the absolute amount of saturated fat consumed decreased by 14 percent!&lt;br /&gt;&lt;br /&gt;One of the most striking reasons to doubt the across-the-board proscriptions against saturated fat is the report from the large scale Framingham study in the Journal of the American Medical Association, titled “Inverse association of dietary fat with development of ischemic stroke in men.” You read that right: The more saturated fat in the diet, the lower the incidence of stroke.&lt;br /&gt;&lt;br /&gt;Perhaps the most compelling research was published in a 2004 issue of the American Journal of Clinical Nutrition by researchers from the Harvard School of Public Health. Their study showed that, in postmenopausal women with heart disease, a higher saturated fat intake was associated with less narrowing of the coronary artery and a reduced progression of disease. Even with similar levels of LDL cholesterol, women with lower saturated fat intake had much higher rates of disease progression. Higher saturated fat intake was also associated with higher HDL (the “good” cholesterol) and lower triglycerides.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;If saturated fat isn’t the problem, what is?&lt;/strong&gt;&lt;br /&gt;In this study, in which greater saturated fat intake was associated with less progression of coronary atherosclerosis, carbohydrate intake was associated with a greater progression. Carbohydrate, through its effect on insulin, is the key player. Insulin not only sweeps up glucose from the blood but it also plays air traffic controller, making the call as to whether that glucose is turned into fat or is used for energy. Most importantly, insulin determines what happens to dietary fat — whether it gets stored or oxidized for fuel. In fact, the fat profile in the blood (cholesterol and triglycerides) is not strongly tied to diet.&lt;br /&gt;&lt;br /&gt;A recent study by Jeff Volek at the University of Connecticut compared low-carbohydrate and low-fat diets. Even though the low-carbohydrate diet had three times as much saturated fat as the low-fat diet, levels of unhealthy fats in the blood were lower in the low-carbohydrate group. How is that possible? That is what metabolism does.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is the best diet?&lt;/strong&gt;&lt;br /&gt;We don’t know the ideal diet composition. We do know that saturated fat, unlike trans-fat, is a normal part of body chemistry and extreme avoidance is not justified by current scientific data. Removing some saturated fat to reduce calories is good, but adding back carbs appears to be deleterious. It appears that healthy, carbohydrate restriction will trump the effects of any kind of fat. For a person with diabetes, blood glucose must be the first consideration. If you have relatively tight blood sugar control, the amount of saturated fat you eat may be a non-issue. You can do what we did before the diabetes-obesity epidemic: regulate your intake by your taste and your natural appetite. No one ever did want to eat a pound of bacon.&lt;br /&gt;&lt;br /&gt;Sources:&lt;br /&gt;1. Food and Nutrition Board: Macronutrients. In: Dietary reference intake: National Academies Press; 2005, p.484.&lt;br /&gt;&lt;br /&gt;2. JB German, CJ Dillard: Saturated fats: what dietary intake? Am J Clin Nutr 2004, 80:550-559.&lt;br /&gt;&lt;br /&gt;3. MW Gillman, et al. : Inverse association of dietary fat with development of ischemic stroke in men. JAMA 1997, 278:2145-150.&lt;br /&gt;&lt;br /&gt;4. D Mozaffarian, EB Rimm, DM Herrington: Dietary fats, carbohydrate, and progression of coronary atherosclerosis in postmenopausal women. Am J Clin Nutr 2004, 80:1175-1184.&lt;br /&gt;&lt;br /&gt;5. JS Volek, et al. A hypocaloric, very low carbohydrate, ketogenic diet results in a greater reduction in the percent and absolute amount of plasma triglyceride saturated fatty acids compared to a low fat diet. NAASO, Boston, MA, October, 2006.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1538732854241909636?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1538732854241909636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1538732854241909636' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1538732854241909636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1538732854241909636'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/what-if-saturated-fat-is-not-problem.html' title='What If Saturated Fat Is Not the Problem?'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4181956458732222381</id><published>2008-10-07T05:42:00.000-07:00</published><updated>2008-10-07T05:43:03.466-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>ADA Revises Nutrition Recommendation for those with Diabetes</title><content type='html'>I'm still reading through the just released Nutrition Recommendations and Interventions for Diabetes - the 2008 position statement from the American Diabetes Association regarding dietary recommendations for those at risk for or diagnosed with diabetes.&lt;br /&gt;&lt;br /&gt;While I finish reading the actual documents and write up what I think of the paper, here are links to what others are saying today:&lt;br /&gt;&lt;br /&gt;Jimmy Moore - New 2008 ADA Recommendations Partially Acknowledge Low-Carb Diets&lt;br /&gt;&lt;br /&gt;Adam Campbell - Apparently Hell Just Froze Over&lt;br /&gt;&lt;br /&gt;Dr. Mary Vernon - HAS THE AMERICAN DIABETES ASSOCIATION SPARKED YET ANOTHER ATKINS REVOLUTION?&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4181956458732222381?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4181956458732222381/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4181956458732222381' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4181956458732222381'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4181956458732222381'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/ada-revises-nutrition-recommendation.html' title='ADA Revises Nutrition Recommendation for those with Diabetes'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4148497620692896941</id><published>2008-10-07T05:41:00.000-07:00</published><updated>2008-10-07T05:42:10.877-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Low-Carb Ketogenic Diet - Greater Weight Loss and More...</title><content type='html'>&lt;h3 class="post-title entry-title"&gt; &lt;/h3&gt;  &lt;div class="post-body entry-content"&gt; A neat little study was published in the January 2008 American Journal of Clinical Nutrition - Effects of a high-protein ketogenic diet on hunger, appetite, and weight loss in obese men feeding ad libitum.&lt;br /&gt;&lt;br /&gt;In the study, researchers followed seventeen obese men, confined to a metabolic ward, for a month while they consumed either a low-carb ketogenic diet or a moderate carbohydrate diet on an ad libitum basis (eat as much as desired from foods allowed).&lt;br /&gt;&lt;br /&gt;Over the course of the study, the protein intake of both dietary regiments was fixed to provide 30% of calories; carbohydrate was restricted to 4% of total calories in the men consuming the low-carb diet and 22% in the men consuming the moderate carbohydrate diet; and fat intake rounded out the calories in each diet with no specific limitation on fat consumption in either.&lt;br /&gt;&lt;br /&gt;All meals were prepared and provided as requested by the men and they were allowed to eat whatever they wanted of the allowed foods in each meal with no restrictions other than on their carbohydrate options. The men on the low-carb diet consumed less calories each day on their own and reported higher feelings of satiety while on the diet.&lt;br /&gt;&lt;br /&gt;On average, the difference in carbohydrate intake was great - the men on the low-carb diet consumed just 22g of carbohydrate each day, while those on the moderate carbohydrate diet consumed 170g each day. Both levels of intake were significant reductions from baseline, where the men averaged 396g of carbohydrate each day.&lt;br /&gt;&lt;br /&gt;Weight loss was greater for the men following the low-carb diet, who averaged a weight loss of 6.34kg (13.95-pounds) compared to the moderate carb diet averaging a loss of 4.35kg (9.57-pounds). Calorie differences between the two groups do not fully explain the greater weight loss in the men consuming the low-carb diet since they ate about 1731-calories a day compared to the men consuming the moderate carb diet consuming about 1898-calories a day. This difference - about 167-calories a day - translates to a month long difference of 5016-calories, or 1.43-pounds....yet the difference between the two groups was 4.38-pounds greater weight loss in those on the low-carb diet.&lt;br /&gt;&lt;br /&gt;Digging deeper into the published data we also find that the men on the low-carb diet experienced statistically significant improvements in blood glucose, insulin and HOMA-IR, as well as favorable improvements in their cholesterol levels with a reduction in total cholesterol and LDL, an increase in HDL and a significant reduction in triglycerides.&lt;br /&gt;&lt;br /&gt;All of these favorable changes occured while the men consumed a dietary fat intake similar to that at baseline. Where at baseline they consumed an average of 126g of total fat with 43.8g of saturated fat, their dietary intake while following low-carb didn't change much - they averaged 129g of total fat on the low-carb diet and 46.3g of saturated fat. This basically highlights that modifying one's diet to be low-carb does not mean one suddenly increases dietary fat consumption significantly - in this trial, dietary fat was pretty much the same compared to baseline.&lt;br /&gt;&lt;br /&gt;So, with this study, we have one more to add to the pile that supports carbohydrate restriction for satiety, ad libitum-spontaneous calorie reduction, weight loss, improvements to glucose, insulin and insulin resistance, along with favorable improvements (although not statistically different from the moderate carbohydrate diet) to lipids.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4148497620692896941?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4148497620692896941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4148497620692896941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4148497620692896941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4148497620692896941'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/low-carb-ketogenic-diet-greater-weight.html' title='Low-Carb Ketogenic Diet - Greater Weight Loss and More...'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3956135827433679822</id><published>2008-10-07T05:40:00.000-07:00</published><updated>2008-10-07T05:41:21.583-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Low-GI Diet for 1-year Suggests Improvements for T2DM?</title><content type='html'>As I was browsing through the January issue of the American Journal of Clinical Nutrition this weekend, a perspective written by John Miles caught my attention. In his article, A role for the glycemic index in preventing or treating diabetes, he wrote, &lt;em&gt;"Elsewhere in this issue of the Journal, Wolever et al (7) report the results of the Canadian Trial of Carbohydrates in Diabetes (CCD). Patients with well-controlled type 2 diabetes who were treated with diet alone were randomly assigned to receive either a high-GI diet, a low-GI diet, or a low-carbohydrate, high-monounsaturated fat diet for 1 y. &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;The study was carefully conducted and of longer duration than many earlier trials. The investigators found no weight loss and a small increase in glycated hemoglobin (HbA1c) in all 3 groups. This increase in HbA1c is what one would expect with no intervention (8). The fact that glucose concentrations 2 h after an oral glucose challenge were significantly lower in persons who had followed the low-GI diet for 1 y than in those who followed the other 2 diets for 1 y suggests improvement in either insulin sensitivity or insulin secretion (or improvements in both)."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Sounds like a compelling study, so intrigued, I clicked open the study mentioned, The Canadian Trial of Carbohydrates in Diabetes (CCD), a 1-y controlled trial of low-glycemic-index dietary carbohydrate in type 2 diabetes: no effect on glycated hemoglobin but reduction in C-reactive protein, and read the abstract.&lt;br /&gt;&lt;br /&gt;In it, researchers concluded &lt;em&gt;"In subjects with T2DM managed by diet alone with optimal glycemic control, long-term HbA1c was not affected by altering the GI or the amount of dietary carbohydrate. Differences in total:HDL cholesterol among diets had disappeared by 6 mo. However, because of sustained reductions in postprandial glucose and CRP, a low-GI diet may be preferred for the dietary management of T2DM."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Here I was even more intrigued - a study trial comparing three different dietary approaches, and one low-carb for a year?&lt;br /&gt;&lt;br /&gt;But I wondered, how was it that the low-carb diet didn't do as well as other studies would suggest it should have?&lt;br /&gt;&lt;br /&gt;Wanting to know this, I opened the full-text to understand how it was possible that greater improvement was not found in the "low-carbohydrate" subjects and why HbA1c didn't remain stable or improve in the course of one year with either low-GI or low-carbohydrate diets. Previous study data published by others would suggest that HbA1c would at least remain stable with low-carb, no?&lt;br /&gt;&lt;br /&gt;Well, it took no more than five minutes to fully see why things turned out as they did - the "low-carbohydrate" diet was &lt;strong&gt;&lt;em&gt;not a low-carbohydrate diet afterall&lt;/em&gt;&lt;/strong&gt; - at baseline the subjects assigned the low-carb diet ate an average of 210g of carbohydrate each day and during the low-carb diet consumed an average of 199g of carbohydrate each day.&lt;br /&gt;&lt;br /&gt;Hello? In whose fantasy world is 199g of carbohydrate each day a low-carb diet?&lt;br /&gt;&lt;br /&gt;Ah, but I digress...&lt;br /&gt;&lt;br /&gt;While the researchers took pains to measure many risk factors, at the end of the year, the subjects in &lt;em&gt;&lt;strong&gt;every group experienced progression of their diabetes risk factors&lt;/strong&gt;&lt;/em&gt; - there simply was no improvement to laud in this trial, no matter how you twist the data.&lt;br /&gt;&lt;br /&gt;What's absolutely disappointing in how the findings are presented is that the researchers honed in on two measures of improvement - CRP and post-prandial glucose - to the exclusion of significant declines in other measures that are critically important for those with type II diabetes.&lt;br /&gt;&lt;br /&gt;Where do I even begin?&lt;br /&gt;&lt;br /&gt;Weight remained fairly stable in all three groups, with &lt;strong&gt;&lt;em&gt;only the low-GI group actually gaining some weight&lt;/em&gt;&lt;/strong&gt;, despite no meaningful difference in calorie intake from baseline through one year on the low-GI diet.&lt;br /&gt;&lt;br /&gt;Worse though is the lack of critical thought around the marked and significant increase in waist circumference in all three diet groups.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The high-GI group started with a waist circumference of 99.1cm - it increased over the year to 103.1cm (+1.6 inches) - this despite stable weight on the scale (84.4kg at baseline; 84.3kg after 1-year on the diet).&lt;/li&gt;&lt;li&gt;The low-GI group started with a waist circumference of 98.3cm - it increase over the course of the year to 104.9cm (+2.6 inches). They also experienced a weight gain, going from 81.1kg at baseline to 83.9kg at the end of the study (+6.2-pounds gained).&lt;/li&gt;&lt;li&gt;The supposed "low-carbohydrate" group - eating 199g carbohydrate on average - started with a waist circumference of 98.6cm - it increased over the study period to 103.1cm (+1.8-inches) - like the high-GI group, this increase was despite a stable scale weight...they started at 84.7kg and ended the year at 84.3kg.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;If that wasn't bad enough - all three groups experienced increases in their HbA1c too. &lt;/p&gt;&lt;p&gt;Those consuming a high-GI diet saw a rise from 6.2 to 6.34; low-GI saw a rise from 6.2 to 6.34; and those on the supposed low-carb diet rose from 6.1 to 6.35. &lt;/p&gt;&lt;p&gt;Over time the researchers reported that this rise was statistically significant - and I'd say clinically significant too!&lt;/p&gt;&lt;p&gt;Now with just these risk measures, you'd think there was enough to maybe, just maybe, inspire the researchers to challenge the efficacy of any of the above diets for those with type II diabetes. Maybe even say that perhaps the level of carbohydrate - despite quality or glycemic index or load improvements - matters; that simply modifying the type of carbohydrate in the diet does &lt;em&gt;NOTHING&lt;/em&gt; for glycemic control and if carbohydrate is consumed habitually at levels seen in this study, perhaps someone with type II diabetes should expect a continued progression of their disease?&lt;/p&gt;&lt;p&gt;But, ya know what? They didn't even consider that. And the above problems were not all they reported either.&lt;/p&gt;&lt;p&gt;Let's see what else was reported in the data:&lt;/p&gt;&lt;p&gt;Total cholesterol didn't do much in any of the groups; LDL didn't change significantly in any group....HDL however declined in the low-GI group, but rose in the high-GI and supposed low-carb groups. &lt;/p&gt;&lt;p&gt;Triglycerides fell slightly in the high-GI and supposed low-carb groups, but rose in the low-GI group. &lt;/p&gt;&lt;p&gt;Two more markers of potential health risks found to be problematic in the low-GI diet over a year - and the researchers even noted it in the full-text - &lt;em&gt;"With the low-GI diet, mean triacylglycerol was 12% higher, HDL was 4% lower, and the ratio of apoB to apoA was 4% higher than with the low-CHO diet &lt;/em&gt;&lt;/p&gt;&lt;p&gt;But a 12% increase in triglycerides and a 4% drop in HDL didn't set off any alarm bells either. &lt;/p&gt;&lt;p&gt;Neither did the fact the low-GI group saw an increase in their fasting plasma glucose over the year, which was also noted and basically disregarded.&lt;/p&gt;&lt;p&gt;With regards to the main focus in the abstract, C-Reactive Protein, the researchers did find a significant difference between the low-GI diet and the high-GI diet, but also noted that between the low-GI diet and the supposed "low-carb" diet there was no significant difference. &lt;/p&gt;&lt;p&gt;Yet, they chose to focus on the low-GI diet as better for a type II diabetic, despite the fact it led to &lt;/p&gt;&lt;ul&gt;&lt;li&gt;weight gain&lt;/li&gt;&lt;li&gt;waist circumference increase&lt;/li&gt;&lt;li&gt;increase in HbA1c&lt;/li&gt;&lt;li&gt;increase in fasting plasma glucose&lt;/li&gt;&lt;li&gt;a marked rise in triglycerides&lt;/li&gt;&lt;li&gt;and a decline in HDL&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The conclusion here speaks volumes when taken in context to the carbohydrate intake in each group, &lt;em&gt;"In subjects with T2DM managed by diet alone with optimal glycemic control, long-term HbA1c was not affected by altering the GI or the amount of dietary carbohydrate."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Better stated might be, with no meaningful change in absolute carbohydrate consumption, even with improvement in quality of carbohydrate - it is likely a type II diabetic will experience progressive decline in glycemic control along with other declines in risk factors over a year.&lt;/p&gt;&lt;p&gt;The data is published right in the full-text - the glycemic index as a means to reverse or prevent diabetes is no solution. &lt;/p&gt;&lt;p&gt;In this study, &lt;strong&gt;&lt;em&gt;those who followed the low-GI diet had the worst overall outcome&lt;/em&gt;&lt;/strong&gt; - they gained weight, increased waist circumference, saw triglycerides rise while HDL fell, and experienced a decline in glycemic control as evidenced by their increased HbA1c.&lt;/p&gt;&lt;p&gt;Yet you wouldn't know it from the abstract which focuses instead on &lt;em&gt;"sustained reductions in postprandial glucose and CRP"&lt;/em&gt; and then concludes that &lt;em&gt;"a low-GI diet may be preferred for the dietary management of T2DM."&lt;/em&gt;&lt;/p&gt;&lt;p&gt;And then back to the article from John Miles, who said this study "suggests improvements" in those who followed the low-GI diet for one year. Who's he kidding?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3956135827433679822?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3956135827433679822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3956135827433679822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3956135827433679822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3956135827433679822'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/low-gi-diet-for-1-year-suggests.html' title='Low-GI Diet for 1-year Suggests Improvements for T2DM?'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5310864390538897847</id><published>2008-10-07T05:38:00.000-07:00</published><updated>2008-10-07T05:40:04.622-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>ADA Says Low-Carb Okay for Weight Loss, So What?</title><content type='html'>An article published today in Diabetes Health,  ADA Now Supports Low-Carb Diets, reminded me that I have not yet posted my thoughts on the updated guidelines for Medical Nutrition Therapy (MNT) recently issued by the American Diabetes Association (ADA).  This will probably be longer than usual, so bear with me!&lt;br /&gt;&lt;br /&gt;On December 28, 2007, the ADA issued a press release to highlight the publication of and changes within their clinical practice recommendations, better known as the Standards of Care in Diabetes.&lt;br /&gt;&lt;br /&gt;Each year the guidelines are updated and this year was no exception - as noted in the press release, &lt;em&gt;"Until now, the ADA did not recommend low carbohydrate diets because of lack of sufficient scientific evidence supporting their safety and effectiveness. The 2008 Recommendations include a statement recognizing the increasing evidence that weight-loss plans that restrict carbohydrate or fat calorie intake are equally effective for reducing weight in the short term (up to one year). The "Standards of Medical Care in Diabetes--2008" document reviews the growing evidence for the effectiveness of either approach to weight loss. In addition, there is now evidence that the most important determinant of weight loss is not the composition of the diet, but whether the person can stick with it, and that some individuals are more likely to adhere to a low carbohydrate diet while others may find a low fat calorie-restricted diet easier to follow."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;There are two main issues I'll look at in the above statement today:&lt;br /&gt;&lt;br /&gt;1. that low-carbohydrate diets are as effective as low-fat calorie restricted diets for weight loss for up to one-year&lt;br /&gt;&lt;br /&gt;2. that composition of diet is less important than whether a person can stick with the dietary approach for weight loss.&lt;br /&gt;&lt;br /&gt;In order to fully understand exactly what the ADA is saying with regard to the first issue, we need to return to the August 2006 issue of Diabetes Care, where an updated consensus statement was published, Management of Hyperglycemia in Type 2 Diabetes: A Consensus Algorithm for the Initiation and Adjustment of Therapy: A consensus statement from the American Diabetes Association [ADA] and the European Association for the Study of Diabetes [EASD]&lt;br /&gt;&lt;br /&gt;As I noted in my review of that consensus statement &lt;em&gt;"Rather than question the dietary recommendations, or explore emerging data supportive of dietary interventions that are different from the recommendations, the statement instead concludes that "the limited long-term success of lifestyle programs to maintain glycemic goals in patients with type 2 diabetes suggests that a large majority of patients will require the addition of medications over the course of their diabetes." &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;The final sentence in the section discussing medications, which followed the section on lifestyle intervention, sets the stage for what is to come, "addition of medications is the rule, not the exception, if treatment goals are to be met over time."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;In August 2006 the ADA, along with the EASD, threw up their hands and decided that dietary and lifestyle intervention was futile, therefore the only logical place to go was intensive pharmaceutical intervention at diagnosis.&lt;br /&gt;&lt;br /&gt;The authors wrote, in the paper's conclusion, &lt;em&gt;"We now understand that much of the morbidity associated with long-term complications can be substantially reduced with interventions that achieve glucose levels close to the nondiabetic range. Although new classes of medications, and numerous combinations, have been demonstrated to lower glycemia, current-day management has failed to achieve and maintain the glycemic levels most likely to provide optimal health care status for people with diabetes."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;On this the ADA remains steadfast - pharmacological intervention is the first step with lifestyle intervention upon diagnosis. The freely available full-text of the Management of Hyperglycemia in Type 2 Diabetes: A Consensus Algorithm for the Initiation and Adjustment of Therapy clearly continues with the August 2006 consensus that lifestyle intervention for those diagnosed with diabetes will not work, therefore medication must be initiated upon diagnosis.&lt;br /&gt;&lt;br /&gt;Yet we find the ADA falling all over itself to tout its position change for weight loss - that now a low-carbohydrate diet is considered as effective as a low-fat calorie restricted diet for weight loss? And somehow we're supposed to be jumping for joy that they made this change?&lt;br /&gt;&lt;br /&gt;If we take the entire package of documents published in the Diabetes Care Supplement, we cannot reach any conclusion other than the ADA has made up its mind and is not going to review the evidence. They may concede that a low-carbohydrate diet can help with some loss of weight, but nothing else - and even that carries the caveat that one must be intensely monitored if they do decide to follow a low-carb diet.&lt;br /&gt;&lt;br /&gt;But, going back to the first point - the concession that low-carbohydrate diets and low-fat calorie restricted diets are both effective for weight loss over the short-term.&lt;br /&gt;&lt;br /&gt;Quite frankly this statement by the ADA is &lt;em&gt;meaningless&lt;/em&gt; when we consider the &lt;em&gt;full context&lt;/em&gt; of their position because they hold that &lt;em&gt;"current-day management has failed to achieve and maintain the glycemic levels most likely to provide optimal health care status for people with diabetes."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;While many lauding the change as a step in the right direction for the ADA, I'm not impressed, nor convinced - if anything, the ADA only confirmed what they've already said previously.&lt;br /&gt;&lt;br /&gt;We only need to go back to the publication of a 22-month study, in which diabetic subjects were found to have significant health improvements following a low-carbohydrate diet, to read the ADA reaction in an article at WebMD - &lt;em&gt;"While agreeing that carbohydrate restriction helps people with type 2 diabetes control their blood sugar, ADA spokesman Nathaniel G. Clark, MD, tells WebMD that the ADA does not recommend very low-carb diets because patients find them too restrictive. "We want to promote a diet that people can live with long-term," says Clark, who is vice president of clinical affairs and youth strategies for the ADA. "People who go on very low carbohydrate diets generally aren't able to stick with them for long periods of time."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Which brings us to issue two above - diet composition does not matter as much as a diet one can follow, a theme the ADA has been hot and heavy on for at least two years now.&lt;br /&gt;&lt;br /&gt;Let's review the sentence in the ADA press release carefully, &lt;em&gt;"In addition, there is now evidence that the most important determinant of weight loss is not the composition of the diet, but whether the person can stick with it, and that some individuals are more likely to adhere to a low carbohydrate diet while others may find a low fat calorie-restricted diet easier to follow."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Evidence?  What evidence?&lt;br /&gt;&lt;br /&gt;The Standards of Medical Care in Diabetes 2008 includes this sentence, &lt;em&gt;"Although numerous studies have attempted to identify the optimal mix of macronutrients for meal plans of people with diabetes, it is unlikely that one such combination of macronutrients exists. The best mix of carbohydrate, protein, and fat appears to vary depending on individual circumstances. For those individuals seeking guidance on macronutrient distribution in healthy adults, the Dietary Reference Intakes (DRIs) may be helpful;"&lt;/em&gt; referencing the IOM documents published back in 2002.&lt;br /&gt;&lt;br /&gt;The Nutrition Recommendations and Interventions for Diabetes: A Position Statement of the American Diabetes Association 2008 includes &lt;em&gt;"Nutrition counseling should be sensitive to the personal needs, willingness to change, and ability to make changes of the individual with pre-diabetes or diabetes. (E)"&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Note with that the letter "E" assigned to it, classing it as "expert opinion" - so again, where is the evidence? Each study referenced dates between 1997 and 2004 - so what exactly is the new evidence alluded to in the updated documents?&lt;br /&gt;&lt;br /&gt;Oh, that's right, there is NONE...this is simply an opinion and has already been stated numerous times before.&lt;br /&gt;&lt;br /&gt;I've said it before, "evidence versus sophistry; with just enough opinion thrown in to ensure glycemic control remains elusive..."&lt;br /&gt;&lt;br /&gt;The ADA refuses to acknowledge that diabetics deserve clear statements about how to achieve normal blood sugars, and instead continues headlong on this path that they somehow deserve to eat like anyone else in the population and can mediate the effects of carbohydrate-rich food with medications.&lt;br /&gt;&lt;br /&gt;:::sigh:::&lt;br /&gt;&lt;br /&gt;So yeah, the ADA now says one can try a low-carbohydrate diet for weight loss, for the short-term (up to 1 year) and that some will somehow manage to follow such a diet. But let's not forget, if you do decide to follow a low-carbohydrate diet, you're also going to be subjected to much more intense monitoring than your low-fat calorie restricted peer and you're left with no advice other than the same-old same-old once your year is up.&lt;br /&gt;&lt;br /&gt;Then what?&lt;br /&gt;&lt;br /&gt;The failed ADA diet?&lt;br /&gt;&lt;br /&gt;Lifelong medication with continued stepped-up pharmaceutical requirements with each passing year until you're dependent upon insulin injections?&lt;br /&gt;&lt;br /&gt;The ADA, even with this new position that a low-carbohydrate diet may be used for up to one year &lt;strong&gt;&lt;em&gt;for weight loss&lt;/em&gt;&lt;/strong&gt;, still continues to fail in their mission - to prevent and cure diabetes and to improve the lives of all people affected by diabetes - because they refuse to actually review the hard data available; and instead continue in this sophistry that dietary recommendations need to be based upon what one wants to eat rather than what one &lt;em&gt;should eat&lt;/em&gt; based upon metabolic, hormonal and physiological facts.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5310864390538897847?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5310864390538897847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5310864390538897847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5310864390538897847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5310864390538897847'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/ada-says-low-carb-okay-for-weight-loss.html' title='ADA Says Low-Carb Okay for Weight Loss, So What?'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5643274627895607714</id><published>2008-10-07T05:37:00.000-07:00</published><updated>2008-10-07T05:38:42.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Animal products are ‘whole foods,' too</title><content type='html'>Dana Carpender's latest - I couldn't have said it better myself!&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Animal products are 'whole foods,' too&lt;/strong&gt;&lt;br /&gt;Dana Carpender&lt;br /&gt;&lt;br /&gt;The nutritional buzz phrase is 'whole foods.' This is encouraging. I've been watching the nutrition scene long enough to remember when people who insisted that whole-grain bread was more nutritious than enriched bread were scorned as 'food faddists.'&lt;br /&gt;&lt;br /&gt;But the admonitions to eat whole foods seem to apply only to grains, fruits and vegetables. Officialdom still recommends discarding large fractions of animal foods. Yet few see these fractionated animal foods as the refined, depleted foods they are.&lt;br /&gt;&lt;br /&gt;Take dairy. Virtually all recommendations for dairy products include the qualifiers 'low-fat' or 'fat-free.' But that's not the way it comes out of the cow. Yes, whole milk has more calories than skim. It also has far more vitamin A, because it's carried in the butterfat. (Some skim milk is fortified with vitamin A —- the equivalent of adding a few vitamins back to nutritionally depleted white flour.) Because fat aids in calcium absorption, you'll get more calcium from whole milk. Whole milk from grass-fed cows supplies CLA, a fat that increases fat-burning and reduces heart disease and cancer risk, and omega-3 fats, which reduce inflammation, and heart disease and cancer risk. It is worth paying premium prices for such milk.&lt;br /&gt;&lt;br /&gt;And eggs. Oh, poor eggs. There they are, just about the most perfect food in the world, and what do people do? They throw away the yolks. The part with almost all the vitamins, including A, E, K and the hard-to-come-by D, not to mention brain-enhancing choline and DHA. Eggs from pastured chickens also have yolks rich in omega-3. Better to throw away the whites, not that I'd recommend that, either. Just eat whole eggs, will you?&lt;br /&gt;&lt;br /&gt;Then there's chicken. When did 'chicken' become synonymous with 'boneless, skinless chicken breast?' Chicken breast is a good food, but the whole chicken is better. Dark and white meats both have nutritional strengths. They are not identical in vitamin and mineral content. Chicken skin is a good source of vitamin A, again because it's fatty. I wrote recently about liver's nutritional bonanza, and hearts are nutrient-rich as well, making giblet gravy a great idea. Simmering the leftover chicken bones yields flavorsome broth rich in highly absorbable calcium and joint-building gelatin. (I save my steak bones, too, for beef broth.)&lt;br /&gt;&lt;br /&gt;Our ancestors, ever mindful of where their next meal was coming from, relished every edible part of every animal they killed. Indeed, paleoanthropologists assert that hunter-gatherers ate the rich, fatty organ meats first, preferring them to muscle meats, and smashed bones to eat the marrow. As recently as a century ago, marrow was such a popular food that special spoons were made for scooping it out of bones. I love the stuff. I've been sucking the marrow out of lamb-chop bones since I was a tyke. A 1997 article in the journal Nature asserts that human brain capacity decreased at the dawn of agriculture 10,000 years ago, very likely because of a reduction in animal-fat consumption. Whole animal foods are part of our nutritional heritage.&lt;br /&gt;&lt;br /&gt;My low-carbohydrate eating habits are often referred to as a 'fad.' Whatever. If it was good enough for my hunter-gatherer ancestors, it's good enough for me. Do you want to know what's really a fad? Removing the fat from milk and the yolks from eggs, and discarding three- quarters of the chicken, all organ meats and most bones. There's not a culture in the world where our narrow, refined, low-fat, flavorless versions of animal foods are part of the traditional diet.&lt;br /&gt;&lt;br /&gt;Continuing reading for recipe included in original article!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5643274627895607714?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5643274627895607714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5643274627895607714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5643274627895607714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5643274627895607714'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/animal-products-are-whole-foods-too.html' title='Animal products are ‘whole foods,&apos; too'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7817996261682455330</id><published>2008-10-07T05:36:00.000-07:00</published><updated>2008-10-07T05:37:31.058-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Two-Fold Reduction in Triglycerides! How? Low-Carb!</title><content type='html'>In a recent study - Metabolic Effects of Weight Loss on a Very-Low-Carbohydrate Diet Compared With an Isocaloric High-Carbohydrate Diet in Abdominally Obese Subjects, published in the Journal of the American College of Cardiology, researchers reported favorable results for obese adults randomly assigned a low-carbohydrate diet for 24-weeks (six months).&lt;br /&gt;&lt;br /&gt;As reported in heartWire, &lt;em&gt;"After six months, isocaloric energy-restricted very-low-carbohydrate, high-fat and high-carbohydrate, low-fat diets produced similar weight loss and substantial reductions in a number of cardiovascular disease risk markers," write Jeannie Tay (Flinders University, Adelaide, Australia) and colleagues in the January 1, 2008 issue of the Journal of the American College of Cardiology.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"Neither diet displayed adverse effects, suggesting diverse dietary patterns, including very-low-carbohydrate, high-fat diets, may be tailored to an individual's metabolic profile and dietary preference for weight management."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;The investigators note that while the traditional diet reduced LDL-cholesterol levels, the low-carbohydrate, high-fat diet resulted in greater increases in HDL cholesterol and singificantly larger reductions in triacylglycerol levels (a two-fold greater reduction compared to the traditional low-fat diet).&lt;br /&gt;&lt;br /&gt;In fact, if we go to the full-text, we find the researchers went so far as to write &lt;em&gt;"consistent with other recent studies, the VLCHF (very-low-carb high-fat) diet produced greater reductions in TAG and increases in HDL-C than the HCLF (high-carbohydrate low-fat) diet. This suggests that the VLCHF diet as a weight loss strategy may confer the greatest clinical benefits in patients who present with hypertriglyceridemia, low HDL levels, abdominal adiposity, and insulin resistance"&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Did you catch that - "greatest clinical benefits" - part?&lt;br /&gt;&lt;br /&gt;In the paper we learn that subjects were randomly assigned to either of the moderately energy-restricted diet plans for 24 weeks. For those assigned to the very-low-carbohydrate, high-fat diet, 4% of total calories were obtained from carbohydrates, 35% from protein, and 61% from fat, including 20% of total calories from saturated fat. Subjects randomized to the high-carbohydrate, low-fat diet followed a more traditional macronutrient profile, with 46% of calories obtained from carbohydrates and 30% from fat, including &lt;8% from saturated fat.&lt;br /&gt;&lt;br /&gt;Now we all know the American Heart Association insists we must keep saturated fat at less than 7% of our calories because intakes higher than that will kill us (eye roll) - yet here we have stunning improvements with saturated fat intake at/above 20% daily for six months! If you haven't read it yet, Dr. Richard Feinman wrote a good article about saturated fat recently.&lt;br /&gt;&lt;br /&gt;So, what gives? It seems the subjects in this study significantly reduced their carbohydrate, and that carbohydrate does matter. Also, this study confirms previous data published that found similar improvements in those restricting carbohydrate.&lt;br /&gt;&lt;br /&gt;Slowly but surely more data is coming forward that validates carbohydrate restriction for not only weight loss, but health improvements!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7817996261682455330?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7817996261682455330/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7817996261682455330' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7817996261682455330'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7817996261682455330'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/two-fold-reduction-in-triglycerides-how.html' title='Two-Fold Reduction in Triglycerides! How? Low-Carb!'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2355902937605423658</id><published>2008-10-07T05:35:00.000-07:00</published><updated>2008-10-07T05:36:42.489-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Insulin Resistance and Cardiomyopathy</title><content type='html'>An interesting abstract was published in the recent issue of the Journal of the American College of Cardiology - Insulin-Resistant Cardiomyopathy, Clinical Evidence, Mechanisms, and Treatment Options.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Increasing evidence points to insulin resistance as a primary etiologic factor in the development of nonischemic heart failure (HF). The myocardium normally responds to injury by altering substrate metabolism to increase energy efficiency. Insulin resistance prevents this adaptive response and can lead to further injury by contributing to lipotoxicity, sympathetic up-regulation, inflammation, oxidative stress, and fibrosis. &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Animal models have repeatedly demonstrated the existence of an insulin-resistant cardiomyopathy, one that is characterized by inefficient energy metabolism and is reversible by improving energy use. Clinical studies in humans strongly support the link between insulin resistance and nonischemic HF. &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Insulin resistance is highly prevalent in the nonischemic HF population, predates the development of HF, independently defines a worse prognosis, and predicts response to antiadrenergic therapy. &lt;/em&gt;&lt;br /&gt;&lt;em&gt;&lt;/em&gt;&lt;br /&gt;&lt;em&gt;Potential options for treatment include metabolic-modulating agents and antidiabetic drugs. This article reviews the basic science evidence, animal experiments, and human clinical data supporting the existence of an "insulin-resistant cardiomyopathy" and proposes specific potential therapeutic approaches. &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;-------------------------&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2355902937605423658?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2355902937605423658/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2355902937605423658' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2355902937605423658'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2355902937605423658'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/insulin-resistance-and-cardiomyopathy.html' title='Insulin Resistance and Cardiomyopathy'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6560207750411482206</id><published>2008-10-07T05:31:00.000-07:00</published><updated>2008-10-07T05:35:46.411-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='loose weight'/><title type='text'>Protein Provides Satiety Through PYY</title><content type='html'>In our strange world, we have researchers now promoting the idea that a pharmaceutical version of the gut hormone PYY may offer a solution to help individuals lose weight.&lt;br /&gt;&lt;br /&gt;In the MSN article, Natural Gut Hormones May Provide a Treatment for Obesity, we learn that researchers are seeking to develop a pill to provide the satiety hormone PYY.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;"The advantage of developing weight loss medications based on gut-derived satiety hormones is that they enhance a process that occurs naturally. It is expected, therefore, that side effects will be minimal," says Dr Sainsbury-Salis.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Folks, we're not PYY deficient; in fact, I'd argue we're not eating the foods that stimulate PYY to effectively sate appetite naturally.&lt;br /&gt;&lt;br /&gt;As I noted in a previous blog post about research investigating PYY, &lt;em&gt;"A high protein diet led to spontaneous calorie reduction as PYY increased. The phenomenon was consistent with both the animal model using mice and in human studies used to validate the mice model. Over a longer term, the higher protein diet stimulated weight loss and enhanced PYY synthesis and secretion in mice."&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;As I noted in that post, the study I wrote about included quite specific detail about how diet influences the release of PYY in humans - &lt;em&gt;"The ready availability of carbohydrate-rich grains and cereals has been a recent development in human nutrition with the onset of organized agriculture. Many of the physiological systems that regulate food intake were probably established and may function better under lower-carbohydrate and higher-protein dietary conditions." &lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Those were not my words, but the words of the researchers!&lt;br /&gt;&lt;br /&gt;And now we have researchers looking to design a pill to provide what we already have naturally - if we eat adequate protein and fat. But, let's not go there and discuss diet, let's just pop a pill and continue along with the supposed "healthy diet" that obviously is not sating out appetite!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6560207750411482206?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6560207750411482206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6560207750411482206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6560207750411482206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6560207750411482206'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/protein-provides-satiety-through-pyy.html' title='Protein Provides Satiety Through PYY'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5378943830419347278</id><published>2008-10-07T05:29:00.000-07:00</published><updated>2008-10-07T05:30:42.103-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='beta'/><title type='text'>The future of Oracle APEX - aka Oracle APEX 4.0</title><content type='html'>In case you haven't read it on Marc Sewtz blog or in the newest edition of the German Oracle APEX community newsletter, on Friday July 25th at 14:00 (German time) there will be a WebCast about the features the Oracle APEX team is currently working on for Oracle APEX 4.0! The WebCast will also cover some tips &amp;amp; tricks for APEX 3.1.1.&lt;br /&gt;&lt;br /&gt;Get the details about how to join the WebCast at the German Oracle APEX Community web site.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5378943830419347278?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5378943830419347278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5378943830419347278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5378943830419347278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5378943830419347278'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/future-of-oracle-apex-aka-oracle-apex.html' title='The future of Oracle APEX - aka Oracle APEX 4.0'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1295156908928495881</id><published>2008-10-07T05:28:00.000-07:00</published><updated>2008-10-07T05:29:50.709-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='chart'/><title type='text'>Overlapping labels in an Oracle APEX pie chart</title><content type='html'>Ever had the problem of overlapping labels in a pie chart which you used in an Oracle Application Express (APEX) application? Have a look at Gary Myers excellent tip to avoid collisions by using analytic functions to sort the data. It's another great example of using the built-in power of the Oracle database.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1295156908928495881?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1295156908928495881/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1295156908928495881' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1295156908928495881'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1295156908928495881'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/overlapping-labels-in-oracle-apex-pie.html' title='Overlapping labels in an Oracle APEX pie chart'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3426298475117134680</id><published>2008-10-07T05:27:00.000-07:00</published><updated>2008-10-07T05:28:32.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle RAC'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='NTLM'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Two new Oracle APEX whitepapers</title><content type='html'>Ok, they are not brand new anymore, they have already been released last month. But in case you are not reading David Peake's blog or checking regularly the Oracle APEX website on OTN, the APEX team has published the following two new whitepapers:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;NTLM Authentication (a PL/SQL only solution) and&lt;/li&gt;&lt;li&gt;Oracle APEX with RAC (Real Application Cluster)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3426298475117134680?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3426298475117134680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3426298475117134680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3426298475117134680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3426298475117134680'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/two-new-oracle-apex-whitepapers.html' title='Two new Oracle APEX whitepapers'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5300668961527094412</id><published>2008-10-07T05:26:00.002-07:00</published><updated>2008-10-07T05:27:42.927-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle eBusiness Suite'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><title type='text'>Oracle APEX team needs your help!</title><content type='html'>It's your chance to help the Oracle APEX team to spreading the word about Oracle APEX. They want to convince the Oracle eBusiness Suite/Oracle Applications team to formally legitimize the use of Oracle Application Express with the Oracle eBusiness Suite/Applications. I think that would be another huge step to get Oracle APEX into more companies if it can be officially used to write custom applications in that environment.&lt;br /&gt;&lt;br /&gt;But they &lt;strong&gt;need your help!&lt;/strong&gt; Check out David Peake's blog posting for more details.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5300668961527094412?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5300668961527094412/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5300668961527094412' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5300668961527094412'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5300668961527094412'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/oracle-apex-team-needs-your-help.html' title='Oracle APEX team needs your help!'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8917403698337540193</id><published>2008-10-07T05:26:00.001-07:00</published><updated>2008-10-07T05:26:56.847-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><title type='text'>What's next on the Oracle APEX roadmap? Oracle APEX 3.2!</title><content type='html'>Just read on David Peake's blog that he has updated the Statement of Direction for Oracle Application Express (APEX).&lt;h3&gt;What has changed?&lt;/h3&gt;They are planing to release Oracle APEX 3.2, which will be Oracle APEX 3.1 + &lt;span style="font-weight: bold;"&gt;The Oracle Forms Migration Tool&lt;/span&gt;. If you are a Forms guru, they are &lt;span style="font-weight: bold;"&gt;looking for beta testers&lt;/span&gt;! Get the details at David's blog.&lt;br /&gt;&lt;br /&gt;I think the Forms Migration Tool will be another major step for Oracle APEX to get the Forms developers into the APEX boat. These two tools have a lot of similarities (declarative, PL/SQL, ...) and the same kind of productivity to develop database driven applications. Forms developers can re-use their existing skills and companies protect there investment by using the same business logic (if written in database packages) as for there Forms applications. Compared to learning or migrating an application into a new language (eg. Java/.Net) this can be a huge time safer.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8917403698337540193?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8917403698337540193/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8917403698337540193' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8917403698337540193'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8917403698337540193'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/whats-next-on-oracle-apex-roadmap.html' title='What&apos;s next on the Oracle APEX roadmap? Oracle APEX 3.2!'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8619299696885892491</id><published>2008-10-07T05:25:00.000-07:00</published><updated>2008-10-07T05:26:04.526-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='patch'/><title type='text'>Oracle APEX 3.1.2 is out!</title><content type='html'>The Oracle APEX team has released a new patchset for Oracle Application Express (APEX). According to the readme file the new version 3.1.2 contains 28 new bug fixes (Note: the list also contains the bugs from the previous patchset).&lt;br /&gt;&lt;br /&gt;The full release can be downloaded from the OTN download side.&lt;br /&gt;The patchset with just the changed files can be found on Metalink with the patch number 7313609.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8619299696885892491?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8619299696885892491/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8619299696885892491' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8619299696885892491'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8619299696885892491'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/oracle-apex-312-is-out.html' title='Oracle APEX 3.1.2 is out!'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5943555511207526184</id><published>2008-10-07T05:24:00.000-07:00</published><updated>2008-10-07T05:25:10.586-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='Popup LOV'/><title type='text'>Number of displayed Records of Oracle APEX Popup LOV</title><content type='html'>Recently I answered a question about where to change the number of displayed records of a Popup LOV in Oracle APEX and I thought it could be of general interest.&lt;br /&gt;&lt;br /&gt;The behavior of Popup LOVs can be changed through the &lt;strong&gt;Popup Lov template&lt;/strong&gt;. You can find it at&lt;br /&gt;&lt;strong&gt;Shared Components\Templates\Popup LOV&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;In the &lt;strong&gt;Pagination section&lt;/strong&gt; you will find the property &lt;strong&gt;Display&lt;/strong&gt; which defines how many records are displayed at once.&lt;br /&gt;&lt;br /&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_pdYw2m58qCo/SMQozkbsCtI/AAAAAAAAAZk/FuMc0WA-YhY/s400/popup_lov_pagination.png" alt="" id="BLOGGER_PHOTO_ID_5243360732584348370" border="0" /&gt;The Popup LOV template also contains other interesting settings like the icon which is used for the popup lov field or the text for the search button, the width and height which is used to display the popup lov window and much more. Just have a look!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5943555511207526184?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5943555511207526184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5943555511207526184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5943555511207526184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5943555511207526184'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/number-of-displayed-records-of-oracle.html' title='Number of displayed Records of Oracle APEX Popup LOV'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pdYw2m58qCo/SMQozkbsCtI/AAAAAAAAAZk/FuMc0WA-YhY/s72-c/popup_lov_pagination.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-782907433619148528</id><published>2008-10-07T05:23:00.000-07:00</published><updated>2008-10-07T05:24:25.939-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DOAG Regionaltreffen'/><title type='text'>DOAG Regionaltreffen in München zum Thema Oracle APEX</title><content type='html'>&lt;h2 class="post-title"&gt;&lt;span class="post-title"&gt;Just a quick announcement about an Oracle APEX meeting of the German Oracle Usergroup in Munich. The rest of the posting will be in German.&lt;br /&gt;&lt;br /&gt;Termin: &lt;strong&gt;Mittwoch, 17.09.2008, 17:00 - 19:00 Uhr&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Geplante Vorträge:&lt;br /&gt;&lt;br /&gt;1. Professionelle APEX Entwicklung - Projektbeispiele und Lessons Learned&lt;br /&gt;Referent: Dietmar Aust, OPAL Consulting&lt;br /&gt;&lt;br /&gt;2. Möglichkeiten mit Oracle TEXT (Volltextsuche) und APEX&lt;br /&gt;Referent: Carsten Czarski, ORACLE Deutschland GmbH&lt;br /&gt;&lt;br /&gt;Ab ca. 19:00 Uhr wird der Meinungsaustausch dann im Löwenbräukeller am Stiglmeierplatz fortgesetzt.&lt;br /&gt;&lt;br /&gt;Weitere &lt;/span&gt;Details und die Anmeldung auf den Seiten der DOAG.&lt;br /&gt;&lt;br /&gt;Übrigens, die &lt;strong&gt;Teilname ist kostenlos.&lt;/strong&gt;&lt;/h2&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-782907433619148528?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/782907433619148528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=782907433619148528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/782907433619148528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/782907433619148528'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/doag-regionaltreffen-in-mnchen-zum.html' title='DOAG Regionaltreffen in München zum Thema Oracle APEX'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3231282426034631380</id><published>2008-10-07T05:22:00.000-07:00</published><updated>2008-10-07T05:23:05.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='book'/><title type='text'>Pro Oracle Application Express finally shipping?</title><content type='html'>&lt;div class="post-body" id="post-1241837148678316576"&gt;                                  &lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_pdYw2m58qCo/SM-3-QNRsKI/AAAAAAAAAZs/5WRyc-agpa4/s400/pro+oracle+application+express+small.jpg" alt="" id="BLOGGER_PHOTO_ID_5246614371040342178" border="0" /&gt;Is John Scott's long awaited book Pro Oracle Application Express finally shipping?&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;It looks like!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are reports on the OTN APEX forum that they have received a mail from Amazon that they have shipped the book. I also checked the order page of Amazon and it shows that the book is on stock.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3231282426034631380?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3231282426034631380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3231282426034631380' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3231282426034631380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3231282426034631380'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/pro-oracle-application-express-finally.html' title='Pro Oracle Application Express finally shipping?'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_pdYw2m58qCo/SM-3-QNRsKI/AAAAAAAAAZs/5WRyc-agpa4/s72-c/pro+oracle+application+express+small.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-896205584084854778</id><published>2008-10-07T05:20:00.000-07:00</published><updated>2008-10-07T05:22:04.801-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle APEX'/><category scheme='http://www.blogger.com/atom/ns#' term='openworld'/><title type='text'>You will not guess where I'm! ;-)</title><content type='html'>On the other side it's not very hard to guess. I'm there where most of the Oracle blogging and Oracle APEX community currently is. I'm at Oracle Open World in San Francisco.&lt;br /&gt;&lt;br /&gt;I'm not sure how often I will blog, because I have a tight time schedule. But if you want to get hold of me, I will try to visit most of the Oracle APEX sessions.&lt;br /&gt;&lt;br /&gt;On Tuesday, between 14:30 and 15:30 I'm doing my own presentation titled &lt;strong&gt;The Power of the Oracle APEX Repository&lt;/strong&gt; (Session Id: 300210). It's currently booked out, but you might get a chance to still get in.&lt;br /&gt;&lt;br /&gt;Enough for now, I have to listen to Tom Kyte's "Efficient Schema Design" now.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-896205584084854778?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/896205584084854778/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=896205584084854778' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/896205584084854778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/896205584084854778'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/10/you-will-not-guess-where-im.html' title='You will not guess where I&apos;m! ;-)'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7068219977429830914</id><published>2008-08-12T23:42:00.000-07:00</published><updated>2008-08-12T23:43:30.040-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Bracketing frenzy ....oracle</title><content type='html'>&lt;p&gt;I just found myself decyphering this:&lt;/p&gt;&lt;pre&gt;SELECT ...&lt;br /&gt;FROM report_results rpt&lt;br /&gt;WHERE NOT ( (substr(rpt.report_type,2,1) in ('1','2','3','4','5')) and&lt;br /&gt;         (rpt.sig_type = 'ISDNMA') and&lt;br /&gt;         ((rpt.group_ctn != rpt.ctn_prefix||rpt.ctn_suffix) and&lt;br /&gt;          (length(rpt.group_ctn) != length(rpt.ctn_prefix||rpt.ctn_suffix)) and&lt;br /&gt;          ((length(rpt.group_ctn) != (length(rpt.ctn_prefix||rpt.ctn_suffix)-1)&lt;br /&gt;          ))));&lt;/pre&gt;&lt;p&gt;Which turns out to mean this:&lt;/p&gt;&lt;pre&gt;SELECT ...&lt;br /&gt;FROM   report_results rpt&lt;br /&gt;WHERE  NOT (     SUBSTR(rpt.report_type,2,1) IN ('1','2','3','4','5')&lt;br /&gt;           AND  rpt.sig_type = 'ISDNMA'&lt;br /&gt;           AND  rpt.group_ctn != rpt.ctn_prefix||rpt.ctn_suffix&lt;br /&gt;           AND  LENGTH(rpt.group_ctn) != LENGTH(rpt.ctn_prefix||rpt.ctn_suffix)&lt;br /&gt;           AND  LENGTH(rpt.group_ctn) != LENGTH(rpt.ctn_prefix||rpt.ctn_suffix)-1 );&lt;/pre&gt;&lt;p&gt;No wonder there are no brackets left in the shops.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7068219977429830914?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7068219977429830914/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7068219977429830914' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7068219977429830914'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7068219977429830914'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/bracketing-frenzy-oracle.html' title='Bracketing frenzy ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6313871735957729560</id><published>2008-08-12T23:41:00.000-07:00</published><updated>2008-08-12T23:42:42.063-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>EAV nightmare ....oracle</title><content type='html'>My charitable Christmas mood only goes so far. I'm looking through a spec which reads like a "database design nightmare!" theme advent calendar. Each page reveals a potential disaster more frightening than the one before. This is my favourite new year hang over inducing cocktail of entity attribute values and generic application design all wrapped up in a gloriously mal-specified mess. &lt;pre&gt;Table: Parameters&lt;br /&gt;&lt;br /&gt;id  VARCHAR2(50) PRIMARY KEY  --The application requesting the value&lt;br /&gt;identifier NUMBER       PRIMARY KEY  --The name of the parameter&lt;br /&gt;type  CHAR(1) --‘I’, ‘S’ or ‘B’ is type of value for the parameter&lt;br /&gt;string_val VARCHAR2(50) --‘Y’ or ‘N’ or NULL if BOOLEAN or the string&lt;br /&gt;integer_val NUMBER       -- The integer value&lt;br /&gt;&lt;br /&gt;note: The id holds a value comprising the IP address, type of&lt;br /&gt;application and the instance at that IP.&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6313871735957729560?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6313871735957729560/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6313871735957729560' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6313871735957729560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6313871735957729560'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/eav-nightmare-oracle.html' title='EAV nightmare ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-9068505959975739933</id><published>2008-08-12T04:12:00.002-07:00</published><updated>2008-08-12T04:13:33.548-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Who needs modular code? ....oracle</title><content type='html'>Wouldn’t it be nice if when people wrote some useful code, they tried to make it suitably modular and reusable? This is what I have to contend with at the moment. We have a large, complex system written in Oracle Forms that we are now partially re-writing in HTMLDB (hurrah!) One function I want to replicate is the ability to change your own Oracle password; the current Forms application has a form to do this that looks like this: &lt;blockquote&gt;  Old Password: [                    ]   New Password: [                    ]   Confirm New Password: [                    ] &lt;/blockquote&gt;So that should be a moment’s work to redo, right? Wrong. There is a package of procedures for user maintenance that contains the following 2 procedures that are relevant: &lt;pre&gt;PROCEDURE change_password_validate&lt;br /&gt;(p_username         IN VARCHAR2,&lt;br /&gt;p_old_password     IN VARCHAR2,&lt;br /&gt;p_new_password     IN VARCHAR2,&lt;br /&gt;p_confirm_password IN VARCHAR2,&lt;br /&gt;p_profile_name     IN VARCHAR2,&lt;br /&gt;p_mode             IN VARCHAR2 DEFAULT 'N',&lt;br /&gt;p_mask             IN  VARCHAR2) ;&lt;br /&gt;&lt;br /&gt;PROCEDURE change_password_process&lt;br /&gt;(p_username IN VARCHAR2,&lt;br /&gt;p_new_password IN VARCHAR2,&lt;br /&gt;p_confirm_password IN VARCHAR2,&lt;br /&gt;p_mask           IN VARCHAR2,&lt;br /&gt;p_profile_name IN VARCHAR2,&lt;br /&gt;p_encrypt_pw IN VARCHAR2,&lt;br /&gt;p_admin_mode IN VARCHAR2 DEFAULT NULL) ;&lt;br /&gt;&lt;/pre&gt; Some design flaws are immediately evident: &lt;ul&gt;&lt;li&gt;Validation is totally separate from processing. If I choose to, I can skip the validate routine altogether and call the process routine to change the password to anything I like, regardless of whether I get the old password right or confirm it correctly. (Actually, this foolish separation of validation from processing is a company standard!) &lt;/li&gt;&lt;li&gt;I get to choose whether the password is to be stored (in our own application’s USERS table) in encrypted form or not.  HTF do &lt;b&gt;I&lt;/b&gt; know whether it should be encrypted or not? &lt;/li&gt;&lt;li&gt;I need to supply something called p_mask, which I think may be something to do with the encryption process, or maybe the validation process – none of this is documented of course, or at least nobody knows where any such documentation may be found. I have tried passing the word ‘mask’ and it seems to work, except that all subsequent attempt to change the password then fail on the validation of the “old” password – perhaps because it has been encrypted in an unexpected manner. &lt;/li&gt;&lt;li&gt;I also need to supply something called p_profile_name, which I do happen to know is a user attribute something like a role, stored in the USERS table. Well excuse me, but if I’m passing in the username as a parameter, why should I have to go look up the USERS record and obtain the profile_name value just to pass it into this lazy procedure? &lt;/li&gt;&lt;li&gt;I don’t fully understand p_mode and p_admin_mode either, but at least they have defaults which I assume (for now) I can live with. &lt;/li&gt;&lt;/ul&gt;So instead of being a 5 minute job, this is probably going to occupy about a day of my time: locating source code (the packages are wrapped in the database), studying source code to see what it is doing. And if all that fails, trying to find someone from the team that wrote the code and ask them to tell me what I should be doing.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-9068505959975739933?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/9068505959975739933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=9068505959975739933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9068505959975739933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9068505959975739933'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/who-needs-modular-code-oracle.html' title='Who needs modular code? ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4920522006413966041</id><published>2008-08-12T04:12:00.001-07:00</published><updated>2008-08-12T04:12:40.317-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Bring out your WTFs ....oracle</title><content type='html'>Always on the lookout for blog material requiring minimum editorial effort, we welcome your WTFs. Amusing and instructive examples of mind-boggling Oracle-related madness (ideally short ones) can now be sent to us at our new e-mail address: OracleWTF@bigfoot.com.  I would also like to welcome our two new WTF contributors, Tony Andrews and Scott Swank.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4920522006413966041?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4920522006413966041/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4920522006413966041' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4920522006413966041'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4920522006413966041'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/bring-out-your-wtfs-oracle_12.html' title='Bring out your WTFs ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7236110954568921297</id><published>2008-08-12T04:11:00.001-07:00</published><updated>2008-08-12T04:11:56.082-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Grow Your Own Concurrency Problem ....oracle</title><content type='html'>What's that? the sound of ORA-00001: approaching...  &lt;pre&gt;...&lt;br /&gt;FUNCTION key_not_in_table(pkey IN INT) RETURN BOOLEAN&lt;br /&gt;IS&lt;br /&gt; countkey INT;&lt;br /&gt;BEGIN&lt;br /&gt; SELECT count(key) INTO countkey&lt;br /&gt; FROM key_values WHERE key = pkey;&lt;br /&gt;&lt;br /&gt; IF countkey &gt; 0 THEN&lt;br /&gt;  RETURN FALSE;&lt;br /&gt; END IF;&lt;br /&gt; RETURN TRUE;&lt;br /&gt;&lt;br /&gt;END key_not_in_table;&lt;br /&gt;&lt;br /&gt;PROCEDURE insert_or_update(pkey IN INT,&lt;br /&gt;  pval IN INT)&lt;br /&gt;IS&lt;br /&gt;BEGIN&lt;br /&gt; IF key_not_in_table(pkey) THEN&lt;br /&gt;  INSERT INTO key_values&lt;br /&gt;  VALUES (key, value, 0);&lt;br /&gt; ELSE&lt;br /&gt;  UPDATE key_values&lt;br /&gt;  SET value =  pval&lt;br /&gt;  WHERE key = pkey;&lt;br /&gt; END IF;&lt;br /&gt;END insert_or_update;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7236110954568921297?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7236110954568921297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7236110954568921297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7236110954568921297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7236110954568921297'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/grow-your-own-concurrency-problem.html' title='Grow Your Own Concurrency Problem ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4122778641033247308</id><published>2008-08-12T04:10:00.001-07:00</published><updated>2008-08-12T04:10:54.929-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Universal SQL Performance Improver Discovered ....oracle</title><content type='html'>In an AskTom thread this week, the poster wrote: &lt;blockquote&gt;"...I have been told before by several people, and I have implemented myself on several SQLs that adding the clause "AND 1=1" literally to any SQL statement helps improve the performance of the SQL statement dramatically."&lt;/blockquote&gt; &lt;p&gt;And we've all been wasting our time looking for a FAST=TRUE parameter.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4122778641033247308?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4122778641033247308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4122778641033247308' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4122778641033247308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4122778641033247308'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/universal-sql-performance-improver.html' title='Universal SQL Performance Improver Discovered ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-234707728777774467</id><published>2008-08-12T04:08:00.000-07:00</published><updated>2008-08-12T04:10:00.971-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Bring out your WTFs ....oracle</title><content type='html'>&lt;p&gt;Always on the lookout for blog material requiring minimal editorial effort, we welcome your WTF submissions. Amusing and instructive examples of mind-boggling Oracle-related madness (ideally short ones) can now be sent to us at our new e-mail address: oraclewtf@bigfoot.com. Please remember to include "OracleWTF" in your Subject line.&lt;/p&gt;  &lt;p&gt;I would also like to welcome our two new contributors, Tony Andrews and Scott Swank.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-234707728777774467?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/234707728777774467/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=234707728777774467' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/234707728777774467'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/234707728777774467'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/bring-out-your-wtfs-oracle.html' title='Bring out your WTFs ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4922359365315590278</id><published>2008-08-08T08:08:00.000-07:00</published><updated>2008-08-08T08:09:19.166-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>It's One More, Innit? ....oracle</title><content type='html'>&lt;p&gt;&lt;i&gt;Thanks to Scott Lynch for submitting an example of how a J2EE application developer just might not trust the database to do its job.&lt;!--And not have a clue about how to interact with the database, either (clue: check out how many times the same statement is prepared.)--&gt; &lt;/i&gt;&lt;/p&gt;&lt;p&gt;  &lt;i&gt;Over to Scott...&lt;/i&gt;&lt;/p&gt;&lt;p&gt;  From a big bucks retail management system (now owned by a big bucks DBMS vendor).&lt;/p&gt;&lt;p&gt;  1. Get NextVal from the sequence.&lt;/p&gt;&lt;p&gt; 2. Assign the value, an integer, to a string.&lt;/p&gt;&lt;p&gt; 3. Check to see if the string they just created exists.&lt;/p&gt;&lt;p&gt; 4. Cast the integer that has been cast to a string, to a BigDecimal.&lt;/p&gt;&lt;p&gt; 5. Add 1 to it (because they're obviously smarter than some silly old sequence).&lt;/p&gt;&lt;p&gt;  I just love step 3.&lt;/p&gt;&lt;p&gt;  Sheer brilliance on that one. And it's repeated for almost every table in this particular little slice of the application.&lt;/p&gt;&lt;p&gt;  ------------------------------------------------------------------------------------------------  &lt;/p&gt;&lt;pre&gt;public long getNextId() throws java.sql.SQLException{&lt;br /&gt;  if (conn == null)&lt;br /&gt;  {&lt;br /&gt;     throw new java.sql.SQLException("Connection not set");&lt;br /&gt;  }&lt;br /&gt;  long nextIdLong = 0;&lt;br /&gt;  try&lt;br /&gt;  {&lt;br /&gt;     //Create a statement&lt;br /&gt;     tStmt = conn.createStatement();&lt;br /&gt;&lt;br /&gt;     //Create a query string to get all the fields from the table. The&lt;br /&gt;     //presentation layer will decide which field to display&lt;br /&gt;     String query = "SELECT some_seq.nextval FROM dual";&lt;br /&gt;&lt;br /&gt;     //The complete query is executed&lt;br /&gt;     rs = tStmt.executeQuery(query);&lt;br /&gt;     rs.next();&lt;br /&gt;     String nextIdString = rs.getString(1);&lt;br /&gt;&lt;br /&gt;     if (nextIdString != null) {&lt;br /&gt;        nextIdLong = ((new BigDecimal(nextIdString)).add(new BigDecimal(1))).longValue();&lt;br /&gt;     }&lt;br /&gt;&lt;br /&gt;     tStmt.close();&lt;br /&gt;&lt;br /&gt;  } catch (SQLException e)&lt;br /&gt;  {&lt;br /&gt;     throw new java.sql.SQLException(e.toString());&lt;br /&gt;  }&lt;br /&gt;  return nextIdLong;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4922359365315590278?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4922359365315590278/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4922359365315590278' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4922359365315590278'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4922359365315590278'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/its-one-more-innit-oracle.html' title='It&apos;s One More, Innit? ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2315553098400891820</id><published>2008-08-08T08:07:00.000-07:00</published><updated>2008-08-08T08:08:05.653-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Two days before the day after tomorrow ....oracle</title><content type='html'>Clearly a South Park fan worked here once:  &lt;pre&gt;cat oracle_GetThisworkingDay&lt;br /&gt;&lt;br /&gt;DATE=`date +%Y%m%d%H%M`&lt;br /&gt;CUTOFF=$2&lt;br /&gt;&lt;br /&gt;#!/bin/ksh&lt;br /&gt;# oracle_GetThisworkingDay&lt;br /&gt;# Script to retrieve the current working day (YYYYMMDD) from&lt;br /&gt;# the working_calendar table in the Oracle database.&lt;br /&gt;oracle_GetPreviousWorkingDay `oracle_GetNextWorkingDay $DATE $CUTOFF`&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;  I'll spare you the contents of these scripts.  Suffice to say they call the following procedures:  &lt;pre&gt;   FUNCTION previous_day (&lt;br /&gt;     p_date                              DATE DEFAULT SYSDATE&lt;br /&gt;  )&lt;br /&gt;     RETURN VARCHAR2&lt;br /&gt;  IS&lt;br /&gt;     v_result                      VARCHAR2 (10);&lt;br /&gt;  BEGIN&lt;br /&gt;     SELECT dt&lt;br /&gt;       INTO v_result&lt;br /&gt;       FROM working_calendar&lt;br /&gt;      WHERE dt = (SELECT MAX (dt)&lt;br /&gt;                    FROM working_calendar&lt;br /&gt;                   WHERE dt &lt; p_date );&lt;br /&gt;   RETURN TO_CHAR(v_result,'YYYYMMDD');&lt;br /&gt; END;&lt;br /&gt;&lt;/pre&gt; ( nice use of SQL there ) and of course... &lt;pre&gt;   FUNCTION next_day (&lt;br /&gt;     p_now                               DATE DEFAULT CURRENT_DATE&lt;br /&gt;  )&lt;br /&gt;     RETURN DATE&lt;br /&gt;  IS&lt;br /&gt;     RESULT                        DATE;&lt;br /&gt;  BEGIN&lt;br /&gt;     SELECT MIN (dt)&lt;br /&gt;       INTO RESULT&lt;br /&gt;       FROM working_calendar&lt;br /&gt;      WHERE dt &gt;= p_now + 1;&lt;br /&gt;&lt;br /&gt;     RETURN RESULT;&lt;br /&gt;  END;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2315553098400891820?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2315553098400891820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2315553098400891820' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2315553098400891820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2315553098400891820'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/two-days-before-day-after-tomorrow.html' title='Two days before the day after tomorrow ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5703771949630682918</id><published>2008-08-08T08:06:00.000-07:00</published><updated>2008-08-08T08:07:19.393-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>When is a BLOB not a blob? ....oracle</title><content type='html'>&lt;p&gt;When it's a Bee-Lob, apparently. If think you know how to pronounce some of the more common Oracle-related words, you have to check Eddie Awad's post, "Char or Car", and the follow-up comments...&lt;/p&gt;  &lt;p&gt;awads.net/wp/2006/01/18/char-or-car&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5703771949630682918?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5703771949630682918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5703771949630682918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5703771949630682918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5703771949630682918'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/when-is-blob-not-blob-oracle.html' title='When is a BLOB not a blob? ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7583820583366201386</id><published>2008-08-08T08:04:00.000-07:00</published><updated>2008-08-08T08:05:54.910-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>INTEGER Type is Platform-Independent shock ....oracle</title><content type='html'>&lt;p&gt;We are grateful to oracleplsqlprogramming.com for their December 2005 Tip of the Month: Insights into PL/SQL Integers, in which we learn this:&lt;/p&gt; &lt;blockquote&gt;&lt;b&gt;INTEGER&lt;/b&gt; - defined in the STANDARD package as a subtype of NUMBER, this datatype is implemented in a completely platform-independent fashion, which means that anything you do with NUMBER or INTEGER variables should work the same regardless of the hardware on which the database is installed.&lt;/blockquote&gt; &lt;p&gt;And thank goodness for that, is what we say. Sometimes you just don't need platform-dependent results from your PL/SQL integer calculation depending on the hardware on which the database is installed.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7583820583366201386?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7583820583366201386/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7583820583366201386' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7583820583366201386'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7583820583366201386'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/integer-type-is-platform-independent.html' title='INTEGER Type is Platform-Independent shock ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-9197710987178189196</id><published>2008-08-08T08:02:00.000-07:00</published><updated>2008-08-08T08:04:35.665-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>I Object, Your Honour... ....oracle</title><content type='html'>Erm, excuse me for interrupting, but what exactly is this?  &lt;blockquote&gt;There are 2 ways to construct an ANYDATA. The CONVERT* calls enable construction of the ANYDATA in its entirety with a single call. They serve as explicit CAST functions from any type in the &lt;strong&gt;&lt;em&gt;&lt;span style="font-size: 180%;"&gt;Oracle ORDBMS&lt;/span&gt; &lt;/em&gt;&lt;/strong&gt;to ANYDATA.&lt;/blockquote&gt; (Found here in the 10.1 documentation).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-9197710987178189196?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/9197710987178189196/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=9197710987178189196' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9197710987178189196'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9197710987178189196'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/i-object-your-honour-oracle.html' title='I Object, Your Honour... ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1013193977558552351</id><published>2008-08-06T22:35:00.000-07:00</published><updated>2008-08-06T22:38:26.950-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Counting Sheep  ....oracle</title><content type='html'>I'd not seen this Oracle Forums thread before, though it started in 2002 and now has 198 replies. Somebody once asked for some PL/SQL coding standards, someone else offered to email some, and then for ever after gets bombarded with requests from other people saying "Please send same to me at another-idiot-sheep@nobrain.com" Every now and then someone kindly posts a URL to some PL/SQL standards on the web, or points out that these people are just getting their email addresses onto a lot of spam mailing lists, but on and on they go asking for a copy to be sent direct to them. It's surprisingly funny.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1013193977558552351?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1013193977558552351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1013193977558552351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1013193977558552351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1013193977558552351'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/counting-sheep-oracle.html' title='Counting Sheep  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3583816226293362458</id><published>2008-08-06T22:34:00.000-07:00</published><updated>2008-08-06T22:35:05.955-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>EAV Returns: The Concrete Elephant approach  ....oracle</title><content type='html'>&lt;p&gt;Anyone who has read Tales Of The Oak Table, not to mention Tony Andrews' blog or any of the countless articles and discussions on the subject on AskTom and elsewhere, will know two things about the fabled "Entity-Attribute-Value" approach to database design, in which you model all "things" in one table with a "thing ID" and a "thing type", plus a second table holding one row per "attribute", and thus create an application that can model any conceivable type of thing, ever:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;It seems like a clever idea at first.&lt;/li&gt;&lt;li&gt;It isn't.&lt;/li&gt;&lt;/ol&gt; &lt;p&gt;But wait. A poster on OTN forums ("SIMPLE Database Design Problem") has solved the major problems inherent in the original Entity-Attribute-Value approach, by simply denormalising away the Attribute-Value part.&lt;/p&gt; &lt;p&gt;Now the &lt;tt&gt;ENTITIES&lt;/tt&gt; table will have all the columns for every entity type. Maybe a lot of them will be null because "INVOICE" rows will use mainly different columns to "TROPICAL_DISEASE" rows, but disk space is cheap, and look at the simplification we have achieved by not having to babysit all those old-fashioned tables. And it's not a generic design any more, is it? It's concrete.&lt;/p&gt;  &lt;p&gt;The table would look something like this:&lt;/p&gt;  &lt;pre&gt;ENTITYID ENTITYTYPE NAME      PRICE DIET  COLOUR ANNUAL_TURNOVER&lt;br /&gt;-------- ---------- --------- ----- ----- ------ ---------------&lt;br /&gt;1        PERSON     William&lt;br /&gt;2        FRUIT      Banana                Yellow&lt;br /&gt;3        COMPANY    Megacorp                     100000000&lt;br /&gt;4        ANIMAL     Fruitbat        Fruit&lt;br /&gt;5        SNACK      Snickers  0.4&lt;/pre&gt;  &lt;p&gt;accompanied by a generic RELATIONS table like this:&lt;/p&gt; &lt;pre&gt;ENTITY1 ENTITY2 RELATIONSHIP&lt;br /&gt;------- ------- ------------&lt;br /&gt;3       1       EMPLOYS&lt;br /&gt;1       2       EATS&lt;br /&gt;1       5       EATS&lt;/pre&gt;  &lt;p&gt;Want to list the snacks eaten by Megacorp employees? Simple:&lt;/p&gt;  &lt;pre&gt;SELECT emp.entityid, emp.name, snack.name, snack.price&lt;br /&gt;FROM   entities emp&lt;br /&gt;      JOIN relations emprel&lt;br /&gt;      ON  emprel.entity2 = emp.entityid&lt;br /&gt;      AND emprel.relationship = 'EMPLOYS'&lt;br /&gt;&lt;br /&gt;      JOIN entities com&lt;br /&gt;      ON com.entityid = emprel.entity1&lt;br /&gt;      AND com.entitytype = 'COMPANY'&lt;br /&gt;&lt;br /&gt;      JOIN relations snrel&lt;br /&gt;      ON  snrel.entity1 = emp.entityid&lt;br /&gt;      AND snrel.relationship = 'EATS'&lt;br /&gt;&lt;br /&gt;      JOIN entities snack&lt;br /&gt;      ON  snack.entityid = snrel.entity2&lt;br /&gt;      AND snack.entitytype = 'SNACK'&lt;br /&gt;&lt;br /&gt;WHERE  emp.entitytype = 'PERSON'&lt;br /&gt;AND    com.name = 'Megacorp';&lt;/pre&gt; &lt;p&gt;Want to make &lt;tt&gt;FRUITBAT&lt;/tt&gt; an employee of &lt;tt&gt;SNICKERS&lt;/tt&gt;?&lt;/p&gt;  &lt;pre&gt;INSERT INTO relations VALUES (5, 4, 'EMPLOYS');&lt;/pre&gt;  &lt;p&gt;The thread becomes increasingly surreal as more and more posters suggest likely issues, from performance (he's prototyped it and the slowdown is insignificant) to complexity (the code will be generated dynamically from an object library) and the limited number of columns per table in Oracle (he might go with MySQL) while Erdem remains cheerfully confident that it will work (it won't).&lt;/p&gt; &lt;p&gt;My thanks to 3360 for sharing this. Send your WTFs to us at OracleWTF@bigfoot.com.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3583816226293362458?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3583816226293362458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3583816226293362458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3583816226293362458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3583816226293362458'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/eav-returns-concrete-elephant-approach.html' title='EAV Returns: The Concrete Elephant approach  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5471603826580115096</id><published>2008-08-06T22:33:00.000-07:00</published><updated>2008-08-06T22:34:02.461-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>The Phantom's Gonna Git Ya  ....oracle</title><content type='html'>I know I'm asking for trouble here by offering an AskTom page for a WTF, but I couldn't resist. If there was ever a time you wanted your spelling to be spot on, it would be when posting a link to a spell-checker...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5471603826580115096?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5471603826580115096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5471603826580115096' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5471603826580115096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5471603826580115096'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/phantoms-gonna-git-ya-oracle.html' title='The Phantom&apos;s Gonna Git Ya  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2136577137117480310</id><published>2008-08-06T22:32:00.000-07:00</published><updated>2008-08-06T22:33:16.795-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Wanna Date?   ....oracle</title><content type='html'>&lt;p&gt;Dates are known to be exceedingly difficult and avoiding them at all costs is something of a skill. This function, in the spirit of Never do in SQL what you can do in PL/SQL, calculates a date range before calling another procedure that also avoided using dates for its input date parameters. So despite its absence, it is at least partially responsible for this mess.&lt;/p&gt;  &lt;p&gt;I stripped the code down to its date handling which studiously avoids using date calculations wherever possible, and uses string handling instead, leaving in the comments because they are also the documentation.&lt;/p&gt;  &lt;pre&gt;create or replace function start_date (&lt;br /&gt;p_range         in      varchar2,&lt;br /&gt;p_in_date       in      varchar2    -- DD-MON-YYYY format String&lt;br /&gt;)&lt;br /&gt;return varchar2&lt;br /&gt;as&lt;br /&gt;l_out_date varchar2(11);&lt;br /&gt;month varchar2(10) := to_char(to_date(p_in_date,'DD-MON-YYYY'),'MON');&lt;br /&gt;year varchar2(10)  := to_char(to_date(p_in_date,'DD-MON-YYYY'),'YYYY');&lt;br /&gt;v_cnt_yr        number;&lt;br /&gt;v_end_date      date    := to_date(p_in_date,'DD-MON-YYYY');&lt;br /&gt;v_start_date    varchar2(11);&lt;br /&gt;begin&lt;br /&gt;if p_range = 'QTD' THEN&lt;br /&gt;&lt;br /&gt; if month in ('JAN','FEB','MAR') then&lt;br /&gt;    -- if given month = march and date is 31&lt;br /&gt;    -- then data for jan,feb and march.&lt;br /&gt;    l_out_date := '01-JAN-'||year;&lt;br /&gt; elsif month in ('APR','MAY','JUN')  then&lt;br /&gt;    l_out_date := '01-APR-'||year;&lt;br /&gt; elsif month in ('JUL','AUG','SEP')  then&lt;br /&gt;    l_out_date := '01-JUL-'||year;&lt;br /&gt; elsif month in ('OCT','NOV','DEC')  then&lt;br /&gt;    l_out_date := '01-OCT-'||year;&lt;br /&gt; end if;&lt;br /&gt;&lt;br /&gt;elsif p_range = 'YTD' then&lt;br /&gt;&lt;br /&gt; -- beginning of the year.&lt;br /&gt;  l_out_date := '01-JAN-'||year;&lt;br /&gt;&lt;br /&gt;elsif p_range = 'M' or p_range='MTD' then&lt;br /&gt;&lt;br /&gt; -- beginning of month&lt;br /&gt;  l_out_date := '01-'||month||'-'||year;&lt;br /&gt;&lt;br /&gt;elsif p_range like 'B%' then&lt;br /&gt;  v_cnt_yr     := substr(ltrim(rtrim(p_range)),2);&lt;br /&gt;  -- We take the start date as the first day after trailing&lt;br /&gt;  -- back the required no. of months&lt;br /&gt;  l_out_date   := to_char(last_day(add_months(&lt;br /&gt;                     last_day(v_end_date), -v_cnt_yr)) + 1,&lt;br /&gt;                     'DD-MON-YYYY');&lt;br /&gt;end if;&lt;br /&gt;return l_out_date;&lt;br /&gt;end;&lt;/pre&gt;  &lt;p&gt;After reading it I thought, "So what does this do that TRUNC doesn't?" Apparently not a lot when you need to get the month, quarter or year to date. If you try this at home remember to format the return of START_DATE for readability since it usefully returns a 4000 character string.&lt;/p&gt;&lt;p&gt;  &lt;/p&gt;&lt;pre&gt;SQL&gt; exec :d := '17-JUN-2006'&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; select start_date('QTD',:d) start_date,&lt;br /&gt;2    trunc(to_date(:d),'Q') from dual;&lt;br /&gt;&lt;br /&gt;START_DATE  TRUNC(TO_DA&lt;br /&gt;----------- -----------&lt;br /&gt;01-APR-2006 01-APR-2006&lt;br /&gt;&lt;br /&gt;SQL&gt; select start_date('YTD',:d) start_date,&lt;br /&gt;2    trunc(to_date(:d),'Y') from dual;&lt;br /&gt;&lt;br /&gt;START_DATE  TRUNC(TO_DA&lt;br /&gt;----------- -----------&lt;br /&gt;01-JAN-2006 01-JAN-2006&lt;br /&gt;&lt;br /&gt;SQL&gt; select start_date('MTD',:d) start_date,&lt;br /&gt;2    trunc(to_date(:d),'MM') from dual;&lt;br /&gt;&lt;br /&gt;START_DATE  TRUNC(TO_DA&lt;br /&gt;----------- -----------&lt;br /&gt;01-JUN-2006 01-JUN-2006&lt;/pre&gt;  &lt;p&gt;But what about the mysterious 'B%' format mask? This calculates the first day of the month, where 'Bn' is n-1 months ago, tricky eh? In SQL we are forced to call two functions instead of having START_DATE call ADD_MONTHS for us with two bonus LAST_DAYS thrown in for good measure. The n-1 bit could even be a bug but who knows?&lt;/p&gt;   &lt;pre&gt;SQL&gt; select start_date('B12',:d) start_date,&lt;br /&gt;2    trunc(add_months(to_date(:d),-11),'MM') from dual;&lt;br /&gt;&lt;br /&gt;START_DATE  TRUNC(ADD_M&lt;br /&gt;----------- -----------&lt;br /&gt;01-JUL-2005 01-JUL-2005&lt;/pre&gt;   &lt;p&gt;The convenience obviously outweighs the problem of having to deal with an undocumented date function that accepts and returns strings. Also with this function I have the luxury of substituting 'M' for 'MTD', but not 'Y' for 'YTD' or 'Q' for 'QTD' though I suspect these could be improvements for versions 2.0 and 3.0.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2136577137117480310?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2136577137117480310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2136577137117480310' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2136577137117480310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2136577137117480310'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/wanna-date-oracle.html' title='Wanna Date?   ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3690752080139603202</id><published>2008-08-06T22:31:00.000-07:00</published><updated>2008-08-06T22:32:11.462-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Stop Press: Oracle Granted License To Extend February  ....oracle</title><content type='html'>Yes, it's official. Oracle has been granted permission to extend February by 3 days. Shame no-one told the developers responsible for INTERVAL arithmetic. &lt;p&gt;  &lt;/p&gt;&lt;pre&gt;SQL&gt; SELECT DATE '2006-01-31' + INTERVAL '1' MONTH&lt;br /&gt; 2  FROM   dual;&lt;br /&gt;SELECT DATE '2006-01-31' + INTERVAL '1' MONTH&lt;br /&gt;                          *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-01839: date not valid for month specified&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3690752080139603202?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3690752080139603202/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3690752080139603202' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3690752080139603202'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3690752080139603202'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/stop-press-oracle-granted-license-to.html' title='Stop Press: Oracle Granted License To Extend February  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6094897533334441681</id><published>2008-08-06T22:30:00.000-07:00</published><updated>2008-08-06T22:31:19.283-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Hey, we do the WTFs... ....oracle</title><content type='html'>I found this beauty on Connor McDonald's web site. It's perfect fodder for Oracle WTF and Connor is happy for us to include it here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6094897533334441681?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6094897533334441681/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6094897533334441681' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6094897533334441681'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6094897533334441681'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/hey-we-do-wtfs-oracle.html' title='Hey, we do the WTFs... ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2638440566428510368</id><published>2008-08-06T22:29:00.000-07:00</published><updated>2008-08-06T22:30:35.766-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Tip: add DISTINCT to every query  ....oracle</title><content type='html'>&lt;p&gt;We all know that SQL can be a harsh mistress, and relational theorists such as Chris Date have long argued that the language is fundamentally flawed and that vendors have been misapplying relational theory from the start.&lt;/p&gt;&lt;p&gt;Now a Perl developer on perlmonks.org has been reading Date's book and finds that it explains all of his frustrations with databases. One tip for addressing their shortcomings is to add the handy &lt;tt&gt;DISTINCT&lt;/tt&gt; keyword to every single query, because stupid old SQL doesn't automatically apply the degree of uniqueness you might have in mind:&lt;/p&gt;  &lt;blockquote&gt;In fact, one of the founders of relational theory, C.J. Date, recommends that every SQL &lt;tt&gt;SELECT&lt;/tt&gt; statement be written as &lt;tt&gt;SELECT DISTINCT ...&lt;/tt&gt; Unfortunately, many folks get upset with this for a variety of reasons. First, DBMS do a horrible job of optimizing &lt;tt&gt;DISTINCT&lt;/tt&gt; queries. There are many cases where the &lt;tt&gt;DISTINCT&lt;/tt&gt; can be safely ignored but in practice, using &lt;tt&gt;DISTINCT&lt;/tt&gt; with large sets of data and complicated queries can have an abysmal impact on performance. I think this can be put into the "premature optimization" category, though. Until we know that &lt;tt&gt;DISTINCT&lt;/tt&gt; is causing an impact, isn't it better to improve the chance of getting correct results and worry about performance afterwards?&lt;/blockquote&gt;  &lt;p&gt;I had to read that a couple of times to realise that adding a &lt;tt&gt;DISTINCT&lt;/tt&gt; to every single query in the hope that it might mask some unknown deficiency in your model, your query, or the SQL language itself is not the "premature optimization" being referred to here - he means the idea that doing so might affect performance. After all, it might not, right?&lt;/p&gt;  &lt;p&gt;Read the rest of the discussion at perlmonks.org: "Why SQL Sucks (with a little Perl to fix it)". It also appears on Database Debunkings, "On the sins of SQL".&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2638440566428510368?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2638440566428510368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2638440566428510368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2638440566428510368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2638440566428510368'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/tip-add-distinct-to-every-query-oracle.html' title='Tip: add DISTINCT to every query  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7669512012119571378</id><published>2008-08-06T22:28:00.002-07:00</published><updated>2008-08-06T22:29:38.038-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Hey, we do the WTFs Part II...  ....oracle</title><content type='html'>At this rate, we might need to make Connor an honorary member. Here's another gem from his web site that he's picked up on his travels. PL/SQL doesn't get much "better" than this...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7669512012119571378?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7669512012119571378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7669512012119571378' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7669512012119571378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7669512012119571378'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/hey-we-do-wtfs-part-ii-oracle.html' title='Hey, we do the WTFs Part II...  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8181331713202827793</id><published>2008-08-06T22:28:00.001-07:00</published><updated>2008-08-06T22:28:52.786-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Umm, I forgot my password  ....oracle</title><content type='html'>&lt;p&gt;Probem solved, with the following convenient password reset procedure found in a large production database, with &lt;tt&gt;EXECUTE&lt;/tt&gt; granted to &lt;tt&gt;PUBLIC&lt;/tt&gt; and a handy public synonym: &lt;/p&gt;&lt;pre&gt;CREATE OR REPLACE PROCEDURE reset_user_password(p_username IN VARCHAR2)&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;  execute immediate 'ALTER USER '||upper(p_username)||' IDENTIFIED BY '||upper(p_username);&lt;br /&gt;END;&lt;br /&gt;/&lt;/pre&gt;Many thanks to Robert De Laat for this submission.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8181331713202827793?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8181331713202827793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8181331713202827793' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8181331713202827793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8181331713202827793'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/umm-i-forgot-my-password-oracle.html' title='Umm, I forgot my password  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3768449701886098167</id><published>2008-08-06T22:26:00.000-07:00</published><updated>2008-08-06T22:27:57.310-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Error-Prone Error Handling  ....oracle</title><content type='html'>A colleague found this handy utility on the internet. The idea is that whenever you get an Oracle error, the errant SQL statement will be written away to a table along with the message for you to read and enjoy at your leisure. Which would be fine I suppose, if it didn't introduce a whole lot of errors of its own. &lt;pre&gt;create table caught_errors (&lt;br /&gt; dt        date,              &lt;br /&gt; username  varchar2( 30), -- value from ora_login_user&lt;br /&gt; msg       varchar2(512),&lt;br /&gt; stmt      varchar2(512)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;create or replace trigger catch_errors&lt;br /&gt;  after servererror on database&lt;br /&gt;declare&lt;br /&gt;  sql_text ora_name_list_t;&lt;br /&gt;  msg_     varchar2(2000) := null;&lt;br /&gt;  stmt_    varchar2(2000) := null;&lt;br /&gt;begin&lt;br /&gt;&lt;br /&gt; for depth in 1 .. ora_server_error_depth loop&lt;br /&gt;   msg_ := msg_ || ora_server_error_msg(depth);&lt;br /&gt; end loop;&lt;br /&gt;&lt;br /&gt; for i in 1 .. ora_sql_txt(sql_text) loop&lt;br /&gt;    stmt_ := stmt_ || sql_text(i);&lt;br /&gt; end loop;&lt;br /&gt;&lt;br /&gt; insert into&lt;br /&gt;   caught_errors (dt     , username      ,msg ,stmt )&lt;br /&gt;          values (sysdate, ora_login_user,msg_,stmt_);&lt;br /&gt;end;&lt;br /&gt;/&lt;/pre&gt; &lt;p&gt;Note that whenever a SQL error occurs on the database this trigger will fire and:&lt;/p&gt; &lt;p&gt;1) try to stuff the entire SQL statement that failed into a varchar2(2000), regardless of how big it actually is&lt;/p&gt; &lt;p&gt;2) if that doesn't blow up, then tries to insert the same value into a varchar2(255) column&lt;/p&gt;  &lt;p&gt;In SQL Plus, this leads to errors like this (using an invalid table name in a large SELECT statement):&lt;/p&gt;  &lt;pre&gt;ERROR at line 30:&lt;br /&gt;ORA-00604: error occurred at recursive SQL level 1&lt;br /&gt;ORA-01401: inserted value too large for column&lt;br /&gt;ORA-06512: at line 12&lt;br /&gt;ORA-00942: table or view does not exist&lt;/pre&gt;  &lt;p&gt;... which is clearly more informative than:&lt;/p&gt;  &lt;pre&gt;ERROR at line 30:&lt;br /&gt;ORA-00942: table or view does not exist&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3768449701886098167?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3768449701886098167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3768449701886098167' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3768449701886098167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3768449701886098167'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/error-prone-error-handling-oracle.html' title='Error-Prone Error Handling  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7766367324904138876</id><published>2008-08-06T22:25:00.002-07:00</published><updated>2008-08-06T22:26:40.241-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Create Your Own DUAL Table  ....oracle</title><content type='html'>&lt;p&gt;If you want to retrieve a sequence value into a PL/SQL variable, you have to SELECT FROM DUAL. (Or use RETURNING INTO of course, but never mind that now.)&lt;/p&gt;&lt;p&gt;According to some, this is not only an inconvenient restriction, but also prone to failure if SYS.DUAL contains more than one row.&lt;/p&gt;&lt;p&gt;Help is at hand in the form of the utility below, which solves both problems at once by installing a table, a public synonym, a trigger and a function. Now your application will never again be unable to retrieve sequence values directly into PL/SQL variables on days when DUAL contains more than one row. So that's one less thing to worry about.&lt;/p&gt;&lt;pre&gt;CREATE OR REPLACE PROCEDURE replace_onerow (&lt;br /&gt;table_name_in IN VARCHAR2&lt;br /&gt;)&lt;br /&gt;IS&lt;br /&gt;BEGIN&lt;br /&gt;BEGIN&lt;br /&gt;   EXECUTE IMMEDIATE 'DROP TABLE ' || table_name_in;&lt;br /&gt;EXCEPTION&lt;br /&gt;   WHEN OTHERS THEN NULL;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE 'CREATE TABLE '&lt;br /&gt;                  || table_name_in&lt;br /&gt;                  || ' (dummy VARCHAR2(1))';&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE&lt;br /&gt;   'CREATE OR REPLACE TRIGGER onerow_' || table_name_in ||&lt;br /&gt;   '  BEFORE INSERT&lt;br /&gt;      ON ' || table_name_in || '&lt;br /&gt;   DECLARE&lt;br /&gt;      PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;      l_count PLS_INTEGER;&lt;br /&gt;   BEGIN&lt;br /&gt;      SELECT COUNT (*)&lt;br /&gt;      INTO   l_count&lt;br /&gt;      FROM   ' || table_name_in || ';&lt;br /&gt;&lt;br /&gt;      IF l_count = 1&lt;br /&gt;      THEN&lt;br /&gt;         raise_application_error&lt;br /&gt;         ( -20000&lt;br /&gt;         , ''The ' || table_name_in || ' table can only have one row.'' );&lt;br /&gt;      END IF;&lt;br /&gt;   END;';&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE 'BEGIN INSERT INTO '&lt;br /&gt;                  || table_name_in&lt;br /&gt;                  || ' VALUES (''X''); COMMIT; END;';&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE 'GRANT SELECT ON '&lt;br /&gt;                  || table_name_in&lt;br /&gt;                  || ' TO PUBLIC';&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE 'CREATE PUBLIC SYNONYM '&lt;br /&gt;                  || table_name_in&lt;br /&gt;                  || ' FOR '&lt;br /&gt;                  || table_name_in;&lt;br /&gt;&lt;br /&gt;EXECUTE IMMEDIATE&lt;br /&gt;   'CREATE OR REPLACE FUNCTION next_pky (seq_in IN VARCHAR2)&lt;br /&gt;       RETURN PLS_INTEGER AUTHID CURRENT_USER&lt;br /&gt;    IS&lt;br /&gt;       retval PLS_INTEGER;&lt;br /&gt;    BEGIN&lt;br /&gt;       EXECUTE IMMEDIATE ''SELECT '' || seq_in&lt;br /&gt;                     || ''.NEXTVAL FROM ' || table_name_in ||&lt;br /&gt;                     '|| ''INTO retval;&lt;br /&gt;       RETURN retval;&lt;br /&gt;    END next_pky;';&lt;br /&gt;&lt;br /&gt;END replace_onerow;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7766367324904138876?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7766367324904138876/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7766367324904138876' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7766367324904138876'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7766367324904138876'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/create-your-own-dual-table-oracle.html' title='Create Your Own DUAL Table  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1657269008504818022</id><published>2008-08-06T22:25:00.001-07:00</published><updated>2008-08-06T22:25:55.044-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>What is it with dates?  ....oracle</title><content type='html'>&lt;p&gt;What exactly is it with dates that so many Oracle developers struggle with? Why do they go to such lengths to avoid using the DATE type? Why, if DATE validation or arithmetic is required, would they use CHARs or NUMBERs? Abuses of DATEs seems to be a recurring theme on Oracle WTF. Indeed, here's another good example kindly provided by Graham Oakes.&lt;/p&gt;  &lt;p&gt;Over to Graham...&lt;/p&gt; &lt;hr /&gt; &lt;p&gt;This is a cracker, the easy way to check the supplied date in a string (after all who actually wants to use date types) is a valid date.&lt;/p&gt;  &lt;pre&gt;IF to_number(substr(v_valuedate,3,2)) NOT BETWEEN 1 AND 12&lt;br /&gt;THEN&lt;br /&gt;   v_rowstatustype := -190;&lt;br /&gt;ELSE&lt;br /&gt;   -- check 31 day months&lt;br /&gt;   IF substr(v_valuedate,3,2) IN ('01','03','05','07','08','10','12')&lt;br /&gt;   THEN&lt;br /&gt;       IF to_number(substr(v_valuedate,1,2)) &gt; 31&lt;br /&gt;       THEN&lt;br /&gt;           v_rowstatustype := -200;&lt;br /&gt;       END IF;&lt;br /&gt;&lt;br /&gt;   -- check 30 day months&lt;br /&gt;   ELSIF substr(v_valuedate,3,2) IN ('04','06','09','11')&lt;br /&gt;   THEN&lt;br /&gt;       IF to_number(substr(v_valuedate,1,2)) &gt; 30&lt;br /&gt;       THEN&lt;br /&gt;           v_rowstatustype := -200;&lt;br /&gt;       END IF;&lt;br /&gt;&lt;br /&gt;   -- check leap year feb&lt;br /&gt;   ELSIF substr(v_valuedate,3,2) = '02'&lt;br /&gt;         AND MOD(to_number(substr(v_valuedate,5,4)),4) = 0&lt;br /&gt;   THEN&lt;br /&gt;       IF to_number(substr(v_valuedate,1,2)) &gt; 29&lt;br /&gt;       THEN&lt;br /&gt;           v_rowstatustype := -200;&lt;br /&gt;       END IF;&lt;br /&gt;&lt;br /&gt;   -- check non-leap year feb&lt;br /&gt;   ELSIF substr(v_valuedate,3,2) = '02'&lt;br /&gt;         AND MOD(to_number(substr(v_valuedate,5,4)),4) != 0&lt;br /&gt;   THEN&lt;br /&gt;       IF to_number(substr(v_valuedate,1,2)) &gt; 28&lt;br /&gt;       THEN&lt;br /&gt;           v_rowstatustype := -200;&lt;br /&gt;       END IF;&lt;br /&gt;   END IF;&lt;br /&gt;END IF;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1657269008504818022?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1657269008504818022/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1657269008504818022' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1657269008504818022'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1657269008504818022'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/what-is-it-with-dates-oracle.html' title='What is it with dates?  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-382285104901284029</id><published>2008-08-06T22:24:00.000-07:00</published><updated>2008-08-06T22:25:01.479-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Umm, I forgot my password, Part 2  ....oracle</title><content type='html'>&lt;p&gt;In a thread on OTN forums, a poster asked how he could recover a user's password. Naturally he was told that it can't be done because the password itself is not stored, only a hash based on the username and password combination.&lt;/p&gt;&lt;p&gt;After some interesting discussion of password hashing, brute force and rainbow table attacks and the like, a poster makes the following rather novel suggestion:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;if you apply the password verify function, yes it is possible to get the password of a user.&lt;/p&gt;  &lt;p&gt;Etape 1: edit the utlpwdmg.sql script and add the line which is in bold (insert into...)&lt;/p&gt;  &lt;p&gt;-- Check if the password is same as the username&lt;/p&gt; &lt;p&gt;&lt;tt&gt;IF NLS_LOWER(password) = NLS_LOWER(username) THEN&lt;br /&gt;   raise_application_error(-20001, 'Password same as or similar to user');&lt;br /&gt;END IF;&lt;/tt&gt;&lt;/p&gt;  &lt;p&gt;&lt;tt&gt;&lt;b&gt;insert into mytable values ('username','password');&lt;/b&gt;&lt;/tt&gt;&lt;/p&gt;  -- Check for the minimum length of the password  &lt;p&gt;Etape 2: run this script as sys&lt;/p&gt;  &lt;p&gt;Etape 3: grant the profile to user whom u want to get the password.&lt;/p&gt;  &lt;p&gt;u will be able to get the new password by consulting the table mytable (u must create this table)&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;This had me puzzled at first, and I had to check what $ORACLE_HOME/rdbms/admin/utlpwdmg.sql did. In fact it creates a default password verification function called "verify_function" ("verify_password" might have made a better name, but that's obfuscation for you), and then assigns it to the default profile using &lt;tt&gt;ALTER PROFILE DEFAULT ... PASSWORD_VERIFY_FUNCTION verify_function;&lt;/tt&gt; &lt;/p&gt;&lt;p&gt;This means that any attempt to change the password for a user with the default profile (see ALTER USER examples in the documentation), will automatically execute &lt;tt&gt;verify_function(username, password, old_password)&lt;/tt&gt;. The idea is to apply some rules to prevent easily guessed passwords such as your username, but Mouhamadou's ingenious addition is his extra line,&lt;/p&gt;&lt;pre&gt;insert into mytable values (username,password);&lt;/pre&gt;&lt;p&gt;Now any attempt to change the password for a user with the default profile that successfully passes this extra security step &lt;i&gt;&lt;b&gt;will result in the new password being logged in &lt;tt&gt;mytable&lt;/tt&gt; in clear text.&lt;/b&gt;&lt;/i&gt;&lt;/p&gt; &lt;p&gt;As we like to say on Oracle WTF, problem solved.&lt;/p&gt; &lt;p&gt;Many thanks to Andrew P. Clarke for submitting this.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-382285104901284029?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/382285104901284029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=382285104901284029' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/382285104901284029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/382285104901284029'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/umm-i-forgot-my-password-part-2-oracle.html' title='Umm, I forgot my password, Part 2  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2376260714232172160</id><published>2008-08-06T22:23:00.001-07:00</published><updated>2008-08-06T22:24:11.047-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Simplest row generator meets maximum inefficiency  ....oracle</title><content type='html'>&lt;p&gt; Generating a set of values that are not stored in a table is a reasonably common problem. I recently came across this solution for a set of irregular interval values. &lt;/p&gt;&lt;pre&gt; OPEN cur_rows FOR&lt;br /&gt; 'SELECT 3  FROM dual UNION '||&lt;br /&gt; 'SELECT 6  FROM dual UNION '||&lt;br /&gt; 'SELECT 9  FROM dual UNION '||&lt;br /&gt; 'SELECT 12  FROM dual UNION '||&lt;br /&gt; 'SELECT 24  FROM dual UNION '||&lt;br /&gt; 'SELECT 36  FROM dual';&lt;br /&gt;LOOP&lt;br /&gt;  FETCH cur_rows INTO v_num_value;&lt;br /&gt;  EXIT WHEN cur_rows%NOTFOUND;&lt;/pre&gt;I didn't know which to admire the most. The clever use of dynamic SQL or the sort distinct to get rid of any duplicate literals that may occur from accidentally typing the same line twice. I think the latter wins for being also relationally pure apparently.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2376260714232172160?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2376260714232172160/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2376260714232172160' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2376260714232172160'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2376260714232172160'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/simplest-row-generator-meets-maximum.html' title='Simplest row generator meets maximum inefficiency  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-147216080633356219</id><published>2008-08-06T22:22:00.000-07:00</published><updated>2008-08-06T22:23:02.600-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>If only there was a SUM function  ....oracle</title><content type='html'>&lt;p&gt;...then we wouldn't have to write code like this, which, as &lt;b&gt;Graham Oakes&lt;/b&gt; can confirm, takes ages:&lt;/p&gt; &lt;pre&gt;FOR r IN ( SELECT tid FROM t_brel WHERE bqid = iqid )&lt;br /&gt;LOOP&lt;br /&gt;   SELECT q.lamount, q.famount&lt;br /&gt;   INTO   v_lamount, v_famt&lt;br /&gt;   FROM   t_aq   atq&lt;br /&gt;        , t_q    q&lt;br /&gt;   WHERE  atq.tid = r.tid&lt;br /&gt;   AND    q.qid = atq.qid&lt;br /&gt;   AND    qtype = 10;&lt;br /&gt;&lt;br /&gt;   v_ltotal := v_ltotal + v_lamount;&lt;br /&gt;   v_ftotal := v_ftotal + v_famt;&lt;br /&gt;END LOOP;&lt;br /&gt;&lt;br /&gt;UPDATE t_q&lt;br /&gt;SET    lamount = v_ltotal&lt;br /&gt;    , famount = v_ftotal&lt;br /&gt;WHERE  qid = iqid; &lt;/pre&gt; &lt;p&gt;We can but dream.&lt;/p&gt; &lt;p&gt;While we're on the subject, we received this from a correspondent who wishes to remain anonymous:&lt;/p&gt; &lt;pre&gt;FOR r IN&lt;br /&gt;(&lt;br /&gt;   SELECT /*+ FIRST_ROWS */&lt;br /&gt;          *&lt;br /&gt;   FROM   pay_details&lt;br /&gt;   WHERE  acct_fk = p_accountpk&lt;br /&gt;)&lt;br /&gt;LOOP&lt;br /&gt;   DELETE pay_details&lt;br /&gt;   WHERE  primarykey = r.primarykey;&lt;br /&gt;&lt;br /&gt;   COMMIT;&lt;br /&gt;END LOOP;&lt;/pre&gt; &lt;p&gt;I particularly like the FIRST_ROWS hint. &lt;i&gt;"What, it's slow? Better make sure it uses that index..."&lt;/i&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-147216080633356219?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/147216080633356219/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=147216080633356219' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/147216080633356219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/147216080633356219'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/if-only-there-was-sum-function-oracle.html' title='If only there was a SUM function  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7438751596463931659</id><published>2008-08-06T22:21:00.000-07:00</published><updated>2008-08-06T22:22:09.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>The Decibel Method  ....oracle</title><content type='html'>&lt;p&gt;A poster on the hardcore comp.databases.oracle.server newsgroup had some tables in the production database that he felt were redundant, and asked, not unreasonably I felt, whether there was a way to tell from his Developer 6i application whether they were in fact in use:&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;hello&lt;/p&gt; &lt;p&gt;we are using oracle 9i production database and d2k 6i applications. is there any way by which i can find the tables/ columns that are not in used by applications. So that i can move them out from our production database.&lt;/p&gt; &lt;p&gt;can anyone throw some light how to do it.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;After the obligatory initial responses along the lines of &lt;i&gt;"it can't be done"&lt;/i&gt; and &lt;i&gt;"you are an idiot for even thinking about it"&lt;/i&gt; (you take your life in your hands when you post on cdos), one respondent begins,&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;For tables, the solution is called "auditing". You can audit desired objects.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Reasonable enough. Give it a year, then if nobody has used the tables, they are probably not so important. Then he continues:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;For columns, you should be using so called decibel method: if you suspect that column C1 in table TAB is not used, you can always execute the following commands:&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;pre&gt;update TAB set C1=NULL;&lt;br /&gt;commit;&lt;/pre&gt; &lt;p&gt;If the reaction to that is a loud scream, accompanied by swearwords and a genuine cornucopia of various expletives, you've made a mistake, the column was used. It's time for the "I'm sorry, I didn't know that this column was still being used" routine. You can rest assured that this swearing sucker is gonna be busy for a while.&lt;/p&gt; &lt;p&gt;If not, you can proceed and drop the column. The previous update has an added benefit of making "drop column" operation faster. It will also expose weak points in all those lousy applications that use "select *" and expect the table to populate all of their variables.&lt;/p&gt; &lt;p&gt;An alternative to the decibel method is fine-grain auditing, described in the books by D. Knox. It's much more tedious and requires much larger knowledge then the decibel method, which is also a lot of fun.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Problem solved I think.&lt;/p&gt; &lt;p&gt;Our thanks to Herod T for the plug.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7438751596463931659?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7438751596463931659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7438751596463931659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7438751596463931659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7438751596463931659'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/decibel-method-oracle.html' title='The Decibel Method  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1176704429637129614</id><published>2008-08-06T22:20:00.000-07:00</published><updated>2008-08-06T22:21:18.376-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>ORA-06553: PLS-906: Compilation is not possible  ....oracle</title><content type='html'>Or in this case posted on the OTN Forums, is it even desirable. It's nice to see there is the ability for the database to simply say, "I'm sorry but this code is too stupid to run".&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1176704429637129614?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1176704429637129614/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1176704429637129614' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1176704429637129614'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1176704429637129614'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/ora-06553-pls-906-compilation-is-not.html' title='ORA-06553: PLS-906: Compilation is not possible  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3972188942242326942</id><published>2008-08-06T22:19:00.000-07:00</published><updated>2008-08-06T22:20:23.983-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>The Clue Was In The Name  ....oracle</title><content type='html'>&lt;pre&gt;email from tester: &lt;/pre&gt; This bug is blocking test:  bg9876-a, I have elevated it to priority 1.  &lt;pre&gt;reply: &lt;/pre&gt; The bug you've raised says "please provide a version of write_transaction() stored procedure, that doesn't write anything to the database", can you explain where you're going with this? &lt;pre&gt;email from tester: &lt;/pre&gt; It is a question of practicality for us, we have used this method in every release, we need to test high throughput rates without a Performance Oracle server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3972188942242326942?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3972188942242326942/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3972188942242326942' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3972188942242326942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3972188942242326942'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/clue-was-in-name-oracle.html' title='The Clue Was In The Name  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-967943006827548674</id><published>2008-08-06T22:18:00.000-07:00</published><updated>2008-08-06T22:19:37.683-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>A Thneed's a Fine-Something-That-All-People-Need!  ....oracle</title><content type='html'>&lt;p&gt;Now maybe I'm misusing this whole forum with this posting, and if so I apologise profusely,  but...&lt;/p&gt;  &lt;p&gt;www.janus-software.com/fb_fyracle.html&lt;/p&gt;  &lt;p&gt;Are you worried about "under-licencing" too...?&lt;/p&gt;  &lt;p&gt;Not only does open source Firebird-Fyracle have a catchy name and almost match Oracle on the 6 well known "gold standard key database evaluation mapping criteria", but it is "just as idiosyncratic", AND you can run "Compiere v2.5.3c" ( almost )!&lt;/p&gt;  &lt;p&gt;Who could possibly argue with the rigorously documented "proof of the pudding" that this product is "faster than Oracle on the same hardware"&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-967943006827548674?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/967943006827548674/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=967943006827548674' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/967943006827548674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/967943006827548674'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/thneeds-fine-something-that-all-people.html' title='A Thneed&apos;s a Fine-Something-That-All-People-Need!  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5654254861503376792</id><published>2008-08-06T22:17:00.000-07:00</published><updated>2008-08-06T22:18:51.454-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>SP2-0552: Bind variable not declared  ....oracle</title><content type='html'>&lt;p&gt;Please help. Why does SQL*Plus keep giving me the error&lt;/p&gt;&lt;blockquote style="font-weight: bold;"&gt;SP2-0552: Bind variable "INTARRAY" not declared.&lt;/blockquote&gt;&lt;p&gt;Thanks in advance.&lt;/p&gt;&lt;pre&gt;DECLARE&lt;br /&gt;   BatchSize : constant := 50;&lt;br /&gt;&lt;br /&gt;   subtype IndexRanges is INTEGER range 1 .. BatchSize;&lt;br /&gt;   type IntArrays is array( IndexRanges) of INTEGER;&lt;br /&gt;   IntArray : IntArrays;&lt;br /&gt;&lt;br /&gt;   EXEC SQL DECLARE network_cursor CURSOR FOR&lt;br /&gt;       select pal.provider_id from hold_provider_address_link pal;&lt;br /&gt;&lt;br /&gt;   EXEC SQL OPEN network_cursor;&lt;br /&gt;&lt;br /&gt;-- establish a local block, with an exception to&lt;br /&gt;-- handle the "no data found" condition&lt;br /&gt;begin&lt;br /&gt;   EXEC SQL WHENEVER NOT FOUND raise NO_MORE_DATA;&lt;br /&gt;   FETCH_LOOP:&lt;br /&gt;   loop -- fetch the data, 20 rows at a time&lt;br /&gt;       EXEC SQL FETCH network_cursor&lt;br /&gt;       INTO :IntArray;&lt;br /&gt;&lt;br /&gt;       for I in 1..20 loop&lt;br /&gt;           -- process batches of 20 rows&lt;br /&gt;           ...&lt;br /&gt;       end loop;&lt;br /&gt;&lt;br /&gt;       commit;&lt;br /&gt;   end loop FETCH_LOOP;&lt;br /&gt;&lt;br /&gt;exception&lt;br /&gt;   -- the exception NO_MORE_DATA is raised when there is&lt;br /&gt;   -- no more data to FETCH&lt;br /&gt;   when NO_MORE_DATA =&gt;&lt;br /&gt;       PUT("No more data to fetch. N of rows fetched was ");&lt;br /&gt;       PUT(ORACLE.SQLROWS);&lt;br /&gt;       NEW_LINE;&lt;br /&gt;&lt;br /&gt;       -- turn off the error handling&lt;br /&gt;       EXEC SQL WHENEVER NOT FOUND CONTINUE;&lt;br /&gt;end;&lt;br /&gt;/&lt;/pre&gt;&lt;p&gt;I mentioned this in a comment the other day so apologies if you've seen it before, but I felt it really deserved its own post.&lt;/p&gt;&lt;p&gt;(Hint: SP errors are from SQL*Plus, and INTARRAY is  a bind variable from SQL*Plus's point of view because it begins with ":")&lt;/p&gt;&lt;p&gt;By the way I don't mean to laugh too much at the poor guy who posted this problem on a forum, as from his other posts he seems to have had a crappy application dumped on him without much support from anyone at his company. I did ask him what language it was written in but he hasn't replied. Suggestions, anyone? (My guess is Pro*Ada, which in my opinion we don't see enough of these days.)&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5654254861503376792?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5654254861503376792/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5654254861503376792' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5654254861503376792'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5654254861503376792'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/sp2-0552-bind-variable-not-declared.html' title='SP2-0552: Bind variable not declared  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2621075700687637175</id><published>2008-08-06T22:16:00.002-07:00</published><updated>2008-08-06T22:17:39.736-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Oracle World Goes Sensible shock  ....oracle</title><content type='html'>&lt;p&gt;You may be wondering WTF happened to all the WTFs, and so are we. It seems the Oracle world has been going through a rather depressing sensible season recently, in which nobody posts Pro*Ada code and wonders why it won't run at the SQL*Plus prompt, or suggests adding "&lt;tt&gt;AND 1=1&lt;/tt&gt;" to any query to make it go faster. Even Mr Feuerstein seems to have deserted us.&lt;/p&gt;&lt;p&gt;Perhaps Mike Ault's foray into international economics cheered some of us up. He proposed an ingenious regulatory system requiring (I think) US grain, medicine and other key exporters to adjust their prices in response to international oil market fluctuations, on the grounds that certain oil producers are not taking America seriously enough. Now that'll teach Johnny Foreigner a lesson. "It is time for America to get tough", he adds. Oh dear.&lt;/p&gt;&lt;p&gt;On a more conventional note, a Mr Sahil Malik complained at great length on cdos about how hard it was to install 9i Personal Edition on his PC. At one point he fumed:&lt;/p&gt;&lt;blockquote&gt;Larry Ellison IMHO has only one business idea - "Defeat bill gates and trap every programmer in matrix like pods powering oracle databases". WHAT THE HECK !! Time he matured up a bit.&lt;/blockquote&gt;&lt;p&gt;I agree. Larry Ellison, if you're listening, you need to mature up a bit and forget the whole Matrix pod idea. We all know that ends badly.&lt;/p&gt;&lt;p&gt;Over on the OTN SQL Developer Forum, we were intrigued when one frustrated poster asked:&lt;/p&gt;&lt;blockquote&gt;I cannot find clustered option for the indexes or PKs that I create in SQL Developer.&lt;br /&gt;&lt;br /&gt;Where is the CLUSTERED check box in user interface?&lt;/blockquote&gt;&lt;p&gt;Where indeed? Helpfully, Sharon from the SQL Developer team promised to get one added ASAP:&lt;/p&gt;&lt;blockquote&gt;I have added an enhancement request to get this added to the interface in a future release.&lt;/blockquote&gt;&lt;p&gt;We look forward to seeing what that does.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2621075700687637175?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2621075700687637175/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2621075700687637175' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2621075700687637175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2621075700687637175'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/oracle-world-goes-sensible-shock-oracle.html' title='Oracle World Goes Sensible shock  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3499647917835965213</id><published>2008-08-06T22:16:00.001-07:00</published><updated>2008-08-06T22:16:47.230-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Code generation nonpareil  ....oracle</title><content type='html'>&lt;p&gt;We've all engaged in code generation of one sort or another. For certain problems it's just the right, or perhaps the only tool. But then your content management vendor starts to throw this sort of thing at your database...&lt;/p&gt;  &lt;pre&gt;OPEN p_cursor FOR&lt;br /&gt;'SELECT content_id, content_status&lt;br /&gt;   FROM content&lt;br /&gt;  WHERE content_type_id = 319&lt;br /&gt;    AND content_id IN (&lt;br /&gt;     51055 , 45531 , 42208 , 42911 , 46494 , 52898 , 44262 , 44312 , 47474 , 42792 ,&lt;br /&gt;     45956 , 45109 , 53432 , 14936 , 29040 , 28779 , 53015 , 48366 , 53739 , 48565 ,&lt;br /&gt;     47188 , 46573 , 43038 , 53534 , 51999 , 49731 , 52847 , 43883 , 41522 , 50804 ,&lt;br /&gt;     49975 , 45729 , 53260 , 47658 , 41325 , 49454 , 41374 , 45328 , 51612 , 54347 ,&lt;br /&gt;     50092 , 48147 , 42416 , 42570 , 49533 , 41948 , 51740 , 52973 , 42648 , 44867 ,&lt;br /&gt;     48289 , 45943 , 49556 , 54550 , 46801 , 43628 , 40569 , 41576 , 46752 , 44982 ,&lt;br /&gt;     42309 , 45146 , 47198 , 44993 , 47768 , 47060 , 46889 , 45651 , 47045 , 45830 ,&lt;br /&gt;     41248 , 54370 , 43741 , 44183 , 28451 , 45094 , 54332 , 47030 , 42060 , 41293 ,&lt;br /&gt;     48287 , 48012 , 47740 , 45688 , 43639 , 48484 , 47583 , 45304 , 51478 , 42633 ,&lt;br /&gt;     40558 , 43793 , 41587 , 49407 , 28803 , 43272 , 46464 , 45602 , 43866 , 44521 ,&lt;br /&gt;     41200 , 48044 , 46927 , 29186 , 45774 , 43722 , 45128 , 43398 , 47397 , 41670 ,&lt;br /&gt;     51888 , 47534 , 29237 , 42486 , 53811 , 44704 , 46618 , 48994 , 44848 , 44573 ,&lt;br /&gt;     52956 , 44487 , 42435 , 48164 , 43451 , 52031 , 51300 , 52595 , 53141 , 44032 ,&lt;br /&gt;     50904 , 41477 , 42161 , 44622 , 52695 , 43838 , 44562 , 45373 , 44882 , 47247 ,&lt;br /&gt;     42367 , 50921 , 46265 , 41933 , 48960 , 43143 , 43345 , 28412 , 48868 , 49005 ,&lt;br /&gt;     43533 , 46953 , 52420 , 44017 , 49817 , 41490 , 41395 , 43027 , 47703 , 29064 ,&lt;br /&gt;     41689 , 50564 , 44112 , 28957 , 29544 , 45223 , 43252 , 49699 , 47356 , 43565 ,&lt;br /&gt;     53604 , 45478 , 29422 , 53041 , 45697 , 44054 , 42469 , 44035 , 48750 , 46667 ,&lt;br /&gt;     50060 , 46698 , 48306 , 45849 , 45563 , 42452 , 45143 , 46110 , 47800 , 43076 ,&lt;br /&gt;     41280 , 45862 , 41657 , 42114 , 47523 , 51841 , 45988 , 48023 , 47307 , 43203 ,&lt;br /&gt;     53464 , 44202 , 47984 , 46218 , 45255 , 51412 , 52409 , 47442 , 45932 , 28269 ,&lt;br /&gt;     43823 , 46835 , 47785 , 50968 , 46050 , 41916 , 47219 , 51772 , 41980 , 43377 ,&lt;br /&gt;     43681 , 50007 , 43072 , 47150 , 45900 , 53376 , 54338 , 45360 , 49086 , 46520 ,&lt;br /&gt;     47626 , 29529 , 50321 , 51982 , 53660 , 51644 , 42028 , 41901 , 53269 , 47995 ,&lt;br /&gt;     43754 , 49163 , 46069 , 51213 , 53566 , 52304 , 49588 , 51134 , 45167 , 46447 ,&lt;br /&gt;     42108 , 45570 , 29439 , 46091 , 44160 , 52227 , 47324 , 42256 , 51262 , 28854 ,&lt;br /&gt;     43220 , 41363 , 45272 , 42097 , 46790 , 51102 , 50338 , 44149 , 49849 , 49375 ,&lt;br /&gt;     41814 , 44738 , 54211 , 52712 , 54364 , 50283 , 54442 , 46863 , 48687 , 45178 ,&lt;br /&gt;     28464 , 44084 , 47615 , 44504 , 50895 , 46231 , 45723 , 47753 , 47230 , 29600 ,&lt;br /&gt;     43430 , 28764 , 41619 , 44217 , 43649 , 47502 , 41509 , 47425 , 42873 , 51814 ,&lt;br /&gt;     41438 , 44925 , 15364 , 41539 , 50336 , 42777 , 42127 , 44967 , 46942 , 43578 ,&lt;br /&gt;     46644 , 48887 , 52748 , 46904 , 42290 , 44000 , 45446 , 45967 , 46539 , 44361 ,&lt;br /&gt;     52990 , 45341 , 42326 , 47952 , 49746 , 29512 , 45806 , 50252 , 48121 , 46981 ,&lt;br /&gt;     29162 , 41702 , 48700 , 50692 , 49039 , 44689 , 51181 , 42988 , 41737 , 41782 ,&lt;br /&gt;     54283 , 44796 , 42667 , 48793 , 42597 , 49195 , 46018 , 48070 , 42975 , 49264 ,&lt;br /&gt;     43675 , 29478 , 51000 , 43287 , 49052 , 51589 , 42506 , 44301 , 44649 , 44908 ,&lt;br /&gt;     48072 , 50857 , 46020 , 44067 , 42013 , 42091 , 43464 , 48578 , 54015 , 41412 ,&lt;br /&gt;     51361 , 52509 , 47124 , 51316 , 44143 , 29724 , 52714 , 44638 , 46142 , 41459 ,&lt;br /&gt;     42586 , 43919 , 48945 , 44346 , 49390 , 44822 , 46631 , 43107 , 43591 , 42144 ,&lt;br /&gt;     29755 , 43662 , 47540 , 43808 , 45390 , 42223 , 42371 , 42551 , 47918 , 47337 ,&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;For brevity's sake I'll skip the next 11,000 elements of the IN list.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3499647917835965213?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3499647917835965213/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3499647917835965213' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3499647917835965213'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3499647917835965213'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/code-generation-nonpareil-oracle.html' title='Code generation nonpareil  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2272891993924518050</id><published>2008-08-06T22:15:00.001-07:00</published><updated>2008-08-06T22:15:58.287-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>If in doubt, test, test and test again  ....oracle</title><content type='html'>&lt;p&gt;Thanks to Rob Baillie for the following example...&lt;/p&gt;  &lt;hr /&gt;  &lt;p&gt;I was glancing through some legacy code today, and came across this.&lt;/p&gt;  &lt;p&gt;It's funny how barnacles can accumulate when code changes over time.&lt;/p&gt; &lt;pre&gt;            if r2.status_id = 3 then&lt;br /&gt;                v_gp := r2.rate;&lt;br /&gt;           elsif r2.status_id in (11, 12) then&lt;br /&gt;               if r2.type_id = 3 then&lt;br /&gt;                   v_gp := r2.rate;&lt;br /&gt;               else&lt;br /&gt;                   v_gp := r2.rate;&lt;br /&gt;               end if;&lt;br /&gt;           else&lt;br /&gt;               v_gp := r2.rate;&lt;br /&gt;           end if;&lt;/pre&gt;  &lt;p&gt;Skip over the record being called r2 and work out what it actually does...&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2272891993924518050?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2272891993924518050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2272891993924518050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2272891993924518050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2272891993924518050'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/if-in-doubt-test-test-and-test-again.html' title='If in doubt, test, test and test again  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4602628437373144187</id><published>2008-08-06T22:14:00.000-07:00</published><updated>2008-08-06T22:15:14.947-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Dynstatic SQL...  ....oracle</title><content type='html'>&lt;p&gt;Here's Connor again...&lt;/p&gt;  &lt;p&gt;Note that the following code has been "anonymised" to protect the guilty.&lt;/p&gt;  &lt;hr /&gt;  &lt;pre&gt;procedure P is&lt;br /&gt;begin&lt;br /&gt;  ...&lt;br /&gt;  ...&lt;br /&gt;  execute immediate 'drop  table T';&lt;br /&gt;  execute immediate 'create table T as select * from ......';&lt;br /&gt;  ...&lt;br /&gt;  ...&lt;br /&gt;  ...&lt;br /&gt;  for i in ( select * from T ) loop&lt;br /&gt;       ...&lt;br /&gt;       ...&lt;br /&gt;  end loop;&lt;br /&gt;end;&lt;br /&gt;&lt;/pre&gt;  &lt;p&gt;Ah, a mix of dynamic and static references... Now how precisely did that compile? Nope, I'm not sure either.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4602628437373144187?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4602628437373144187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4602628437373144187' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4602628437373144187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4602628437373144187'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/dynstatic-sql-oracle.html' title='Dynstatic SQL...  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5774280116050272835</id><published>2008-08-06T22:13:00.000-07:00</published><updated>2008-08-06T22:14:23.075-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Why Machines Will Never Take Over The World  ....oracle</title><content type='html'>&lt;p&gt;It is a recurring theme in science fiction that as computers increase in power and sophistication, they may one day reach a point where they decide they can do better without us, and condemn us to lives suspended in racked pods with our brains plugged into a vast virtual world, or alternatively send increasingly resourceful and indestructable robots to hunt us down in our bunkers, while above ground survivors fight a desperate war for survival amidst the wreckage of civilisation.&lt;/p&gt;&lt;p&gt;If you find this vision of the future alarming, take heart in this SQL query, which was generated by a machine. Not, perhaps, a Cyberdyne Systems T-800 or the Matrix Mainframe, but something called OLAP API. We don't know what that is either, but we can tell you that if any robot descended from it ever attempts to enslave humanity using a virtual world and an unfeasible pod system, rest assured that you will have time to get out of its way.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5774280116050272835?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5774280116050272835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5774280116050272835' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5774280116050272835'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5774280116050272835'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/why-machines-will-never-take-over-world.html' title='Why Machines Will Never Take Over The World  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3293732624686430100</id><published>2008-08-06T22:12:00.002-07:00</published><updated>2008-08-06T22:13:37.164-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>That Reminds Me...   ....oracle</title><content type='html'>&lt;p&gt;Sometimes the solutions people come up with to a given problem are breathtaking in their combination of ingenuity and insanity. Take this view, which exists purely to transform a boring "reminder number" like 3, 4, 5, ... into the English text "Third Reminder", "Fourth Reminder", "Fifth Reminder", ...&lt;/p&gt;  &lt;pre&gt;CREATE OR REPLACE VIEW reminders_view AS&lt;br /&gt;SELECT reminder_id&lt;br /&gt;, reminder_seq&lt;br /&gt;, ( SELECT&lt;br /&gt;     DECODE (reminder_seq,&lt;br /&gt;      1, 'No reminder',&lt;br /&gt;      2, 'Reminded',&lt;br /&gt;      3, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;      4, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;      5, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   6, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   7, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   8, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   9, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   10, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   11, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   12, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   13, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   14, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   15, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   16, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   17, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   18, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   19, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   20, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   21, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   22, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   23, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   24, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   25, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   26, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   27, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   28, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   29, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;   30, INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder',&lt;br /&gt;      'Reminded') FROM DUAL) reminder_type&lt;br /&gt;FROM reminders;&lt;/pre&gt;  &lt;p&gt;What a beauty!  It works as follows:&lt;/p&gt; &lt;p&gt;1) Use a DECODE to determine what the number is. Note that 2 is treated as a special case, even though it ends up the same as all the "other" numbers above 30.&lt;/p&gt; &lt;p&gt;2) For numbers between 3 and 30:&lt;/p&gt; &lt;p&gt;2.1) Convert to a string&lt;/p&gt; &lt;p&gt;2.2) Concatenate with '-MAY-2004'&lt;/p&gt; &lt;p&gt;2.3) Convert to a date&lt;/p&gt; &lt;p&gt;2.4) Convert back to a string using the 'ddspth' format mask&lt;/p&gt; &lt;p&gt;2.5) Convert to Init Caps&lt;/p&gt; &lt;p&gt;2.6) Append the word ' Reminder'&lt;/p&gt; &lt;p&gt;3) Enclose the whole lot in a redundant "(SELECT ... FROM DUAL)" scalar subquery.&lt;/p&gt;  &lt;p&gt;Obviously, this saved the developer from the tiresome task of typing 'Third', 'Fourth', 'Fifth' etc. And presumably he/she isn't aware of the CASE expression that could have reduced it to:&lt;/p&gt;  &lt;pre&gt;CREATE OR REPLACE VIEW reminders_view AS&lt;br /&gt;SELECT reminder_id&lt;br /&gt;, reminder_seq&lt;br /&gt;, CASE WHEN reminder_seq = 1&lt;br /&gt;          THEN 'No reminder'&lt;br /&gt;      WHEN reminder_seq BETWEEN 3 AND 30&lt;br /&gt;          THEN INITCAP(TO_CHAR(TO_DATE(TO_CHAR(reminder_seq)||'-MAY-2004','DD-MON-YYYY'),'ddspth'))||' Reminder'&lt;br /&gt;      ELSE 'Reminded'&lt;br /&gt;      END reminder_type&lt;br /&gt;FROM reminders;&lt;/pre&gt;  &lt;p&gt;(And why stop at 30 when May has 31 days?!)&lt;/p&gt;  &lt;p&gt;Well, it gave me a much needed laugh on a Friday afternoon, anyway.&lt;/p&gt;  &lt;p&gt;All names have been changed to protect the guilty.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3293732624686430100?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3293732624686430100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3293732624686430100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3293732624686430100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3293732624686430100'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/that-reminds-me-oracle.html' title='That Reminds Me...   ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7328755972962805456</id><published>2008-08-06T22:12:00.001-07:00</published><updated>2008-08-06T22:12:52.495-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Pause for thought  ....oracle</title><content type='html'>&lt;p&gt;Requirement:&lt;/p&gt; &lt;blockquote&gt;Can I let a procedure wait for a specific time (10 seconds) before inserting values into a table?&lt;/blockquote&gt; &lt;p&gt;One solution (according to a poster on OTN - don't try this at home):&lt;/p&gt; &lt;pre&gt;declare&lt;br /&gt; dStart DATE := SYSDATE;&lt;br /&gt; nDiff  NUMBER;&lt;br /&gt;begin&lt;br /&gt; dbms_output.put_line('dStart: '||TO_CHAR(dStart, 'dd.mm.yyyy hh24:mi:ss'));&lt;br /&gt; LOOP&lt;br /&gt;   nDiff := (SYSDATE - dStart)*86400;&lt;br /&gt;   EXIT WHEN nDiff &gt;= 10;&lt;br /&gt; END LOOP;&lt;br /&gt; dbms_output.put_line('nDiff: '||nDiff);&lt;br /&gt; dbms_output.put_line('END: '||TO_CHAR(SYSDATE, 'dd.mm.yyyy hh24:mi:ss'));&lt;br /&gt;end;&lt;br /&gt;/&lt;/pre&gt; &lt;p&gt;Or if you prefer,&lt;/p&gt; &lt;pre&gt;create or replace function timeout&lt;br /&gt;   return number&lt;br /&gt;is&lt;br /&gt;begin&lt;br /&gt;   return to_number(to_char(sysdate,'SSSSS'));&lt;br /&gt;end timeout;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Function created.&lt;br /&gt;&lt;br /&gt;create or replace procedure tcal( t in number ) as&lt;br /&gt;   a  number:=1;&lt;br /&gt;   st number:=to_number(to_char(sysdate,'SSSSS'));&lt;br /&gt;   x varchar2(12);&lt;br /&gt;   y varchar2(12);&lt;br /&gt;begin&lt;br /&gt;   while(a&lt;99999999) loop&lt;br /&gt;       dbms_output.enable(100000); ---&gt; Just to make loop busy...&lt;br /&gt;       a := a + 1;&lt;br /&gt;       exit when (timeout - st)&gt;=t;&lt;br /&gt;   end loop;&lt;br /&gt;&lt;br /&gt;   x:=to_char(trunc(sysdate)+st/(24*60*60),'HH:MI:SS AM');&lt;br /&gt;&lt;br /&gt;   dbms_output.put_line('       Started: '||x);&lt;br /&gt;&lt;br /&gt;   y:=to_char(trunc(sysdate)+timeout/(24*60*60),'HH:MI:SS AM');&lt;br /&gt;&lt;br /&gt;   dbms_output.put_line('       Ended:   '||y);&lt;br /&gt;   dbms_output.put_line(timeout-st||' seconds reached...');&lt;br /&gt;end ;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Procedure created.&lt;/pre&gt; &lt;p&gt;Now that is all well and good, you may say, after all the cpu isn't doing anything else at the moment and these days they rarely catch fire, but couldn't we just use the supplied procedure DBMS_LOCK.SLEEP? Well apparently it is impractical. Those with a quiet afternoon to spare might like to follow the reasons why, at forums.oracle.com/forums/thread.jspa?threadID=402345.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7328755972962805456?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7328755972962805456/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7328755972962805456' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7328755972962805456'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7328755972962805456'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/pause-for-thought-oracle.html' title='Pause for thought  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2383359393624045132</id><published>2008-08-06T22:10:00.002-07:00</published><updated>2008-08-06T22:12:05.512-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>The fine line between clever and stupid  ....oracle</title><content type='html'>&lt;p&gt;Stojka Mongo began to be concerrned when he came across table AT_ILOAD_DAYS that looked like this:&lt;/p&gt; &lt;pre&gt;CREATE TABLE at_iload_days&lt;br /&gt;( daystring      VARCHAR2(8)&lt;br /&gt;, batch_created  VARCHAR2(1)  DEFAULT 'N' );&lt;/pre&gt;&lt;p&gt;where "daystring" contained values like "20030901".&lt;/p&gt;  &lt;p style="margin-top: 24px;"&gt;Then he found this convenient procedure to "fill" it:&lt;/p&gt;&lt;pre&gt;CREATE OR REPLACE PROCEDURE pr_generate_iload_days&lt;br /&gt;AS&lt;br /&gt;   -- Procedure to fill days from most recent entry in at_iload_days up to current sysdate */&lt;br /&gt;   d_date_string    VARCHAR2(8) DEFAULT NULL;&lt;br /&gt;   d_maxdate_string VARCHAR2(8) DEFAULT NULL;&lt;br /&gt;BEGIN&lt;br /&gt;   -- sysdate will be max date to generate:&lt;br /&gt;   d_maxdate_string := TO_CHAR(SYSDATE, 'yyyymmdd');&lt;br /&gt;&lt;br /&gt;   -- Fetch most recent datestring from at_iload_days + 1 day into d_date_string&lt;br /&gt;   -- (default to commercial launch date)&lt;br /&gt;   EXECUTE IMMEDIATE&lt;br /&gt;   'select to_char((to_date(nvl(max(daystring),''20030505''),''yyyymmdd'')+1),''yyyymmdd'') from at_iload_days'&lt;br /&gt;   INTO d_date_string;&lt;br /&gt;&lt;br /&gt;   -- We shouldn't load data that will exist in the future, should we?&lt;br /&gt;   IF d_date_string &lt;= d_maxdate_string THEN&lt;br /&gt;       EXECUTE IMMEDIATE&lt;br /&gt;       'insert into at_iload_days (daystring,batch_created) values (' ||&lt;br /&gt;       '''' ||d_date_string || '''' || ',''N'')';&lt;br /&gt;&lt;br /&gt;       EXECUTE IMMEDIATE 'COMMIT';&lt;br /&gt;   END IF;&lt;br /&gt;END pr_generate_iload_days;&lt;/pre&gt; &lt;p style="margin-top: 24px;"&gt;Our favourite line:&lt;/p&gt;&lt;pre&gt;EXECUTE IMMEDIATE 'COMMIT';&lt;/pre&gt; &lt;p style="margin-top: 24px;"&gt;It's hard to tell but I think that procedure can be rewritten as:&lt;/p&gt;&lt;pre&gt;CREATE OR REPLACE PROCEDURE pr_generate_iload_days&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;   INSERT INTO at_iload_days (daystring)&lt;br /&gt;   SELECT TO_CHAR&lt;br /&gt;          ( TO_DATE(NVL(MAX(daystring),'20030505'),'yyyymmdd')+1&lt;br /&gt;          , 'yyyymmdd' )&lt;br /&gt;   FROM   at_iload_days&lt;br /&gt;   HAVING NVL(MAX(daystring),'20030505') &lt;= TO_CHAR(SYSDATE, 'yyyymmdd')&lt;br /&gt;END pr_generate_iload_days;&lt;/pre&gt; &lt;p style="margin-top: 24px;"&gt;although if DAYSTRING had actually been a date, it would have just been:&lt;/p&gt; &lt;pre&gt;CREATE OR REPLACE PROCEDURE pr_generate_iload_days&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;   INSERT INTO at_iload_days(day)&lt;br /&gt;   SELECT NVL(MAX(day), DATE '2003-05-05') +1&lt;br /&gt;   FROM   at_iload_days&lt;br /&gt;   HAVING NVL(MAX(day), DATE '2003-05-05') &lt;= SYSDATE;&lt;br /&gt;END pr_generate_iload_days;&lt;/pre&gt; &lt;p style="margin-top: 24px;"&gt;Thanks 3360 for the title for this post.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2383359393624045132?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2383359393624045132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2383359393624045132' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2383359393624045132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2383359393624045132'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/fine-line-between-clever-and-stupid.html' title='The fine line between clever and stupid  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5586818099666027709</id><published>2008-08-06T22:10:00.001-07:00</published><updated>2008-08-06T22:10:56.355-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Show Me The Money  ....oracle</title><content type='html'>&lt;p&gt;Money, money, money. It's a rich man's world. It can't buy you love, but as we are constantly reminded it can buy you cheap Levitra and pre-approved loans, and those are just as good and will probably boost this site's stats. It makes the world go round. It's great - but how to format it?&lt;/p&gt;  &lt;p&gt;Well, here is one way. The editing history tells the whole story.&lt;/p&gt;&lt;br /&gt; &lt;pre&gt;/*=============================================================================&lt;br /&gt;Procedure:    FN_FORMAT_DOLLARS&lt;br /&gt;Description:  Formats a number as dollars (2 decimals)&lt;br /&gt;&lt;br /&gt;MODIFICATION HISTORY:&lt;br /&gt;Person        Date        Comments&lt;br /&gt;---------     ------      -------------------------------------------&lt;br /&gt;XX            01/24/03    Created&lt;br /&gt;SF            08/05/03    Rewrote the function as a TO_CHAR statement&lt;br /&gt;==============================================================================*/&lt;br /&gt;&lt;br /&gt;FUNCTION fn_format_dollars (p_dollars IN NUMBER)&lt;br /&gt;   RETURN VARCHAR2&lt;br /&gt;IS&lt;br /&gt;   &lt;i&gt;-- v_dollars   VARCHAR2 (50);&lt;/i&gt;&lt;br /&gt;BEGIN&lt;br /&gt;&lt;br /&gt;   &lt;i&gt;/*&lt;br /&gt;   v_dollars := TO_CHAR (p_dollars);&lt;br /&gt;   IF INSTR (v_dollars, '.') = 0&lt;br /&gt;   THEN&lt;br /&gt;       v_dollars :=  v_dollars  || '.';&lt;br /&gt;   END IF;&lt;br /&gt;&lt;br /&gt;   -- too many decimal places...&lt;br /&gt;   WHILE   LENGTH (v_dollars) - INSTR (v_dollars, '.') &gt; 2&lt;br /&gt;   LOOP&lt;br /&gt;       v_dollars := SUBSTR (v_dollars, 1, LENGTH (v_dollars) - 1);&lt;br /&gt;   END LOOP;&lt;br /&gt;&lt;br /&gt;   -- not enough decimal places...&lt;br /&gt;   WHILE   LENGTH (v_dollars) - INSTR (v_dollars, '.') &lt; 2&lt;br /&gt;   LOOP&lt;br /&gt;       v_dollars := v_dollars || '0';&lt;br /&gt;    END LOOP;&lt;br /&gt;   */&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;   RETURN TO_CHAR(p_dollars, 'FM999999999990.00');&lt;br /&gt;&lt;br /&gt;END fn_format_dollars;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Many thanks to rd for sending this in.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5586818099666027709?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5586818099666027709/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5586818099666027709' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5586818099666027709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5586818099666027709'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/show-me-money-oracle.html' title='Show Me The Money  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6431303559567654403</id><published>2008-08-06T22:09:00.001-07:00</published><updated>2008-08-06T22:09:54.463-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Competition  ....oracle</title><content type='html'>&lt;p&gt;Well, not really a competition because we haven't got any prizes to give away, but the code below (thanks Padders) has a real &lt;i&gt;"How Many WTFs Can You Spot?"&lt;/i&gt; feel about it. I make it four.&lt;/p&gt; &lt;pre&gt;PROCEDURE log_error&lt;br /&gt;   ( p_source  IN  VARCHAR2&lt;br /&gt;   , p_result  IN  VARCHAR2)&lt;br /&gt;IS&lt;br /&gt;   PRAGMA AUTONOMOUS_TRANSACTION;&lt;br /&gt;   p_primarykey errorlogging.primarykey%TYPE;&lt;br /&gt;BEGIN&lt;br /&gt;   SELECT errorlogging_seq.NEXTVAL&lt;br /&gt;   INTO   p_primarykey&lt;br /&gt;   FROM   dual;&lt;br /&gt;&lt;br /&gt;   INSERT /*+ APPEND */ INTO errorlogging NOLOGGING&lt;br /&gt;   ( primarykey&lt;br /&gt;   , source&lt;br /&gt;   , result&lt;br /&gt;   , timestamp&lt;br /&gt;   , wherewasi&lt;br /&gt;   , processed_count&lt;br /&gt;   , process_id )&lt;br /&gt;   VALUES&lt;br /&gt;   ( p_primarykey&lt;br /&gt;   , p_source&lt;br /&gt;   , SUBSTR(p_result, 1, 1000)&lt;br /&gt;   , SYSDATE&lt;br /&gt;   , NULL&lt;br /&gt;   , NULL&lt;br /&gt;   , 1 );&lt;br /&gt;&lt;br /&gt;   COMMIT;&lt;br /&gt;EXCEPTION&lt;br /&gt;   WHEN OTHERS THEN NULL;&lt;br /&gt;END;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6431303559567654403?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6431303559567654403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6431303559567654403' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6431303559567654403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6431303559567654403'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/competition-oracle.html' title='Competition  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4321399350401413952</id><published>2008-08-06T22:08:00.000-07:00</published><updated>2008-08-06T22:09:01.479-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Production-ready code  ....oracle</title><content type='html'>I'm not sure that there's much more to add to this forums.oracle.com thread.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4321399350401413952?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4321399350401413952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4321399350401413952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4321399350401413952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4321399350401413952'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/production-ready-code-oracle.html' title='Production-ready code  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2921588844372192703</id><published>2008-08-06T22:07:00.001-07:00</published><updated>2008-08-06T22:07:59.803-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>A Year of WTFs  ....oracle</title><content type='html'>&lt;p&gt;Each year, the Oracle WTF organisation celebrates its anniversary by inviting a fellow Oracle professional to share an evening of fine Eastern European lager and disappointing bar snacks in a pub where you can't hear each other properly, and this year it was the turn of former newbie (but now of course senior expert) DBA Lisa Dobson.&lt;/p&gt;&lt;p&gt;Actually that's not quite true - I realised today it was just over a year ago that we started the blog, and the other evening some of us met up with Lisa who happened to be in town, and if I'd thought of this a bit earlier I could probably have pretended it was all planned. Anyway it was nice meeting Lisa, and we enjoyed the story about the colleague who accidentally deleted &lt;i&gt;the entire production server&lt;/i&gt;, as luck would have it a week after the server room air conditioning took out the only other server by dripping a surprisingly large amount of water into it. That rather outdid my story about the day we turned up for work at a client's site and found nobody could log in, because as it happened someone had stolen the servers during the night. Or the other one, if I'd remembered to tell it, about the high street retail chain whose backup system involved a PC and a timer plug. (I shouldn't laugh - it actually worked quite well.) It was also reassuring to hear we are not the only ones who don't understand a single bloody word of those "Oracle" blogs about installing a Java framework in JDeveloper to implement service-oriented BPEL with a right-click and some XML. Umm, neat.&lt;/p&gt;&lt;p&gt;It seems we're also not the only ones to have been shocked and saddened by Doug Burns' recent senseless killing spree. This monster must be stopped. (...is probably what Doug said as he reached for his copy of "Expert One-On-One Oracle").&lt;/p&gt; &lt;p&gt;Anyway, one year, 63 posts, and some lessons learned:&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Post one of Tom Kyte's pet hates like &lt;tt&gt;WHEN OTHERS THEN NULL&lt;/tt&gt; (or &lt;tt&gt;WHEN OTHERS THEN DBMS_OUTPUT&lt;/tt&gt;, which isn't much better quite frankly) for a mention on his blog and a surefire thousand hits. We need one about IM Speak now b/c im sure u will C loadsa hits ;-)&lt;/li&gt;&lt;li&gt;Post something involving security for a mention on Pete Finnigan's site. We also get a steady stream of visitors googling for &lt;i&gt;"forgot system password +oracle"&lt;/i&gt;, &lt;i&gt;"how to get password of a user in oracle"&lt;/i&gt; and so on, and being directed to Umm, I Forgot My Password, part 2. (In future just put it on a Post-It under your keyboard like everyone else.)&lt;/li&gt;&lt;li&gt;Titles involving common Oracle error codes seem to do well. A lot of visitors come here from  a Google search for SP2-0552 (guys, you have a variable with a colon in front of it somewhere). We need some posts about ORA-0600 or TNSNAMES.&lt;/li&gt;&lt;li&gt;A lot of people seem to be searching for an explanation of joins and end up at our Joins Explained, heaven help them, where a Mr Sanders Kaufman explains things like &lt;i&gt;"Left Joins are joined on the left columns of two tables. Right Joins are joined on the right columns of two tables."&lt;/i&gt; I'm glad we got that cleared up.&lt;/li&gt;&lt;li&gt;Google Analytics Rock. So (while we're at it) do Statcounter, Feedburner and CoComment. &lt;/li&gt;&lt;/ol&gt; &lt;p&gt;We were recently offered some sponsorship by price comparison website Shopzilla (or rather, they emailed me a week ago and I remembered it in the pub). The consensus among those present was that we should not accept it, although personally I think all that would change if we could get The Daily WTF's Beanbag Girl.&lt;/p&gt; &lt;p&gt;We were also kindly offered a spot on Pythian Group's Logfile Of The Vanities or whatever it's called (or rather, they emailed me a month ago and I seem to have deleted the message, sorry guys, meant to get back to you) but I didn't take them up on it, partly because there didn't seem much point in writing a piece telling people about Oracle blogs they already read (surely?) via blogs.oracle.com, and also because it's explicitly for DBAs, and with the possible exception of Padders we are all developers (even though these days "developer" is often assumed to mean someone who is into aspect-oriented JDeveloper BPEL plug-ins). Our main thing is SQL, PL/SQL and data modelling, and AFAIK none of those have much to do with the DBA role. In fact, thinking about it I'm not sure why they asked. And is that &lt;tt&gt;Pie-thian&lt;/tt&gt; as in Pythagoras and Python, or &lt;tt&gt;Pith-ian&lt;/tt&gt; as in Gryffindor and Slytherin, anyway?&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2921588844372192703?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2921588844372192703/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2921588844372192703' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2921588844372192703'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2921588844372192703'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/year-of-wtfs-oracle.html' title='A Year of WTFs  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5581455873806970683</id><published>2008-08-06T22:06:00.000-07:00</published><updated>2008-08-06T22:07:07.297-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Just, Why?  ....oracle</title><content type='html'>I'm currently debugging a procedure of the form illustrated below, lovingly recreated using the ubiquitous scott.emp table.  I'm also taking suggestions on what might've been going through the head of the person who wrote it.  &lt;pre&gt;RENAME emp TO emp_table&lt;br /&gt;/&lt;br /&gt;CREATE OR REPLACE VIEW emp&lt;br /&gt;AS&lt;br /&gt;  SELECT *&lt;br /&gt;    FROM emp_table&lt;br /&gt;/&lt;br /&gt;CREATE OR REPLACE TRIGGER mod_emp&lt;br /&gt;  INSTEAD OF UPDATE&lt;br /&gt;  ON emp&lt;br /&gt;  FOR EACH ROW&lt;br /&gt;DECLARE&lt;br /&gt;  new_emp                       emp_table%ROWTYPE;&lt;br /&gt;  old_emp                       emp_table%ROWTYPE;&lt;br /&gt;BEGIN&lt;br /&gt;  new_emp.empno       := :NEW.empno;&lt;br /&gt;  new_emp.ename       := :NEW.ename;&lt;br /&gt;  new_emp.job         := :NEW.job;&lt;br /&gt;  new_emp.mgr         := :NEW.mgr;&lt;br /&gt;  new_emp.hiredate    := :NEW.hiredate;&lt;br /&gt;  new_emp.sal         := :NEW.sal;&lt;br /&gt;  new_emp.comm        := :NEW.comm;&lt;br /&gt;  new_emp.deptno      := :NEW.deptno;&lt;br /&gt;  old_emp.empno       := :OLD.empno;&lt;br /&gt;  old_emp.ename       := :OLD.ename;&lt;br /&gt;  old_emp.job         := :OLD.job;&lt;br /&gt;  old_emp.mgr         := :OLD.mgr;&lt;br /&gt;  old_emp.hiredate    := :OLD.hiredate;&lt;br /&gt;  old_emp.sal         := :OLD.sal;&lt;br /&gt;  old_emp.comm        := :OLD.comm;&lt;br /&gt;  old_emp.deptno      := :OLD.deptno;&lt;br /&gt;  update_emp (old_emp, new_emp);&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE PROCEDURE update_emp (&lt;br /&gt;  old_emp                             emp_table%ROWTYPE&lt;br /&gt; ,new_emp                             emp_table%ROWTYPE&lt;br /&gt;)&lt;br /&gt;IS&lt;br /&gt;BEGIN&lt;br /&gt;  IF old_emp.empno != new_emp.empno&lt;br /&gt;  THEN&lt;br /&gt;     RETURN;   --can't update primary key attribute&lt;br /&gt;  END IF;&lt;br /&gt;&lt;br /&gt;  IF     old_emp.empno IS NOT NULL&lt;br /&gt;     AND new_emp.empno IS NULL&lt;br /&gt;  THEN&lt;br /&gt;     DELETE FROM emp_table&lt;br /&gt;           WHERE empno = old_emp.empno;&lt;br /&gt;&lt;br /&gt;     RETURN;&lt;br /&gt;  END IF;&lt;br /&gt;&lt;br /&gt;  IF    (    old_emp.ename IS NULL&lt;br /&gt;         AND new_emp.ename IS NOT NULL)&lt;br /&gt;     OR (    old_emp.ename IS NOT NULL&lt;br /&gt;         AND new_emp.ename != old_emp.ename)&lt;br /&gt;  THEN&lt;br /&gt;     UPDATE emp_table&lt;br /&gt;        SET ename = new_emp.ename&lt;br /&gt;      WHERE empno = old_emp.empno;&lt;br /&gt;  END IF;&lt;br /&gt;  -- ..&lt;br /&gt;  -- ..&lt;br /&gt;  -- ..&lt;br /&gt;  IF    (    old_emp.deptno IS NULL&lt;br /&gt;         AND new_emp.deptno IS NOT NULL)&lt;br /&gt;     OR (    old_emp.deptno IS NOT NULL&lt;br /&gt;         AND new_emp.deptno != old_emp.deptno)&lt;br /&gt;  THEN&lt;br /&gt;     UPDATE emp_table&lt;br /&gt;        SET deptno = new_emp.deptno&lt;br /&gt;      WHERE empno = old_emp.empno;&lt;br /&gt;  END IF;&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5581455873806970683?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5581455873806970683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5581455873806970683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5581455873806970683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5581455873806970683'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/just-why-oracle.html' title='Just, Why?  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5313932730296787007</id><published>2008-08-06T22:05:00.000-07:00</published><updated>2008-08-06T22:06:04.754-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Useful books  ....oracle</title><content type='html'>&lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-1.jpg" border="0" /&gt; &lt;p&gt;An enormous spider appears. It's clearly coming for you. Or not. What do you do?&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-2.jpg" border="0" /&gt; &lt;p&gt;Staying calm, place a glass or similar containment device over the creature.&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-3.jpg" alt="" border="0" /&gt; &lt;p&gt;Now gently slide a card under the glass, taking care not to trap any legs. There should be eight after you have completed this manoeuvre.&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-4.jpg" border="0" /&gt; &lt;p&gt;Transfer to a suitable platform such as a book, and carry to a window or other suitable release location.&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-5.jpg" border="0" /&gt; &lt;p&gt;No Oracle experts were harmed in the making of this blog.&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-6.jpg" border="0" /&gt; &lt;p&gt;Reintroduce the creature into the wild, where it can begin a new life free to roam among its own kind. Or just wander back in of course, but spiders are not known for their homing instinct. Or are they? To be honest we haven't checked. This one said something about "Scotland" and "revenge".&lt;/p&gt; &lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img style="" src="http://photos1.blogger.com/blogger/7758/1483/400/spider-safari-7.jpg" border="0" /&gt; &lt;p&gt;Finally, always sterilise your equipment.&lt;/p&gt;&lt;/div&gt;  &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;a href="http://oracledoug.com/serendipity/index.php?/archives/1074-Useful-Books.html" rel="nofollow"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/320/crimescene.jpg" border="0" /&gt;&lt;/a&gt; &lt;p&gt;Meanwhile in Edinburgh, police were called to a flat in the Stockbridge area following reports of a violent assault...&lt;/p&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5313932730296787007?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5313932730296787007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5313932730296787007' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5313932730296787007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5313932730296787007'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/useful-books-oracle.html' title='Useful books  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8816641834413278100</id><published>2008-08-06T22:04:00.000-07:00</published><updated>2008-08-06T22:05:08.789-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Death By Furniture  ....oracle</title><content type='html'>&lt;p&gt;According to www.identifiers.org, there are two classes of relational database: &lt;i&gt;"Code Class"&lt;/i&gt; and &lt;i&gt;"Identifier Class"&lt;/i&gt;.&lt;/p&gt;&lt;p&gt;We hadn't heard of those either, but it's all made clear in this presentation (pdf, 1.2MB), in which the limitations of the conventional approach and a novel approach to schema design are explained without the aid of Powerpoint, in a series of pictures like this one:&lt;/p&gt; &lt;div style="margin: 15pt 0pt; clear: left;"&gt;&lt;img src="http://photos1.blogger.com/blogger/7758/1483/1600/george-explains-airpii.jpg" /&gt;&lt;/div&gt; &lt;p&gt;Still confused? Never mind, you can follow the debate on this OTN thread, which George begins by asking for a simple clarification regarding the capabilities of the Oracle RDBMS. From the answers to this, he should be able to determine whether Oracle is old-hat &lt;i&gt;Code Class&lt;/i&gt; or funky new &lt;i&gt;Identifier Class&lt;/i&gt;:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;I have an interest in establishing how the Oracle System Catalogues cope with particular changes. I have never used Oracle, but I have carried out the same test on another RDBMS. If I had access to Oracle I would have carried out this test myself.&lt;/p&gt; &lt;p&gt;The test goes as follows.&lt;/p&gt; &lt;p&gt;Create a new database.&lt;/p&gt; &lt;p&gt;Create a new simple table, with just a few columns.&lt;/p&gt; &lt;p&gt;Create a form for the table, and add a few rows.&lt;/p&gt; &lt;p&gt;Rename the table or a column – if you can’t, then the RDBMS is Code Class.&lt;/p&gt; &lt;p&gt;If you can rename the table or a column, then do so, and invoke the form that you used before changing the table or column name. If it doesn’t work, the RDBMS is Code Class; if it does then the RDBMS is Identifier Class.&lt;/p&gt; &lt;p&gt;In an Identifier Class RDBMS changes of column or relation/table name will not interfere with the operation of any form already in place based on that table.&lt;/p&gt; &lt;p&gt;I'll be very grateful if anybody can give me a definitive answer on this, either through already having explored the issue or by running the test.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;It turns out that &lt;i&gt;"Code Class"&lt;/i&gt; covers all existing RDBMS products ever conceived, and &lt;i&gt;"Identifier Class"&lt;/i&gt; is an improved model invented by George himself, in which some theoretical 4GL development tool yet to be designed allows you to change table and column names without breaking existing code or having to define a view, and surrogate keys are, well, pretty much the same except that they are now called &lt;i&gt;attribute independent relative position independent identifiers&lt;/i&gt;. Perhaps one day Oracle will advance to this point, especially now that they've fixed DBMS_OUTPUT and must be wondering what to do next (perhaps after getting a product to work on Apple Mac and fixing the OTN "change password" facility). We can but dream. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8816641834413278100?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8816641834413278100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8816641834413278100' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8816641834413278100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8816641834413278100'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/death-by-furniture-oracle.html' title='Death By Furniture  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-878244425864249168</id><published>2008-08-06T22:03:00.000-07:00</published><updated>2008-08-06T22:04:21.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Pause For Thought part 2  ....oracle</title><content type='html'>&lt;p&gt;In an AskTom thread about native compilation, a poster mentions that he is seeing some big CPU waits on his system and wonders whether native compilation would help. After some discussion of tracing and profiling and his 32 Tuxedo connections, he reports back that from talking to the programmer (possibly this guy), he might have narrowed the problem down to a procedure called DELAY():&lt;/p&gt; &lt;blockquote&gt;I just happened to talk to the programmer and what i understand is that that  specific function when called so many times , it is internally calling a  procedure with passing a value n, where n is like 4,5,6 etv. That procedure is called delay and its job is to create a delay in the logic  flow. So the delay procedure accepsts values like 10 as seconds and then it &lt;pre&gt;FOR di IN 1..sed LOOP&lt;br /&gt;  NULL;&lt;br /&gt;END LOOP;&lt;/pre&gt; A random thought, could this when run so many times accumulate huge cpu?&lt;/blockquote&gt; &lt;p&gt;Tom thinks maybe it might.&lt;/p&gt; &lt;p&gt;Thanks Tom for sending this in.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-878244425864249168?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/878244425864249168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=878244425864249168' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/878244425864249168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/878244425864249168'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/pause-for-thought-part-2-oracle.html' title='Pause For Thought part 2  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5642715814525340274</id><published>2008-08-06T22:02:00.000-07:00</published><updated>2008-08-06T22:03:28.196-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Code Re-use  ....oracle</title><content type='html'>&lt;p&gt;This code was anonymised by the sender and some of the original logic may be a bit harder to make sense of as a result. Instead of EMP records, you should probably imagine it checking billion-dollar financial deals or nuclear reactor core temperature readings. Anyway, I think I've figured out what it's supposed to do.&lt;/p&gt;  &lt;p&gt;You pass in an EMP record containing &lt;i&gt;first name, last name, email address&lt;/i&gt; and so on, and it calls &lt;tt&gt;OTHER_PROC(email_address, the_emp_record_as_passed_in)&lt;/tt&gt; - &lt;i&gt;but only if&lt;/i&gt; the email address is not null, &lt;i&gt;and&lt;/i&gt; it is unique for employees with that name. For some reason. But how to check? Simple:&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;Use a cursor to load all the rows for that name into an array. (Apparently there were 130+ columns in the original table.)&lt;/li&gt;&lt;li&gt;Check array.COUNT to see how many rows there are.&lt;/li&gt;&lt;li&gt;If there is only one row, use it, taking care to use an NVL expression because we definitely don't want a NULL email address.&lt;/li&gt;&lt;li&gt;If there is more than one row, open the same cursor again, and this time loop through it comparing each row's email address with the previous one. If it's the same, set &lt;tt&gt;lv_email_same&lt;/tt&gt; = 1, otherwise set it to 0. That way, at the end of the loop we'll know whether they were all the same or not, right?&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;pre&gt;PROCEDURE unleash_havoc (p_emp_rec emp%rowtype)&lt;br /&gt;IS&lt;br /&gt;  lv_email_same  NUMBER(1) :=0; -- 0: no, 1: yes&lt;br /&gt;  lv_email_null  NUMBER(1) :=0; -- 0: no, 1: yes&lt;br /&gt;  lv_email       emp.email%TYPE := NULL;&lt;br /&gt;  ln_row         NUMBER;&lt;br /&gt;&lt;br /&gt;  TYPE emp_tab IS TABLE OF emp%ROWTYPE;&lt;br /&gt;  lt_emp_data  emp_tab;&lt;br /&gt;&lt;br /&gt;  CURSOR c_emp (p_last_name VARCHAR2, p_first_name VARCHAR2) IS&lt;br /&gt;     SELECT *&lt;br /&gt;     FROM   emp e&lt;br /&gt;     WHERE  e.last_name = p_last_name&lt;br /&gt;     AND    e.first_name = p_first_name;&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;  OPEN c_emp (p_emp_rec.last_name, p_emp_rec.first_name);&lt;br /&gt;  FETCH c_emp BULK COLLECT INTO lt_emp_data;&lt;br /&gt;  CLOSE c_emp;&lt;br /&gt;&lt;br /&gt;  IF lt_emp_data.COUNT = 1 THEN&lt;br /&gt;      ln_row := lt_emp_data.FIRST;&lt;br /&gt;      lv_email  := NVL(lt_emp_data(ln_row).email,NULL);&lt;br /&gt;      other_proc(lv_email,p_emp_rec);&lt;br /&gt;&lt;br /&gt;  ELSIF lt_emp_data.COUNT &gt; 1 THEN&lt;br /&gt;&lt;br /&gt;      FOR r IN c_emp (p_emp_rec.last_name, p_emp_rec.first_name) LOOP&lt;br /&gt;          IF NVL(r.email,'X') = NVL(lv_email,'X') THEN&lt;br /&gt;              lv_email := r.email;&lt;br /&gt;              lv_email_same := 1;&lt;br /&gt;          ELSE&lt;br /&gt;              lv_email := r.email;&lt;br /&gt;              lv_email_same := 0;&lt;br /&gt;          END IF;&lt;br /&gt;&lt;br /&gt;          IF r.email IS NULL THEN&lt;br /&gt;              lv_email_null := 1;&lt;br /&gt;          ELSE&lt;br /&gt;              lv_email_null := 0;&lt;br /&gt;          END IF;&lt;br /&gt;      END LOOP;&lt;br /&gt;&lt;br /&gt;      IF  lv_email_same = 1&lt;br /&gt;      AND lv_email_null = 0&lt;br /&gt;      THEN&lt;br /&gt;          lv_email  := NVL(lt_emp_data(ln_row).email,NULL);&lt;br /&gt;          other_proc(lv_email,p_emp_rec);&lt;br /&gt;      ELSE&lt;br /&gt;          ...&lt;br /&gt;      END IF;&lt;br /&gt;  END IF;&lt;br /&gt;END;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5642715814525340274?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5642715814525340274/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5642715814525340274' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5642715814525340274'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5642715814525340274'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/code-re-use-oracle.html' title='Code Re-use  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-9217515545355574203</id><published>2008-08-06T22:01:00.000-07:00</published><updated>2008-08-06T22:02:40.108-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Short loop  ....oracle</title><content type='html'>&lt;p&gt;It's good to see a GOTO every now and then. However, the sender of this one (thanks!) was most impressed by the loop that goes from 1 to &lt;tt&gt;v_totalcntr&lt;/tt&gt;, and indeed the fact that there is a loop and a &lt;tt&gt;v_totalctr&lt;/tt&gt; variable at all, with the variable carefully set from the cursor's &lt;tt&gt;%ROWCOUNT&lt;/tt&gt;, when it can only ever have one value:&lt;/p&gt; &lt;pre&gt;DECLARE&lt;br /&gt; CURSOR cur_pricing IS&lt;br /&gt;     SELECT col1, col2&lt;br /&gt;     FROM   sometable;&lt;br /&gt;&lt;br /&gt; var_pricing cur_pricing%ROWTYPE;&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt; OPEN cur_pricing;&lt;br /&gt; FETCH cur_pricing INTO var_pricing;&lt;br /&gt;&lt;br /&gt; IF cur_pricing%NOTFOUND THEN&lt;br /&gt;     GOTO continue;&lt;br /&gt; END IF;&lt;br /&gt;&lt;br /&gt; v_totalcntr := cur_pricing%ROWCOUNT;&lt;br /&gt;&lt;br /&gt; FOR r IN 1..v_totalcntr&lt;br /&gt; LOOP&lt;br /&gt;     -- loads of stuff here&lt;br /&gt;     -- but no fetch from cur_pricing&lt;br /&gt;     -- not even for the one time this loop will execute :-)&lt;br /&gt; END LOOP;&lt;br /&gt;&lt;br /&gt; &lt;&lt;continue&gt;&gt;&lt;br /&gt; NULL;&lt;br /&gt;END;&lt;/pre&gt; &lt;p&gt;Of course you could just fetch the value you want and process it, but where would be the fun in that?&lt;/p&gt;  &lt;p&gt;&lt;b&gt;PS&lt;/b&gt; The person who sent this in emailed me with a point I must admit hadn't occurred to me:&lt;/p&gt;  &lt;blockquote&gt;Saw you posted this one - thanks. But did you pick up on what they probably thought they were doing? I think whoever wrote it thought that &lt;tt&gt;%rowcount&lt;/tt&gt; would have the TOTAL number of rows that the cursor would return - so they thought they would be looping around ALL the records in the cursor. The fact that they also forgot to fetch again in the loop just adds to the problem of course.&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-9217515545355574203?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/9217515545355574203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=9217515545355574203' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9217515545355574203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/9217515545355574203'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/short-loop-oracle.html' title='Short loop  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4418990372551637655</id><published>2008-08-06T22:00:00.000-07:00</published><updated>2008-08-06T22:01:43.778-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Performance Tuning and The Big O  ....oracle</title><content type='html'>&lt;p&gt;Oracle Performance Tuning is a big subject, as anyone will appreciate who has read any of a number of books that set out to help you to understand what problem you are trying to solve, what factors may affect the performance you are seeing, what strategies are available to the query optimizer, and so on.&lt;/p&gt;  &lt;p&gt;While Cary Millsap's &lt;i&gt;Optimizing Oracle Performance&lt;/i&gt; focusses on finding, tracing and prioritising specific problems in the face of vague reports that the system seems a bit slow this week, and Jonathan Lewis' &lt;i&gt;Cost-Based Oracle Fundamentals&lt;/i&gt; takes us on a tour of the CBO to help answer such questions as &lt;i&gt;Why isn't my &lt;tt&gt;EXISTS&lt;/tt&gt; query using an index? (and why isn't it faster than the &lt;tt&gt;IN&lt;/tt&gt; version?)&lt;/i&gt; a poster on OraFAQ has an approach we've not seen before:&lt;/p&gt; &lt;blockquote&gt;&lt;p&gt;Hi,&lt;/p&gt; &lt;p&gt;The following is a problem I need help with and I am willing to pay for help if necessary. Any info would be greatly appreciated.&lt;/p&gt;  &lt;p&gt;Two tables in a database:&lt;/p&gt;  &lt;p&gt;Table1 contains a list of phone numbers&lt;br /&gt;Table2 contains a list of phone numbers as well&lt;/p&gt;  &lt;p&gt;I would like to create a Table3, in which Table3 contains all numbers from Table1 that is not in Table2. I am looking for the shortest runtime possible, keeping in mind that you can use whatever method(s) you deem necessary.&lt;/p&gt;  &lt;p&gt;Table1 contains 30 Million rows,&lt;br /&gt;Table2 contains 2000 rows.&lt;/p&gt;  &lt;p&gt;given a regular SQL expression, it will yield Big O(m*n)&lt;/p&gt;  &lt;p&gt;Where m = rowcount of Table1&lt;br /&gt;and n = rowcount of Table2&lt;/p&gt;  &lt;p&gt;Generate for me, a method in which, runtime will yield Big O (m log2 n).&lt;/p&gt;  &lt;p&gt;I don't need code, I want to hear your logic. Table1 is customers, Table2 is a list of prepaid phone numbers. Table3 is list of people to bill.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;As usual no database version is given. The first suggestion, as you might expect, is the quite reasonable:&lt;/p&gt; &lt;pre&gt;select phone_no from table1&lt;br /&gt;minus&lt;br /&gt;select phone_no from table2;&lt;/pre&gt; &lt;p&gt;accompanied by a comment that it doesn't seem like a great piece of schema design to have two tables in the first place. However, the reply comes back:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;The guy who wrote this problem just told me that this answer is incorrect.&lt;/p&gt; &lt;p&gt;His response to me was:&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;it's not too simplistic, but it is incorrect. This will still yield a big O(m*n).&lt;/p&gt;  &lt;p&gt;Give it one more try, you are thinking too much in terms of DB.&lt;/p&gt;  &lt;p&gt;Ask yourself, what are the only structures that would yield BigO(nlog2n)? Answer that, and you will get your answer.&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Any ideas?&lt;/p&gt;&lt;/blockquote&gt;  &lt;p&gt;Resident mathematician Ross Leishman tried to explain to me what &lt;i&gt;Big O (m log2n)&lt;/i&gt; means, and I can confirm that it is not after all a &lt;i&gt;When Harry Met Sally&lt;/i&gt; reference as most of us would probably assume. Apparently the version with an &lt;tt&gt;EXISTS&lt;/tt&gt; subquery was what was wanted, which seemed odd to me on a number of levels, not least that an &lt;tt&gt;IN&lt;/tt&gt; subquery would probably produce the same plan, especially in 10g where the new &lt;tt&gt;HASH JOIN RIGHT ANTI&lt;/tt&gt; allows the database to build its hash table from the 2,000-row table2 rather than the 30 million-row table1. But of course we don't know the database version, do we? Or whether the columns are nullable, unique or indexed, or how values are distributed, or really anything about the actual environment that would help in solving a real-world performance problem. I can see where I'm going wrong though. I am thinking too much in terms of DB.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4418990372551637655?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4418990372551637655/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4418990372551637655' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4418990372551637655'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4418990372551637655'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/performance-tuning-and-big-o-oracle.html' title='Performance Tuning and The Big O  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7751873844584859143</id><published>2008-08-06T21:59:00.000-07:00</published><updated>2008-08-06T22:00:34.324-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>423,551 Invalid Indexes  ....oracle</title><content type='html'>&lt;p&gt;A friend received an alarming email from a commendably proactive DBA who was concerned that he had discovered a potentially serious performance issue on the production system:&lt;/p&gt; &lt;blockquote&gt;The following result shows there are many invalid indexes. For example, in the first row we see that there are nearly 423551 invalid indexes for just one row of a table. So if we rebuilt the index it would improve the performance.&lt;/blockquote&gt; &lt;p&gt;Wow, that sure is a lot of invalid indexes for just one row of a table. For the sake of anonymity, I've run his query against the SCOTT/TIGER schema, where fortunately there are only 14 invalid indexes (or perhaps 10, if that's how you count them). Perhaps you can see what the problem might be:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;SELECT DISTINCT&lt;br /&gt;      t.table_name&lt;br /&gt;    , i.index_name&lt;br /&gt;    , t.num_rows table_rows&lt;br /&gt;    , i.num_rows index_rows&lt;br /&gt;FROM   dba_tables t&lt;br /&gt;    , dba_indexes i&lt;br /&gt;WHERE  t.table_name = 'DEPT'&lt;br /&gt;AND    t.owner = 'SCOTT'&lt;br /&gt;AND    i.owner = t.owner&lt;br /&gt;AND    i.index_type = 'NORMAL';&lt;br /&gt;&lt;br /&gt;TABLE_NAME                     INDEX_NAME                     TABLE_ROWS INDEX_ROWS&lt;br /&gt;------------------------------ ------------------------------ ---------- ----------&lt;br /&gt;DEPT                           PK_EMP                                  4         14&lt;br /&gt;DEPT                           EMP_DEPT_IX                             4         14&lt;br /&gt;DEPT                           PK_DEPT                                 4          4&lt;br /&gt;DEPT                           PK_SALGRADE                             4          5&lt;br /&gt;&lt;br /&gt;4 rows selected.&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;There is worse to come. It's not just DEPT that has invalid indexes. He goes on:&lt;/p&gt; &lt;blockquote&gt;The following result shows there are many invalid indexes, so if we rebuild the index, it would improve the performance. At the same time from the first and last rows, indexes are not being used, so we need to look into it.&lt;/blockquote&gt; &lt;blockquote&gt;&lt;pre&gt;TABLE_NAME                     INDEX_NAME                     TABLE_ROWS INDEX_ROWS&lt;br /&gt;------------------------------ ------------------------------ ---------- ----------&lt;br /&gt;SALGRADE                       PK_DEPT                                 5          4&lt;br /&gt;SALGRADE                       PK_EMP                                  5         14&lt;br /&gt;SALGRADE                       EMP_DEPT_IX                             5         14&lt;br /&gt;SALGRADE                       PK_SALGRADE                             5          5&lt;br /&gt;&lt;br /&gt;TABLE_NAME                     INDEX_NAME                     TABLE_ROWS INDEX_ROWS&lt;br /&gt;------------------------------ ------------------------------ ---------- ----------&lt;br /&gt;EMP                            PK_DEPT                                14          4&lt;br /&gt;EMP                            PK_EMP                                 14         14&lt;br /&gt;EMP                            EMP_DEPT_IX                            14         14&lt;br /&gt;EMP                            PK_SALGRADE                            14          5&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;I just can't help wondering what he thinks an index is.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7751873844584859143?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7751873844584859143/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7751873844584859143' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7751873844584859143'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7751873844584859143'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/423551-invalid-indexes-oracle.html' title='423,551 Invalid Indexes  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1771079454527828545</id><published>2008-08-06T21:58:00.000-07:00</published><updated>2008-08-06T21:59:31.357-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Quote For The Day  ....oracle</title><content type='html'>&lt;blockquote&gt;&lt;i&gt;"PL/SQL development can be a tedious and time-consuming job – often monopolizing the valuable time and efforts of Oracle developers."&lt;/i&gt; &lt;b&gt;- SQL Navigator page, Quest Software&lt;/b&gt;&lt;/blockquote&gt;  &lt;p&gt;Spare a thought today for PL/SQL developers, having their precious time tediously monopolised by, umm, PL/SQL development.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1771079454527828545?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1771079454527828545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1771079454527828545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1771079454527828545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1771079454527828545'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/quote-for-day-oracle.html' title='Quote For The Day  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1314298099547088652</id><published>2008-08-06T21:57:00.000-07:00</published><updated>2008-08-06T21:58:43.392-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>DATE comparisons: the scenic route  ....oracle</title><content type='html'>&lt;p&gt;Need to calculate the number of minutes between two dates? Yes, the dull way is to subtract one from the other and multiply by 1440. But why do that, when you can simply convert each date into Julian format by converting it into a string and then back to a date, and converting the resulting date into a Julian string, and (in a separate step) applying &lt;tt&gt;TO_NUMBER&lt;/tt&gt; to the result to get an integer, so that you can simply subtract one from the other and multiply by 1440.&lt;/p&gt; &lt;p&gt;Except that rounds to the nearest day, so an additional step is to calculate the minutes since midnight for each of the two dates, which you can do by simply converting each date into an 'HH:MI AM' string, then back to a date, then back to an 'SSSSS' string, converting it to a number, dividing by 60 and adding it to the result of the first calculation. I think.&lt;/p&gt;  &lt;p&gt;Anyway, consider the following library of handy date functions our Oracle WTF Easter gift to you, the online development community.&lt;/p&gt; &lt;pre&gt;CREATE PACKAGE dates_pkg&lt;br /&gt;AS&lt;br /&gt;   FUNCTION julian_date&lt;br /&gt;       ( date_to_convert DATE )&lt;br /&gt;       RETURN NUMBER;&lt;br /&gt;&lt;br /&gt;   FUNCTION minutes_since_midnight&lt;br /&gt;       ( timevalue DATE )&lt;br /&gt;       RETURN NUMBER;&lt;br /&gt;&lt;br /&gt;   FUNCTION minutes_elapsed&lt;br /&gt;       ( lowdate DATE&lt;br /&gt;       , highdate DATE )&lt;br /&gt;       RETURN NUMBER;&lt;br /&gt;&lt;br /&gt;END dates_pkg;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;CREATE PACKAGE BODY dates_pkg&lt;br /&gt;AS&lt;br /&gt;   FUNCTION julian_date&lt;br /&gt;       ( date_to_convert DATE)&lt;br /&gt;       RETURN NUMBER&lt;br /&gt;   IS&lt;br /&gt;       varch_value VARCHAR (10);&lt;br /&gt;       num_value NUMBER (20);&lt;br /&gt;   BEGIN&lt;br /&gt;       SELECT TO_CHAR&lt;br /&gt;              ( TO_DATE(TO_CHAR(date_to_convert,'MM/DD/YYYY'),'MM/DD/YYYY')&lt;br /&gt;              , 'J')&lt;br /&gt;       INTO   varch_value&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT TO_NUMBER (varch_value)&lt;br /&gt;       INTO   num_value&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       RETURN (num_value);&lt;br /&gt;   END julian_date;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   FUNCTION minutes_since_midnight (&lt;br /&gt;       timevalue DATE)&lt;br /&gt;       RETURN NUMBER&lt;br /&gt;   IS&lt;br /&gt;       secs_elapsed NUMBER (20);&lt;br /&gt;       mins_elapsed NUMBER (20);&lt;br /&gt;   BEGIN&lt;br /&gt;       SELECT TO_NUMBER&lt;br /&gt;              ( TO_CHAR(TO_DATE(TO_CHAR(timevalue,'HH:MI AM'),'HH:MI AM')&lt;br /&gt;              , 'SSSSS') )&lt;br /&gt;       INTO   secs_elapsed&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT (secs_elapsed / 60)&lt;br /&gt;       INTO   mins_elapsed&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       RETURN (mins_elapsed);&lt;br /&gt;   END minutes_since_midnight;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   FUNCTION minutes_elapsed&lt;br /&gt;       ( lowdate DATE&lt;br /&gt;       , highdate DATE )&lt;br /&gt;       RETURN NUMBER&lt;br /&gt;   IS&lt;br /&gt;       final_number NUMBER (20);&lt;br /&gt;       low_julian NUMBER (20);&lt;br /&gt;       high_julian NUMBER (20);&lt;br /&gt;       num_days NUMBER (20);&lt;br /&gt;       num_minutes NUMBER (20);&lt;br /&gt;       temp_mins NUMBER (20);&lt;br /&gt;       min_low NUMBER (20);&lt;br /&gt;       min_high NUMBER (20);&lt;br /&gt;   BEGIN&lt;br /&gt;       SELECT julian_date (lowdate)&lt;br /&gt;       INTO   low_julian&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT julian_date (highdate)&lt;br /&gt;       INTO   high_julian&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT (high_julian - low_julian)&lt;br /&gt;       INTO   num_days&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT (num_days * 1440)&lt;br /&gt;       INTO   num_minutes&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT minutes_since_midnight (lowdate)&lt;br /&gt;       INTO   min_low&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT minutes_since_midnight (highdate)&lt;br /&gt;       INTO   min_high&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT (min_high - min_low)&lt;br /&gt;       INTO   temp_mins&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       SELECT (num_minutes + temp_mins)&lt;br /&gt;       INTO   final_number&lt;br /&gt;       FROM   dual;&lt;br /&gt;&lt;br /&gt;       RETURN (final_number);&lt;br /&gt;&lt;br /&gt;   END minutes_elapsed;&lt;br /&gt;END dates_pkg;&lt;br /&gt;&lt;/pre&gt; &lt;p&gt;Just for fun, let's test it:&lt;/p&gt; &lt;pre&gt;CREATE TABLE wtf_test (start_date NOT NULL, end_date NOT NULL) AS&lt;br /&gt;SELECT DATE '2006-12-25' + DBMS_RANDOM.VALUE(1,365)&lt;br /&gt;    , DATE '2007-12-25' + DBMS_RANDOM.VALUE(1,365)&lt;br /&gt;FROM   dual CONNECT BY LEVEL &lt;= 1000;&lt;br /&gt;&lt;br /&gt;-- &lt;i&gt;...several runs here to allow for caching etc, last set of results shown...&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; set timing on autotrace traceonly stat&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT dates_pkg.minutes_elapsed(start_date,end_date) FROM wtf_test;&lt;br /&gt;&lt;br /&gt;1000 rows selected.&lt;br /&gt;&lt;br /&gt;Elapsed: 00:00:03.96&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt; &lt;b&gt;16000  recursive calls&lt;/b&gt;&lt;br /&gt;     0  db block gets&lt;br /&gt;    74  consistent gets&lt;br /&gt;     0  physical reads&lt;br /&gt;     0  redo size&lt;br /&gt;  9330  bytes sent via SQL*Net to client&lt;br /&gt;   809  bytes received via SQL*Net from client&lt;br /&gt;    68  SQL*Net roundtrips to/from client&lt;br /&gt;     0  sorts (memory)&lt;br /&gt;     0  sorts (disk)&lt;br /&gt;  1000  rows processed&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT (end_date - start_date) * 1440 FROM wtf_test;&lt;br /&gt;&lt;br /&gt;1000 rows selected.&lt;br /&gt;&lt;br /&gt;Elapsed: 00:00:00.16&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;     &lt;b&gt;0  recursive calls&lt;/b&gt;&lt;br /&gt;     0  db block gets&lt;br /&gt;    74  consistent gets&lt;br /&gt;     0  physical reads&lt;br /&gt;     0  redo size&lt;br /&gt; 25485  bytes sent via SQL*Net to client&lt;br /&gt;   809  bytes received via SQL*Net from client&lt;br /&gt;    68  SQL*Net roundtrips to/from client&lt;br /&gt;     0  sorts (memory)&lt;br /&gt;     0  sorts (disk)&lt;br /&gt;  1000  rows processed&lt;/pre&gt; &lt;p&gt;So the handy package version takes &lt;b&gt;25 times&lt;/b&gt; as long as the 1-line SQL version.&lt;/p&gt; &lt;p&gt;And in the interests of fairness, in case you're thinking perhaps that is just the normal overhead of calling PL/SQL functions in SQL, let's try our own function:&lt;/p&gt; &lt;pre&gt;CREATE FUNCTION minutes_elapsed&lt;br /&gt;   ( lowdate DATE&lt;br /&gt;   , highdate DATE )&lt;br /&gt;   RETURN NUMBER&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;   RETURN (highdate - lowdate) * 1440;&lt;br /&gt;END minutes_elapsed;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SQL&gt; SELECT minutes_elapsed(start_date,end_date) FROM wtf_test;&lt;br /&gt;&lt;br /&gt;1000 rows selected.&lt;br /&gt;&lt;br /&gt;Elapsed: 00:00:00.26&lt;br /&gt;&lt;br /&gt;Statistics&lt;br /&gt;----------------------------------------------------------&lt;br /&gt;    21  recursive calls&lt;br /&gt;     0  db block gets&lt;br /&gt;   107  consistent gets&lt;br /&gt;     0  physical reads&lt;br /&gt;     0  redo size&lt;br /&gt; 25496  bytes sent via SQL*Net to client&lt;br /&gt;   809  bytes received via SQL*Net from client&lt;br /&gt;    68  SQL*Net roundtrips to/from client&lt;br /&gt;     0  sorts (memory)&lt;br /&gt;     0  sorts (disk)&lt;br /&gt;  1000  rows processed&lt;/pre&gt; &lt;p&gt;Still 15 times faster.&lt;/p&gt; &lt;p&gt;Many thanks to Padders for sharing this one.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1314298099547088652?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1314298099547088652/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1314298099547088652' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1314298099547088652'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1314298099547088652'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/date-comparisons-scenic-route-oracle.html' title='DATE comparisons: the scenic route  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3603731368435341561</id><published>2008-08-06T21:56:00.000-07:00</published><updated>2008-08-06T21:57:38.509-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>One liner  ....oracle</title><content type='html'>I was untangling a query when I came across eight variations of this code where only the literals 'a' to 'e' changed. Two of these were nested within an additional &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;NVL&lt;/span&gt;&lt;/span&gt; so that the second would execute if the first returned null.  &lt;pre&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;nvl&lt;/span&gt;&lt;/span&gt;(decode(2, 1, 'a', 2, 'b', 3, 'c', 4, 'd', 5, 'e', ' '), '&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;na&lt;/span&gt;&lt;/span&gt;')&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3603731368435341561?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3603731368435341561/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3603731368435341561' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3603731368435341561'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3603731368435341561'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/one-liner-oracle.html' title='One liner  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1265814164788716427</id><published>2008-08-06T21:55:00.000-07:00</published><updated>2008-08-06T21:56:44.681-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Welcome back  ....oracle</title><content type='html'>&lt;p&gt;Our guest administrator "Splogger" has now left the building, along with his page of helpful links to items on Amazon.com and a range of gentlemen's health products.&lt;/p&gt;&lt;p&gt;Suspiciously, a couple of days before he arrived we were taken off air by Blogger's spambots, presumably alerted by the amount of irrelevant, repetitive, and nonsensical text and links to Viagra sites they found here. From what I read, it seems possible that the Blogger automated suspension to prevent blog spam might have actually left the account vulnerable to blog spammers. As ironies go, that is up there with rain on your wedding day and good advice that you just didn't take.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1265814164788716427?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1265814164788716427/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1265814164788716427' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1265814164788716427'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1265814164788716427'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/welcome-back-oracle.html' title='Welcome back  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2877406631791434938</id><published>2008-08-06T21:54:00.000-07:00</published><updated>2008-08-06T21:55:31.370-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>What is this "testing" thing?  ....oracle</title><content type='html'>&lt;p&gt;Recently asked on the OTN PL/SQL forum:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;I am reading a book: Learning Oracle PL/SQL by Bill Pribyl and Steven Feuerstein.&lt;/p&gt;&lt;p&gt;I am a newbie of PL/SQL and I got no other programming XPs. but in the very first of this book they are introducing something called: testing, to make some test programms /utilites.&lt;/p&gt;&lt;p&gt;I found that is very hard to make, is it neccessary?&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Apparently, after you've typed the final semicolon, you can either sit back and open a beer with the satisfaction of a job well done, or you can check whether the thing works. And apparently it's hard, so, do we really have to?&lt;/p&gt;&lt;p&gt;Well, another poster was recently arguing that PL/SQL is not suited to unit testing anyway, or refactoring either for that matter, because &lt;i&gt;it isn't object oriented&lt;/i&gt;. I think that will be my excuse from now on. You want me to test stuff, go make PL/SQL more objecty.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2877406631791434938?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2877406631791434938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2877406631791434938' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2877406631791434938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2877406631791434938'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/what-is-this-testing-thing-oracle.html' title='What is this &quot;testing&quot; thing?  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8605584698159283720</id><published>2008-08-06T21:53:00.000-07:00</published><updated>2008-08-06T21:54:46.990-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Frameworkia  ....oracle</title><content type='html'>&lt;p&gt;We thought long and hard about possible titles for this new PL/SQL development standard proposed on OTN, but we couldn't improve on the one it came with.&lt;/p&gt;  &lt;blockquote&gt;&lt;p&gt;I want share a new IDEA to create a new standard PL/SQL developing:&lt;/p&gt; &lt;pre&gt;&lt;br /&gt;&lt;br /&gt;Function &lt;name&gt;( Standard Buffer) return number&lt;br /&gt;   variable Number;&lt;br /&gt;   variable1 Varchar2;&lt;br /&gt;begin&lt;br /&gt;   variable := get from Standard Buffer;&lt;br /&gt;   variable1 := get from Standard Buffer;&lt;br /&gt;&lt;br /&gt;   { make your business }&lt;br /&gt;&lt;br /&gt;   put in standard buffer your results&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;/name&gt;&lt;/pre&gt; &lt;p&gt;Give me feedback if you are interested at the new STANDARD called &lt;b&gt;"FRAMEWORKIA"&lt;/b&gt;.&lt;/p&gt; &lt;p&gt;A lot possibilities are ready.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;Do you see the genius of it?&lt;/p&gt; &lt;p&gt;Er, no.&lt;/p&gt; &lt;p&gt;Sensing that there were people who still needed convincing, user601181 posted some sample code developed using the new Frameworkia:&lt;/p&gt; &lt;pre&gt;CREATE OR REPLACE FUNCTION iacore&lt;br /&gt;   ( eobufferia IN OUT typeeodata )&lt;br /&gt;   RETURN NUMBER&lt;br /&gt;IS&lt;br /&gt;   CURSOR cur_getroutingcondition&lt;br /&gt;       ( idc_workflow IN VARCHAR2&lt;br /&gt;       , idc_operation_node IN VARCHAR2 ) IS&lt;br /&gt;       SELECT *&lt;br /&gt;       FROM   wf_condition&lt;br /&gt;       WHERE  id_workflow = idc_workflow&lt;br /&gt;       AND    id_operation_node = idc_operation_node;&lt;br /&gt;&lt;br /&gt;   rec_getroutingcondition cur_getroutingcondition%ROWTYPE;&lt;br /&gt;&lt;br /&gt;   CURSOR cur_dobufferiaassign&lt;br /&gt;       ( idc_workflow IN VARCHAR2&lt;br /&gt;       , idc_operation_node IN VARCHAR2 ) IS&lt;br /&gt;       SELECT *&lt;br /&gt;       FROM   wf_assignement&lt;br /&gt;       WHERE  id_workflow = idc_workflow&lt;br /&gt;       AND    id_operation_node = idc_operation_node;&lt;br /&gt;&lt;br /&gt;   rec_dobufferiaassign cur_dobufferiaassign%ROWTYPE;&lt;br /&gt;&lt;br /&gt;   next_node         NUMBER;&lt;br /&gt;   next_node_ck      NUMBER;&lt;br /&gt;   stop_node         NUMBER;&lt;br /&gt;   operation         VARCHAR2(256);&lt;br /&gt;   operation_call    VARCHAR2(256);&lt;br /&gt;   type_node         VARCHAR2(32);&lt;br /&gt;   workflow          VARCHAR2(32);&lt;br /&gt;   line              VARCHAR2(256);&lt;br /&gt;   status_wf_v       VARCHAR2(3);&lt;br /&gt;   pid_chain_node    NUMBER;&lt;br /&gt;   ia_tid            VARCHAR2(64);&lt;br /&gt;   ia_tid_micro      VARCHAR2(64);&lt;br /&gt;   ret_code_default  NUMBER;&lt;br /&gt;   ret_code          NUMBER;&lt;br /&gt;   retval1           NUMBER;&lt;br /&gt;   statementexc      VARCHAR2(256);&lt;br /&gt;   schema_function   VARCHAR2(32);&lt;br /&gt;   package_function  VARCHAR2(32);&lt;br /&gt;   dblink_function   VARCHAR2(32);&lt;br /&gt;   first_node_flag   VARCHAR2(2) := 'NO';&lt;br /&gt;   id_debug_source   NUMBER;&lt;br /&gt;   mapin_keyp        VARCHAR2(1024);&lt;br /&gt;&lt;br /&gt;   headerbufferia typebufferia;&lt;br /&gt;   assignbufferia typebufferia;&lt;br /&gt;   checkbufferia  typebufferia;&lt;br /&gt;&lt;br /&gt;   rec_wfnode               wf_node%ROWTYPE;&lt;br /&gt;   rec_wffunctionsourcecode wf_function_source_code%ROWTYPE;&lt;br /&gt;   rec_wflogger             wf_logger%ROWTYPE;&lt;br /&gt;   rec_wfbusiness           wf_business%ROWTYPE;&lt;br /&gt;   rec_wffieldmapping       wf_fieldmapping%ROWTYPE;&lt;br /&gt;BEGIN&lt;br /&gt;   headerbufferia := eobufferia(1);&lt;br /&gt;&lt;br /&gt;   workflow := frameworkia.getvalue(headerbufferia,'ID_WORKFLOW');&lt;br /&gt;&lt;br /&gt;   ---- DETERMINO QUALE NODO INVOCARE&lt;br /&gt;   pid_chain_node := frameworkia.getvalue(headerbufferia,'WF_NODE_ID');&lt;br /&gt;&lt;br /&gt;   ----- SE IL NODO E' NULL ALLORA E' IL PRIMO NODO&lt;br /&gt;   IF pid_chain_node IS NULL&lt;br /&gt;   THEN&lt;br /&gt;       -------DETERMINO HANDLER E FILENAME PER IL LOGGER&lt;br /&gt;       SELECT *&lt;br /&gt;       INTO   rec_wflogger&lt;br /&gt;       FROM   wf_logger&lt;br /&gt;       WHERE  id_workflow = workflow;&lt;br /&gt;       -- rec_WfLogger.ID_WORKFLOW&lt;br /&gt;       -- rec_WfLogger.ID_DEBUG_LEVEL&lt;br /&gt;       -- rec_WfLogger.ID_DIRHANDLER&lt;br /&gt;       -- rec_WfLogger.ID_FILENAME&lt;br /&gt;&lt;br /&gt;       --------INSERISCO NELL'HEADER&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'ID_DEBUG_WF'&lt;br /&gt;       , rec_wflogger.id_debug_level );&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'ID_DIRHANDLER'&lt;br /&gt;       , rec_wflogger.id_dirhandler );&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'ID_FILENAME'&lt;br /&gt;       , rec_wflogger.id_filename );&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'CHARACTER_EVIDENCE'&lt;br /&gt;       , '§§§§§§§§§§§§§§§§§§§§' );&lt;br /&gt;&lt;br /&gt;       -------DETERMINO L'ID NODE&lt;br /&gt;       SELECT wf_node_id&lt;br /&gt;       INTO   pid_chain_node&lt;br /&gt;       FROM   wf_node&lt;br /&gt;       WHERE  id_workflow = workflow&lt;br /&gt;       AND    wf_first_node = 'YES';&lt;br /&gt;&lt;br /&gt;       SELECT *&lt;br /&gt;       INTO   rec_wfnode&lt;br /&gt;       FROM   wf_node&lt;br /&gt;       WHERE  id_workflow = workflow&lt;br /&gt;       AND    wf_first_node = 'YES';&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'WF_NODE_ID'&lt;br /&gt;       , rec_wfnode.wf_node_id );&lt;br /&gt;&lt;br /&gt;       SELECT b.status&lt;br /&gt;       INTO   status_wf_v&lt;br /&gt;       FROM   wf_node a&lt;br /&gt;            , wf_name b&lt;br /&gt;       WHERE  a.id_workflow = workflow&lt;br /&gt;       AND    a.wf_node_id = rec_wfnode.wf_node_id&lt;br /&gt;       AND    a.id_workflow = b.id_workflow;&lt;br /&gt;&lt;br /&gt;       IF status_wf_v = 'OFF'&lt;br /&gt;       THEN&lt;br /&gt;           RETURN -1;&lt;br /&gt;       END IF;&lt;br /&gt;&lt;br /&gt;       ia_tid := frameworkia.getvalue(headerbufferia,'IA_TID');&lt;br /&gt;       ret_code_default := 0;&lt;br /&gt;       ret_code         := 0;&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'RET_CODE_DEFAULT'&lt;br /&gt;       , ret_code_default );&lt;br /&gt;&lt;br /&gt;       frameworkia.setvalue&lt;br /&gt;       ( headerbufferia&lt;br /&gt;       , 'RET_CODE'&lt;br /&gt;       , ret_code);&lt;br /&gt;&lt;br /&gt;       IF ia_tid IS NULL&lt;br /&gt;       THEN&lt;br /&gt;           ia_tid := 'TIA' || dbms_random.STRING('U',1 * 1 + 6) ||&lt;br /&gt;                     TO_CHAR(SYSTIMESTAMP,'YYYYMMDDHH24MISSFF6');&lt;br /&gt;&lt;br /&gt;           frameworkia.setvalue&lt;br /&gt;           ( headerbufferia&lt;br /&gt;           , 'IA_TID'&lt;br /&gt;           , ia_tid );&lt;br /&gt;       END IF;&lt;/pre&gt; &lt;p&gt;That's just the first hundred lines, and I've formatted it. The complete &lt;tt&gt;iacore&lt;/tt&gt; function was well over 600 lines long.&lt;/p&gt; &lt;p&gt;I for one welcome the new standard.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8605584698159283720?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8605584698159283720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8605584698159283720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8605584698159283720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8605584698159283720'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/frameworkia-oracle.html' title='Frameworkia  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4792211081355383638</id><published>2008-08-06T21:52:00.000-07:00</published><updated>2008-08-06T21:53:47.192-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>WREAK_APPLICATION_HAVOC  ....oracle</title><content type='html'>&lt;p&gt;Tom Kyte recently blogged about the senseless and yet strangely common practice of coding something like this:&lt;/p&gt;&lt;pre&gt;WHEN OTHERS THEN&lt;br /&gt;  RAISE_APPLICATION_ERROR(-20001,'Following Error Occured:' || SQLERRM);&lt;/pre&gt; &lt;p&gt;which fairly obviously achieves nothing except take a standard message like this:&lt;/p&gt;&lt;pre&gt;ORA-06501: PL/SQL: program error&lt;br /&gt;ORA-06512: at line 6&lt;/pre&gt;&lt;p&gt;and pointlessly scramble it into this:&lt;/p&gt;&lt;pre&gt;ORA-20001: Following Error Occured:ORA-06501: PL/SQL: program error&lt;br /&gt;ORA-06512: at line 11&lt;/pre&gt;&lt;p&gt;which adds some meaningless text, hides the original line number, and miss-spells "occurred". Not bad for a day's work.&lt;/p&gt;&lt;p&gt;It turned out that some people had been doing this for years because they were simply too stupid to realise that they didn't have to.&lt;/p&gt;&lt;p&gt;Anyway you know all this because you read Tom Kyte's blog. But have a look at this helpful page of advice from Tech On The Net, under &lt;i&gt;"Oracle/PLSQL: SQLERRM Function"&lt;/i&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;You could use the SQLERRM function to raise an error as follows:&lt;/p&gt;&lt;pre&gt;EXCEPTION&lt;br /&gt;  WHEN OTHERS THEN&lt;br /&gt;     raise_application_error&lt;br /&gt;     (-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);&lt;br /&gt;END;&lt;/pre&gt;&lt;p&gt;Or you could log the error to a table as follows:&lt;/p&gt;&lt;pre&gt;EXCEPTION&lt;br /&gt;  WHEN OTHERS THEN&lt;br /&gt;     err_code := SQLCODE;&lt;br /&gt;     err_msg := substr(SQLERRM, 1, 200);&lt;br /&gt;&lt;br /&gt;     INSERT INTO audit_table (error_number, error_message)&lt;br /&gt;     VALUES (err_code, err_msg);&lt;br /&gt;END;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;Now that is even better. The first example adds some meaningless text, hides the original line number, and duplicates the error code (unless it's a NO_DATA_FOUND exception, but let's not go there), to produce something like this:&lt;/p&gt; &lt;pre&gt;ORA-20001: An error was encountered - -6501 -ERROR- ORA-06501: PL/SQL: program error&lt;br /&gt;ORA-06512: at line 11&lt;/pre&gt;&lt;p&gt;The error logging example pointlessly captures &lt;tt&gt;SQLCODE&lt;/tt&gt; (nobody will ever use it), throws away all but the first 200 characters of the error stack, logs nothing about what happened, and fails to re-raise the exception so if you don't check the log you won't know anything went wrong until your customers start asking where their stuff is.&lt;/p&gt; &lt;p&gt;Wouldn't it be great if there were, say, a Boolean third parameter to RAISE_APPLICATION_ERROR that would make it retain the existing error stack, freeing up the message line for you to put something intelligent and helpful, like, I don't know,&lt;/p&gt; &lt;pre&gt;BEGIN&lt;br /&gt;   RAISE program_error;&lt;br /&gt;EXCEPTION&lt;br /&gt;   WHEN OTHERS THEN&lt;br /&gt;       RAISE_APPLICATION_ERROR&lt;br /&gt;       ( -20001&lt;br /&gt;       , 'Biscuits cannot be ordered on a ' || TO_CHAR(SYSDATE,'fmDay') ||&lt;br /&gt;         ' without a hot beverage'&lt;br /&gt;       , &lt;b&gt;TRUE&lt;/b&gt;);&lt;br /&gt;END;&lt;/pre&gt;&lt;p&gt;to produce something like this:&lt;/p&gt;&lt;pre&gt;ORA-20001: Biscuits cannot be ordered on a Sunday without a hot beverage&lt;br /&gt;ORA-06512: at line 5&lt;br /&gt;ORA-06501: PL/SQL: program error&lt;/pre&gt;&lt;p&gt;We can but dream.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4792211081355383638?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4792211081355383638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4792211081355383638' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4792211081355383638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4792211081355383638'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/wreakapplicationhavoc-oracle.html' title='WREAK_APPLICATION_HAVOC  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6248559556861583639</id><published>2008-08-06T21:51:00.000-07:00</published><updated>2008-08-06T21:52:43.369-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Fine tuning  ....oracle</title><content type='html'>&lt;p&gt;Mike is doing some work on an application that started life as SQL Server. Now that it has been converted to Oracle, there are one or two bits that could still do with a little fine tuning.&lt;/p&gt;&lt;p&gt;One particular procedure seemed to take rather a lot of time, and several developers had tried to get better performance out of it without much success. Here it is:&lt;/p&gt;&lt;blockquote&gt; &lt;pre&gt;CREATE OR REPLACE PROCEDURE getupdatedrunids&lt;br /&gt;   ( p_customer_id  IN VARCHAR2 DEFAULT NULL&lt;br /&gt;   , pc_results_out IN OUT SYS_REFCURSOR )&lt;br /&gt;AS&lt;br /&gt;   v_fetch_status     INTEGER := 0;&lt;br /&gt;   v_sql_status       INTEGER;&lt;br /&gt;   v_fetch_status1    INTEGER := 0;&lt;br /&gt;   v_sql_status1      INTEGER;&lt;br /&gt;   v_event_id         VARCHAR2(50);&lt;br /&gt;   v_runid            NUMBER(10, 0);&lt;br /&gt;   v_count_run_conns  INTEGER := 0;&lt;br /&gt;   v_temp_runs        INTEGER;&lt;br /&gt;&lt;br /&gt;BEGIN&lt;br /&gt;   DELETE FROM temp_runs;&lt;br /&gt;&lt;br /&gt;   DELETE FROM temp_run_connections;&lt;br /&gt;&lt;br /&gt;   INSERT INTO temp_runs&lt;br /&gt;        ( run_id )&lt;br /&gt;   SELECT DISTINCT i.run_id&lt;br /&gt;   FROM   event_status i&lt;br /&gt;        , run_status    b&lt;br /&gt;   WHERE  i.run_id = b.run_id&lt;br /&gt;   AND    i.event_id IN&lt;br /&gt;          ( SELECT DISTINCT i.event_id&lt;br /&gt;            FROM   event_status i&lt;br /&gt;                 , run_status   b&lt;br /&gt;            WHERE  i.run_id = b.run_id&lt;br /&gt;            AND    b.customer_id = p_customer_id&lt;br /&gt;            GROUP  BY i.event_id&lt;br /&gt;            HAVING COUNT(i.run_id) &gt; 1)&lt;br /&gt;            AND    b.customer_id = p_customer_id;&lt;br /&gt;&lt;br /&gt;   BEGIN&lt;br /&gt;       v_temp_runs := 0;&lt;br /&gt;       SELECT COUNT(*)&lt;br /&gt;       INTO   v_temp_runs&lt;br /&gt;       FROM   dual&lt;br /&gt;       WHERE  EXISTS&lt;br /&gt;              ( SELECT *&lt;br /&gt;                FROM   temp_runs );&lt;br /&gt;   END;&lt;br /&gt;&lt;br /&gt;   IF v_temp_runs &gt; 0 THEN&lt;br /&gt;  &lt;br /&gt;       DECLARE&lt;br /&gt;           CURSOR c_runs IS&lt;br /&gt;               SELECT DISTINCT run_id&lt;br /&gt;               FROM   temp_runs;&lt;br /&gt;       BEGIN&lt;br /&gt;           OPEN c_runs;&lt;br /&gt;           FETCH c_runs INTO v_runid;&lt;br /&gt;&lt;br /&gt;           IF c_runs%NOTFOUND&lt;br /&gt;           THEN&lt;br /&gt;               v_sql_status1   := 2;&lt;br /&gt;               v_fetch_status1 := -1;&lt;br /&gt;           ELSE&lt;br /&gt;               v_sql_status1   := 0;&lt;br /&gt;               v_fetch_status1 := 0;&lt;br /&gt;           END IF;&lt;br /&gt;      &lt;br /&gt;           WHILE v_fetch_status1 = 0&lt;br /&gt;           LOOP&lt;br /&gt;               BEGIN&lt;br /&gt;                   DECLARE&lt;br /&gt;                       CURSOR cust_incidents_cs IS&lt;br /&gt;                      &lt;br /&gt;                           SELECT DISTINCT i.event_id&lt;br /&gt;                           FROM   event_status i&lt;br /&gt;                           WHERE  i.run_id = v_runid&lt;br /&gt;                           AND    i.rejected = 0;&lt;br /&gt;                   BEGIN&lt;br /&gt;                       OPEN cust_incidents_cs;&lt;br /&gt;                  &lt;br /&gt;                       FETCH cust_incidents_cs INTO v_event_id;&lt;br /&gt;&lt;br /&gt;                       IF cust_incidents_cs%NOTFOUND&lt;br /&gt;                       THEN&lt;br /&gt;                           v_sql_status   := 2;&lt;br /&gt;                           v_fetch_status := -1;&lt;br /&gt;                       ELSE&lt;br /&gt;                           v_sql_status   := 0;&lt;br /&gt;                           v_fetch_status := 0;&lt;br /&gt;                       END IF;&lt;br /&gt;&lt;br /&gt;                       &lt;&lt;i_loop1&gt;&gt;&lt;br /&gt;                       WHILE v_fetch_status = 0&lt;br /&gt;                       LOOP&lt;br /&gt;                           BEGIN&lt;br /&gt;                               INSERT INTO temp_run_connections&lt;br /&gt;                                    ( run_id&lt;br /&gt;                                    , connectedids)&lt;br /&gt;                               SELECT DISTINCT v_runid&lt;br /&gt;                                    , i.run_id AS connectedids&lt;br /&gt;                               FROM   event_status i&lt;br /&gt;                               WHERE  i.run_id &lt; v_runid&lt;br /&gt;                               AND    i.event_id = v_event_id&lt;br /&gt;                               AND    i.rejected = 0&lt;br /&gt;                               AND    i.run_id IN&lt;br /&gt;                                      ( SELECT DISTINCT run_id&lt;br /&gt;                                        FROM   temp_runs );&lt;br /&gt;&lt;br /&gt;                               &lt;&lt;fetchnext&gt;&gt;&lt;br /&gt;                               FETCH cust_incidents_cs INTO v_event_id;&lt;br /&gt;&lt;br /&gt;                               IF cust_incidents_cs%NOTFOUND&lt;br /&gt;                               THEN&lt;br /&gt;                                   v_sql_status   := 2;&lt;br /&gt;                                   v_fetch_status := -1;&lt;br /&gt;                               ELSE&lt;br /&gt;                                   v_sql_status   := 0;&lt;br /&gt;                                   v_fetch_status := 0;&lt;br /&gt;                               END IF;&lt;br /&gt;                           END;&lt;br /&gt;                       END LOOP;&lt;br /&gt;&lt;br /&gt;                       CLOSE cust_incidents_cs;&lt;br /&gt;                   END;&lt;br /&gt;              &lt;br /&gt;                   FETCH c_runs INTO v_runid;&lt;br /&gt;&lt;br /&gt;                   IF c_runs%NOTFOUND&lt;br /&gt;                   THEN&lt;br /&gt;                       v_sql_status1   := 2;&lt;br /&gt;                       v_fetch_status1 := -1;&lt;br /&gt;                   ELSE&lt;br /&gt;                       v_sql_status1   := 0;&lt;br /&gt;                       v_fetch_status1 := 0;&lt;br /&gt;                   END IF;&lt;br /&gt;               END;&lt;br /&gt;           END LOOP;&lt;br /&gt;           CLOSE c_runs;&lt;br /&gt;       END;&lt;br /&gt;   END IF;&lt;br /&gt;&lt;br /&gt;   SELECT COUNT(*)&lt;br /&gt;   INTO   v_count_run_conns&lt;br /&gt;   FROM   temp_run_connections;&lt;br /&gt;&lt;br /&gt;   IF v_count_run_conns &gt; 0&lt;br /&gt;   THEN&lt;br /&gt;       OPEN pc_results_out FOR&lt;br /&gt;           SELECT DISTINCT run_id, connectedids&lt;br /&gt;           FROM   temp_run_connections;&lt;br /&gt;   END IF;&lt;br /&gt;&lt;br /&gt;END getupdatedrunids;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;His final version was much faster. See if you can spot the difference:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;CREATE OR REPLACE PROCEDURE getupdatedrunids&lt;br /&gt;   ( p_customer_id  IN VARCHAR2 DEFAULT NULL&lt;br /&gt;   , pc_results_out IN OUT SYS_REFCURSOR )&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;   OPEN pc_results_out FOR&lt;br /&gt;       SELECT DISTINCT e2.run_id, ic.run_id AS connectedids&lt;br /&gt;       FROM   run_status r1&lt;br /&gt;            , run_status r2&lt;br /&gt;            , event_status e1&lt;br /&gt;            , event_status e2&lt;br /&gt;       WHERE  r1.customer_id = p_customer_id&lt;br /&gt;       AND    r2.customer_id = r1.customer_id&lt;br /&gt;       AND    e1.run_id = r2.run_id&lt;br /&gt;       AND    e1.rejected = 0&lt;br /&gt;       AND    e2.run_id = r1.run_id&lt;br /&gt;       AND    e2.event_id = e1.event_id&lt;br /&gt;       AND    e2.run_id &gt; e1.run_id&lt;br /&gt;       AND    e2.rejected = 0&lt;br /&gt;       ORDER BY 1, 2;&lt;br /&gt;&lt;br /&gt;END getupdatedrunids;&lt;/pre&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6248559556861583639?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6248559556861583639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6248559556861583639' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6248559556861583639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6248559556861583639'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/fine-tuning-oracle.html' title='Fine tuning  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6635951020667144730</id><published>2008-08-06T21:50:00.000-07:00</published><updated>2008-08-06T21:51:28.551-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>Auxiliary Constructs Appeal  ....oracle</title><content type='html'>Will somebody give this guy some auxiliary constructs? He just needs to know what's the auxiliary constructs, and examples in the auxiliary constructs. So if you have any auxiliary constructs you don't need, now's the time to dig deep. The appeal starts here.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6635951020667144730?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6635951020667144730/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6635951020667144730' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6635951020667144730'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6635951020667144730'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/auxiliary-constructs-appeal-oracle.html' title='Auxiliary Constructs Appeal  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1259134772052419450</id><published>2008-08-06T21:48:00.000-07:00</published><updated>2008-08-06T21:50:38.699-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='the oracle'/><title type='text'>TGI g_friday  ....oracle</title><content type='html'>&lt;p&gt;Found in a package body:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;g_friday CONSTANT VARCHAR2(6) := 'Friday';&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;...then a couple of hundred lines later:&lt;/p&gt; &lt;blockquote&gt;&lt;pre&gt;if to_char(business_date,'fmDay') = g_friday then&lt;br /&gt;   &lt;i&gt;...end-of-week processing...&lt;/i&gt;&lt;br /&gt;else&lt;br /&gt;   &lt;i&gt;...regular processing...&lt;/i&gt;&lt;br /&gt;end if;&lt;/pre&gt;&lt;/blockquote&gt; &lt;p&gt;Now that's flexible. If end-of-week processing is ever moved to the weekend, all you have to do is set &lt;tt&gt;g_friday := 'Saturday'&lt;/tt&gt;.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1259134772052419450?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1259134772052419450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1259134772052419450' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1259134772052419450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1259134772052419450'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/08/tgi-gfriday-oracle.html' title='TGI g_friday  ....oracle'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6694386531024173680</id><published>2008-07-14T05:50:00.000-07:00</published><updated>2008-07-14T05:51:59.150-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.1.3.2.1'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='BISE1'/><category scheme='http://www.blogger.com/atom/ns#' term='downloads'/><title type='text'>BI for the Masses - is here! (BI SE1)</title><content type='html'>&lt;p&gt;Ever thought what you could get for $5,000? Five thousand dollars? Apart from a year's worth of mortgage payments on my apartment (and that would also change depending on the currency rate fluctuations - mind you my loan is rupee denominated, I am just getting a bit carried away with this analogy), I can think of Oracle Business Intelligence. Yes. Oracle Business Intelligence Suite Standard Edition One is now available for download from OTN. Let's just call it BI SE1 and forget for a minute all the branding and marketing people who may get very, very angry with me for messing up with the branding of the product (there are others also who I may piss off, but अब किसे याद रखूँ और किसे भूलूं, आख़िर दुनिया भर का ठेका तो नहीँ लिया है मैने|)।&lt;br /&gt;&lt;br /&gt;OK, so BI SE1 is available for download from OTN। I already said that, didn't I? Right. Where can you get it? From the OTN download page, where else? &lt;a href="http://www.oracle.com/technology/software/products/ias/htdocs/101321biseone.html"&gt;Here&lt;/a&gt;.&lt;br /&gt;And just what exactly does this BI SE1 package contain? The kitchen sink, almost.&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Oracle Database Standard Edition One (version 10.2)&lt;/li&gt;&lt;li&gt;Oracle Warehouse Builder (core ETL only) (version 10.2)&lt;/li&gt;&lt;li&gt;Oracle Business Intelligence Answers (version 10.1.3.2.1)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Oracle Business Intelligence Dashboard&lt;/li&gt;&lt;li&gt;Oracle Business Intelligence Publisher&lt;/li&gt;&lt;li&gt;Oracle Business Intelligence Server&lt;/li&gt;&lt;li&gt;Oracle Business Intelligence Server Administrator&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Each of these products is best-in-class, mind you. The Oracle Database, of course. Oracle Warehouse Builder is recognized as a leader among ETL tools. And BI Suite Enterprise Edition is a big reason why so many analysts, including Gartner, have recognized Oracle as a leader in BI Platforms. BI Publisher is a world class, performant, scalable, and mighty easy to use enterprise class reporting product. So there!&lt;br /&gt;&lt;br /&gt;And what did I mean by the $5000 figure? I was lying, to be truthful. BI SE1 is licensed at $1000 per user, with a minimum of five users. So that means that the actual pricing for the entire kitchen sink is $1000!! But of course you would want to share the wonders of this product with more than just one user, right? Of course you would!&lt;br /&gt;&lt;br /&gt;To download the product, go to &lt;a href="http://www.oracle.com/technology/software/products/ias/htdocs/101321biseone.html"&gt;this link&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.oracle.com/technology/software/products/ias/htdocs/101321biseone.html"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_npWFFuYus3I/Rm5bhjhSjxI/AAAAAAAAAWM/-o9yi1S2uTE/s400/5190.PNG" alt="" id="BLOGGER_PHOTO_ID_5075094462121807634" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There are two tiny files that need to be downloaded. How tiny are we talking? Oh, just about 2.9GB (3,073,149,672 bytes to be precise). That shall take some time.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.oracle.com/technology/software/products/ias/htdocs/101321biseone.html"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_npWFFuYus3I/Rm5bhzhSjyI/AAAAAAAAAWU/yXinV8LWxME/s400/5192.PNG" alt="" id="BLOGGER_PHOTO_ID_5075094466416774946" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While you wait for these tiny files to download, you may want to check the &lt;span style="font-weight: bold;"&gt;doc library&lt;/span&gt; for this suite. That would be &lt;a href="http://download-west.oracle.com/docs/cd/E10352_01/doc/nav/portal_booklist.htm"&gt;this link&lt;/a&gt;.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://download-west.oracle.com/docs/cd/E10352_01/doc/nav/portal_booklist.htm"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_npWFFuYus3I/Rm5biDhSjzI/AAAAAAAAAWc/ZRoA5Pn6vc8/s400/5193.PNG" alt="" id="BLOGGER_PHOTO_ID_5075094470711742258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;As you would see, apart from the regular doc on the Oracle Database, Oracle Warehouse Builder, and Oracle BI Publisher, there is one doc introducing BI SE1, and a bunch of tutorials.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://download-west.oracle.com/docs/cd/E10352_01/doc/nav/portal_booklist.htm"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_npWFFuYus3I/Rm5biDhSj0I/AAAAAAAAAWk/ZhCYomyToQc/s400/5194.PNG" alt="" id="BLOGGER_PHOTO_ID_5075094470711742274" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click the 'Getting Started' tab, and there are at least two other links of interest:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Business Intelligence Standard Edition One &lt;span style="font-weight: bold;"&gt;Install Guide&lt;/span&gt; (&lt;a href="http://download-west.oracle.com/docs/cd/E10352_01/doc/bi.1013/e10270/toc.htm"&gt;HTML&lt;/a&gt;,  &lt;a href="http://download-west.oracle.com/docs/cd/E10352_01/doc/bi.1013/e10270.pdf"&gt;PDF&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;Business Intelligence Standard Edition One &lt;span style="font-weight: bold;"&gt;Tutorial&lt;/span&gt; (&lt;a href="http://download-west.oracle.com/docs/cd/E10352_01/doc/bi.1013/e10312/toc.htm"&gt;HTML&lt;/a&gt;, &lt;a href="http://download-west.oracle.com/docs/cd/E10352_01/doc/bi.1013/e10312.pdf"&gt;PDF&lt;/a&gt;). The tutorial is a 226 page document that covers all topics you would expect, like how to setup the tutorial data mart, the BI repository, how to analyze data, publish reports, create Dashboards)&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;More tutorials are hosted on OTN &lt;a href="http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/index.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;    Creating Interactive Dashboards and Using Oracle Business Intelligence Answers&lt;/li&gt;&lt;li&gt;    Creating a Repository Using the Oracle Business Intelligence Administration Tool&lt;/li&gt;&lt;li&gt;    Installing the Oracle Business Intelligence Enterprise Edition on Windows&lt;/li&gt;&lt;li&gt;    Using Oracle OLAP With Oracle Business Intelligence Enterprise Edition&lt;/li&gt;&lt;li&gt;    Integrating Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition&lt;/li&gt;&lt;li&gt; Sending Alerts Using Oracle Business Intelligence Delivers (Delivers is not part of BI SE1, but a little knowledge can't hurt, can it?)&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6694386531024173680?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6694386531024173680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6694386531024173680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6694386531024173680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6694386531024173680'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/bi-for-masses-is-here-bi-se1.html' title='BI for the Masses - is here! (BI SE1)'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_npWFFuYus3I/Rm5bhjhSjxI/AAAAAAAAAWM/-o9yi1S2uTE/s72-c/5190.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-352541443766118545</id><published>2008-07-14T04:53:00.000-07:00</published><updated>2008-07-14T04:55:10.364-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='etcetera'/><title type='text'>Never enough space - dwitiya</title><content type='html'>I really, really need to do some cleaning up... (no, not personal hygiene, but that too).&lt;br /&gt;See my earlier post for some context (&lt;a href="http://oraclebi.blogspot.com/2007/05/there-never-is-too-much-email-space.html"&gt;There is never too much email space&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_npWFFuYus3I/Rm5jwjhSj1I/AAAAAAAAAWs/QP6hsNhEmU0/s1600-h/5196.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_npWFFuYus3I/Rm5jwjhSj1I/AAAAAAAAAWs/QP6hsNhEmU0/s400/5196.PNG" alt="" id="BLOGGER_PHOTO_ID_5075103515912867666" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-352541443766118545?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/352541443766118545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=352541443766118545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/352541443766118545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/352541443766118545'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/never-enough-space-dwitiya.html' title='Never enough space - dwitiya'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_npWFFuYus3I/Rm5jwjhSj1I/AAAAAAAAAWs/QP6hsNhEmU0/s72-c/5196.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-3807251543780415388</id><published>2008-07-14T04:51:00.000-07:00</published><updated>2008-07-14T04:53:46.105-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='10.1.3.2.1'/><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer'/><category scheme='http://www.blogger.com/atom/ns#' term='BISE1'/><title type='text'>Similar sounding names can be confusing</title><content type='html'>As I remarked in my earlier post, I am no branding expert (gold medal from IIM Bangalore notwithstanding - heh heh... I had to say that), so I cannot comment on why the names for the three editions of Oracle Business Intelligence were chosen the way they are:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/bi/standard-edition-one.html"&gt;Oracle BI Standard Edition One&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/bi/standard-edition.html"&gt;BI Standard Edition (SE)&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/bi/enterprise-edition.html"&gt;BI Suite Enterprise Edition (EE)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Actually, to be fair, I can comment with some insight into these names... These naming conventions are also in use by the Oracle Database and the Oracle Application Server.&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;Oracle Database 10g&lt;span style="font-style: italic;font-family:georgia;" &gt;&lt;/span&gt; &lt;/span&gt;is available in these editions: Standard Edition, Standard Edition One,  Edition, and also the free Express Edition.&lt;br /&gt;The &lt;span style="font-weight: bold;"&gt;Oracle Application Server 10g&lt;/span&gt; is available in the following editions (&lt;a href="http://www.oracle.com/appserver/index.html"&gt;link&lt;/a&gt;): Enterprise Edition, Standard Edition, Standard Edition One, and Java Edition.&lt;br /&gt;&lt;br /&gt;Therefore, goes the thinking, BI should also follow the same convention. Which it does. The BI SE1 bundle is a subset of the BI EE bundle (it is missing Delivers for example), but with some additional products packaged (like the Oracle Database and Oracle Warehouse Builder), and with a lower price entry point. We don't have an 'Enterprise Edition One' bundle in either the Oracle Database or the Oracle Application Server, so to have a BI EE1 name may have confused people, though my **personal** preference would have been to name it so. Yeah, who cares about my opinion, personal or otherwise?&lt;br /&gt;&lt;br /&gt;BI Standard Edition is unchanged: Discoverer is an integral part of BI SE, and will continue to do so.&lt;br /&gt;&lt;br /&gt;Hope that clarifies...&lt;br /&gt;&lt;br /&gt;And while on the subject of BI SE1, here is what the installer screen looks like: a native OUI screen, with some tweaks...&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_npWFFuYus3I/Rm59dzhSj2I/AAAAAAAAAW0/0Y9UW4_KbQU/s1600-h/5198.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_npWFFuYus3I/Rm59dzhSj2I/AAAAAAAAAW0/0Y9UW4_KbQU/s400/5198.PNG" alt="" id="BLOGGER_PHOTO_ID_5075131781092642658" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;I am trying to find a machine where I can install all of this... I have BI SE 10.1.2 installed on one, BI 10.1.3.3.0 installed on the same machine and also on my work laptop, so I am pretty much looking at installing this on a VMWare image. If I get to it soon enough I shall do a post, else there are always the tutorials, OBEs, and the doc.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-3807251543780415388?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/3807251543780415388/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=3807251543780415388' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3807251543780415388'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/3807251543780415388'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/similar-sounding-names-can-be-confusing.html' title='Similar sounding names can be confusing'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_npWFFuYus3I/Rm59dzhSj2I/AAAAAAAAAW0/0Y9UW4_KbQU/s72-c/5198.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4403257953768683753</id><published>2008-07-14T04:50:00.000-07:00</published><updated>2008-07-14T04:51:38.216-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer'/><title type='text'>Updated Discoverer Statement of Direction</title><content type='html'>Mike Durran, product manager for Discoverer and BI SE, has posted an updated statement of direction for Discoverer on OTN. Get the PDF &lt;a href="http://www.oracle.com/technology/products/discoverer/pdf/discoverer_sod_2007.pdf"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4403257953768683753?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4403257953768683753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4403257953768683753' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4403257953768683753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4403257953768683753'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/updated-discoverer-statement-of.html' title='Updated Discoverer Statement of Direction'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1445918729973250889</id><published>2008-07-14T04:48:00.000-07:00</published><updated>2008-07-14T04:50:08.850-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer'/><title type='text'>Latest Discoverer Statement of Direction</title><content type='html'>The latest Discoverer Statement of Direction is now available from OTN:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/discoverer/index.html"&gt;http://www.oracle.com/technology/products/discoverer/index.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;or a direct link to the document:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/products/discoverer/pdf/discoverer_sod_2007.pdf"&gt;http://www.oracle.com/technology/products/discoverer/pdf/discoverer_sod_2007.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;There will also be a session at the &lt;a href="http://www.odtugkaleidoscope.com/"&gt;ODTUG&lt;/a&gt; conference next week in Daytona Beach covering the Discoverer roadmap and plans to integrate with Oracle BI Enterprise Edition.&lt;br /&gt;&lt;br /&gt;Hope to see you there !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1445918729973250889?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1445918729973250889/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1445918729973250889' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1445918729973250889'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1445918729973250889'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/latest-discoverer-statement-of.html' title='Latest Discoverer Statement of Direction'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5620780015918322516</id><published>2008-07-14T04:47:00.000-07:00</published><updated>2008-07-14T04:48:40.862-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BISE1'/><title type='text'>Interesting issue when downloading BI SE1</title><content type='html'>&lt;p&gt;When downloading &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;BISE&lt;/span&gt;1 I faced an interesting problem. After some initial puzzlement I figured out it has something to do with IE (Internet Explorer).&lt;br /&gt;&lt;br /&gt;There are two files you have to download for &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;BISE&lt;/span&gt;1 from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;OTN&lt;/span&gt;:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;http://download.oracle.com/otn/nt/ias/101321/biseone_windows_x86_101321_dvd.z01&lt;br /&gt;and&lt;/li&gt;&lt;li&gt;http://download.oracle.com/otn/nt/ias/101321/biseone_windows_x86_101321_dvd.zip&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;These two files have the same name, except for the extension. The first one is "&lt;span style="font-weight: bold;"&gt;z01&lt;/span&gt;" and the second "&lt;span style="font-weight: bold;"&gt;zip&lt;/span&gt;".&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_npWFFuYus3I/RnlPEDhSj7I/AAAAAAAAAXc/xg_tKIrKyRM/s1600-h/5349.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_npWFFuYus3I/RnlPEDhSj7I/AAAAAAAAAXc/xg_tKIrKyRM/s400/5349.PNG" alt="" id="BLOGGER_PHOTO_ID_5078176985919950770" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;Firefox&lt;/span&gt;, the file extensions are preserved the way they are, so that the two files are distinct when downloaded. No problem here - see the screenshot below.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_npWFFuYus3I/RnlPEThSj8I/AAAAAAAAAXk/aFXV1-BpnYk/s1600-h/5351.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp2.blogger.com/_npWFFuYus3I/RnlPEThSj8I/AAAAAAAAAXk/aFXV1-BpnYk/s400/5351.PNG" alt="" id="BLOGGER_PHOTO_ID_5078176990214918082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But when trying to download it using IE, the extension is changed to .zip&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_npWFFuYus3I/RnlPEDhSj6I/AAAAAAAAAXU/GL4is4tLiiE/s1600-h/5347.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_npWFFuYus3I/RnlPEDhSj6I/AAAAAAAAAXU/GL4is4tLiiE/s400/5347.PNG" alt="" id="BLOGGER_PHOTO_ID_5078176985919950754" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;IE for some reason decides that z01 should really map to zip, so that downloading both files results in one being overwritten.&lt;br /&gt;So the solution, workaround, is to download them using the "Save As" option, manually specify the extensions to avoid this problem...&lt;br /&gt;&lt;br /&gt;Wonder why this is happening why the way it is - this happened to me on two separate machines, and at least one other person from the field faced the same issue.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5620780015918322516?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5620780015918322516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5620780015918322516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5620780015918322516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5620780015918322516'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/interesting-issue-when-downloading-bi.html' title='Interesting issue when downloading BI SE1'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_npWFFuYus3I/RnlPEDhSj7I/AAAAAAAAAXc/xg_tKIrKyRM/s72-c/5349.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-8223432717993522972</id><published>2008-07-14T04:46:00.000-07:00</published><updated>2008-07-14T04:47:37.187-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='BISE1'/><title type='text'>CRN Article on BI SE1</title><content type='html'>CRN has &lt;a href="http://www.crn.com/small-business/200000332"&gt;this article&lt;/a&gt; on the Oracle Business Intelligence Suite Standard Edition One launched earlier this month (also see my earlier posts - &lt;a href="http://oraclebi.blogspot.com/2007/06/bi-for-masses-is-here-bi-se1.html"&gt;this&lt;/a&gt; and &lt;a href="http://oraclebi.blogspot.com/2007/06/similar-sounding-names-can-be-confusing.html"&gt;this&lt;/a&gt;).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-8223432717993522972?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/8223432717993522972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=8223432717993522972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8223432717993522972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/8223432717993522972'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/crn-article-on-bi-se1.html' title='CRN Article on BI SE1'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-589717643303244040</id><published>2008-07-14T04:41:00.000-07:00</published><updated>2008-07-14T04:44:36.607-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><title type='text'>What no GUI? How to Build Analytic Workspaces using scripts</title><content type='html'>&lt;p&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;What no GUI? How to Build Analytic Workspaces using scripts&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Recently on the OLAP OTN forum there have been a number of questions regarding the use of scripting to control the design, build and maintenance procedures for analytic workspace. There are many reasons for using scripting rather than using Analytic Workspace Manager to build and maintain an AW. Many DBAs prefer to use scripts because they can be scheduled and/or quickly and easily moved from one platform to another without having to install any GUI components. Most likely scenario is that for the production environment a direct connection from a GUI client tool is not allowed. Obviously if you are using Warehouse Builder this is not a problem as OWB will automatically generate deployment and maintenance scripts that do not require execution via the GUI. However, when you are just using AWM things can get a little complicated.&lt;br /&gt;&lt;br /&gt;As there is so much information to cover I am going to break this into a series of postings. The purpose of this one is to provide a brief summary of some of the ways to create and define objects within an AW from the command line.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Part 1 : How to create a new AW &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It is possible to create an AW from the command line by using the AW_ATTACH procedure. The AW_ATTACH procedure attaches an existing analytic workspace to your SQL session so that you can access its contents. The analytic workspace remains attached until you explicitly detach it, or you end your session. AW_ATTACH can also be used to create a new analytic workspace, but the AW_CREATE procedure is provided specifically for that purpose.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;DBMS_AW.AW_ATTACH ( &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    awname        IN VARCHAR2,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    forwrite      IN BOOLEAN DEFAULT FALSE,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    createaw      IN BOOLEAN DEFAULT FALSE,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    attargs       IN VARCHAR2 DEFAULT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;    tablespace    IN VARCHAR2 DEFAULT NULL);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Notice using the scripting approach it is possible to set the default tablespace for the AW, a feature that is missing from the GUI. For example, the next SQL call creates the AW GLOBAL_PROGRAMS as the last user-owned analytic workspace in tablespace USERS:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;EXECUTE DBMS_AW.AW_ATTACH('global_programs', true, true, 'last', ‘USERS’);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Alternatively you can go a step further and use the AW_CREATE command, which provides more control in some areas and less control in others. The AW_CREATE procedure creates a new, empty analytic workspace.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:courier new;font-size:85%;"  &gt;DBMS_AW.AW_CREATE (&lt;br /&gt; awname        IN VARCHAR2 ,&lt;br /&gt; tablespace    IN VARCHAR2 DEFAULT NULL ,&lt;br /&gt; partnum       IN NUMBER DEFAULT 8);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;For example, the next command creates an analytic workspace named GLOBAL_AW. The resulting table AW$GLOBAL_AW will have two partitions and will be stored in the GLOBAL tablespace.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;EXECUTE DBMS_AW.AW_CREATE('global_aw', 'global', 2);&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With the AW_CREATE command it is possible to control the number of partitions, which is a very useful feature. But you do lose some control over where the AW is created in the attach list. This is only important if you have multiple AWs attached during the creation process. So why do we have two different procedures to create AWs? I have no idea but I am sure it seemed like a good idea at the time.&lt;br /&gt;&lt;br /&gt;Now we have an empty AW, the next step is to start adding objects, possibly some data as well, to the AW. There are two options:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Import objects and data from an existing EIF file&lt;/li&gt;&lt;li&gt;Import objects based on existing XML documents&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-weight: bold;"&gt;Part 2a - Importing an existing EIF file&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you already have an EIF file from an existing AW, the next step is import that file into your new AW. Ideally, the EIF file will contain all the required standard form metadata. If this is not the case and the EIF file is from an older version of Oracle OLAP, or Oracle Express, then you will need to have a different approach. Another blog entry will deal with the upgrade process.&lt;br /&gt;&lt;br /&gt;To run the import process you need to place the EIF file in a directory on the file system then make a directory within the database to point to that filestore. We can use OLAP DML commands wrapped within the DBMS_AW.EXECUTE procedure to import the EIF file from the command line. Personally I prefer to make two passes through the EIF file, firstly to create the objects and then to load the data. This goes back to the good old days of Express and ensured efficient storage within the database files. Not sure if this still applies to 10g OLAP schemas, but as old habits die hard, here is the two pass process:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('aw attach name_of_analytic_workspace');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('cda scripts');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('import all from eif file ''global.eif'' dfns');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('update');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('commit');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('import all from eif file ''global.eif'' data');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('update');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('commit');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The assumption here is the EIF file being used contains objects defined in standard form. If this is not the case then you will need to run a conversion process to generate standard form metadata.&lt;br /&gt;&lt;br /&gt;Some warning signs need to set here : The import process above is going to load data into the analytic workspace with no commit point until the very end. Therefore, you need to make sure you have plenty of storage space within your TEMP tablespace, otherwise it is likely the import will fail with one of a number of error messages relating to memory and/or temp space issues. It is possible to control the update process by using the UPDATE keyword. For example:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('import all from eif file ''global.eif'' data UPDATE');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Will force an update after each object has been loaded. This is fine until you hit a very large cube when you may need slight more detailed control over the update process. The EIFUPDBYTES option lets you define the volume of data to read between updates. The following command will update after each block of 500,000 bytes has been loaded.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('EIFUPDBYTES = 500000’&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('import all from eif file ''global.eif'' data UPDATE');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Obviously, by executing continual updates during the import the whole process will take much longer to complete than a single read with a final commit point at the end. But in the end “you pays your money and takes your choice” as they say.&lt;br /&gt;&lt;br /&gt;One major problem with EIF imports is that most people create a single EIF file, which creates problems if you need to recover from a failed import process. Why? Because you have to start right at the beginning and import the whole thing all over again. Or you would think! The EIF file is in fact quite smart in terms of its contents. It is possible to get a list from the file of the actual contents so in reality it is possible to recover from a failed import process by checking what was imported and now resident in the AW and what is left to import from the EIF file. Requires a bit of OLAP DML skill…something for another blog posting perhaps?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Part 2b - Importing an existing XML definition&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Each of the create procedures described above generates a completely blank AW. There is no standard form metadata contained within the resulting AW. Before you can import an XML template into the AW, standard form metadata needs to be added. The only way to do this seemed to be to use AWM (or right your own Java procedure to call the AWXML API). After a bit of digging I did discover the following an undocumented features called create_db_stdform. This is referenced in older versions of the OLAP documentation set and the syntax is as follows:&lt;br /&gt;&lt;ul  style="font-family:courier new;"&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;call create_db_stdform('my_aw_name','rw')&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;There is more information on Mark Rittman’s excellent blog website, where one of his posts covers migrating from previous versions of Express to 9i OLAP. The full article is on Mark’s website at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.rittmanmead.com/2003/10/30/creating-database-standard-form-analytic-workspaces/"&gt;http://www.rittmanmead.com/2003/10/30/creating-database-standard-form-analytic-workspaces/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;To execute this command we can use the normal process as follows:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_aw.execute ('call create_db_stdform(''global_aw'' ''rw'');&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Now the AW will appear in AWM under the Model View and it is now possible to start creating dimensions and cubes. However, the purpose of this blog is to explain how not to use the GUI!&lt;br /&gt;The next stage is to use existing XML template documents to define the objects within the AW. As far as I can tell there are no command line tools to create an AW XML definition for an existing object in an existing AW. The only way to do this is to use the Analytic Workspace Manager and the right mouse click menu options, or use the Generate feature in Warehouse Builder (Unless someone knows how to do this from the command line?).&lt;br /&gt;&lt;br /&gt;So, assuming you have all the required XML files to create the dimensions and cubes for your new AW, the process for importing these files is very simple. There are to procedures you can use:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;EXECUTEFILE&lt;/li&gt;&lt;ul&gt;&lt;li&gt;creates all or part of a standard form analytic workspace from an XML document stored in a text file.&lt;/li&gt;&lt;/ul&gt;&lt;li&gt;EXECUTE&lt;/li&gt;&lt;ul&gt;&lt;li&gt;creates all or part of a standard form analytic workspace from an XML document stored in a CLOB.&lt;/li&gt;&lt;/ul&gt;&lt;/ul&gt;The EXECUTEFILE function is the easier to use of the two functions. Assuming you have generated an XML definition of your AW you will also need to define a directory within the database that points to the location of the XML file(s). In the example below the directory SCRIPTS was created and the definition for AW is contained within the file GLOBAL.XML and the whole command is wrapped by the DBMS_OUTPUT.PUT_LINE function so that the "Success" message returned by EXECUTEFILE is displayed:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;SQL&gt;execute dbms_output.put_line(dbms_aw_xml.executefile('SCRIPTS', 'GLOBAL.XML'));Success&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The EXECUTE approach is slight more complicated but achieves exactly the same result. So why do we have two ways of achieving the same thing? Who knows, as I said before I am sure there is a very good reason?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-family:courier new;"&gt;--Use DBMS_LOB package to create a clob&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   DECLARE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      clb CLOB;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      infile BFILE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      dname varchar2(500);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   BEGIN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Create a temporary clob&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_LOB.CREATETEMPORARY(clb, TRUE,10);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Create a BFILE use BFILENAME function&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;   -- Use file GLOBAL.XML in the SCRIPTS directory object.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      infile := BFILENAME('SCRIPTS', 'GLOBAL.XML');&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Open the BFILE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_LOB.fileopen(infile, dbms_lob.file_readonly);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Load temporary clob from the BFILE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_LOB.LOADFROMFILE(clb,infile,DBMS_LOB.LOBMAXSIZE, 1, 1); &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Close the BFILE&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_LOB.fileclose(infile);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Create the GLOBAL analytic workspace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_OUTPUT.PUT_LINE(DBMS_AW_XML.execute(clb));&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_AW.AW_UPDATE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   -- Free the Temporary Clob&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      DBMS_LOB.FREETEMPORARY(clb);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   EXCEPTION&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;     WHEN OTHERS&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;      THEN&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;       DBMS_OUTPUT.PUT_LINE(SQLERRM);&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:courier new;"&gt;   END;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;   /&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and there it is. A new standard form analytic workspace created and populated with base objects (dimensions and cubes) without using a GUI. In the next blog posting I will explain how to maintain cubes and dimensions without using the GUI.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-589717643303244040?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/589717643303244040/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=589717643303244040' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/589717643303244040'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/589717643303244040'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/what-no-gui-how-to-build-analytic.html' title='What no GUI? How to Build Analytic Workspaces using scripts'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2198377770034730431</id><published>2008-07-14T04:37:00.002-07:00</published><updated>2008-07-14T04:39:14.766-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hyperion'/><category scheme='http://www.blogger.com/atom/ns#' term='BI Enterprise Edition'/><category scheme='http://www.blogger.com/atom/ns#' term='downloads'/><title type='text'>Hyperion products now available for download</title><content type='html'>&lt;p&gt;Firstly, if you want to try out the Hyperion BI products, you can do so by going to &lt;a href="http://edelivery.oracle.com/"&gt;http://edelivery.oracle.com/&lt;/a&gt; and select "&lt;span style="font-weight: bold;"&gt;Hyperion Performance Management and BI&lt;/span&gt;" from the "Product Pack" dropdown. This then results in the following products that are available to download:&lt;br /&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Hyperion Performance Management and BI (9.3.x)&lt;/li&gt;&lt;li&gt;Hyperion Performance Management and BI (9.2.x)&lt;/li&gt;&lt;li&gt;Hyperion Enterprise Release (6.4.1)&lt;/li&gt;&lt;li&gt;Hyperion Business Modeling (4.0.5)&lt;/li&gt;&lt;li&gt;Hyperion Application Link (9.x) Media Pack&lt;/li&gt;&lt;/ol&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_npWFFuYus3I/Rp2u1BC8Y-I/AAAAAAAAAbg/Sk2SoYFRV3Q/s1600-h/5791.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_npWFFuYus3I/Rp2u1BC8Y-I/AAAAAAAAAbg/Sk2SoYFRV3Q/s320/5791.PNG" alt="" id="BLOGGER_PHOTO_ID_5088415379835610082" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_npWFFuYus3I/Rp2u1RC8Y_I/AAAAAAAAAbo/QtmG--Czux4/s1600-h/5792.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_npWFFuYus3I/Rp2u1RC8Y_I/AAAAAAAAAbo/QtmG--Czux4/s320/5792.PNG" alt="" id="BLOGGER_PHOTO_ID_5088415384130577394" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can download individual product components where available, a license key, and also the product documentation - which is a good place to begin.&lt;br /&gt;&lt;br /&gt;Secondly, to view a brief description of what these products are, at least at the 'platform' level, go to this page on OTN: &lt;a href="http://www.oracle.com/technology/products/bi/enterprise-edition-platform.html"&gt;Oracle Business Intelligence Platform Home&lt;/a&gt;. You shall find the following four Hyperion products listed as part of "Oracle Business Intelligence Enterprise Edition Plus"&lt;br /&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Interactive Reporting &lt;/span&gt;: Intuitive and highly interactive ad-hoc reporting&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;SQR Production Reporting&lt;/span&gt; : High volume, presentation-quality formatted report generation&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Hyperion Financial Reporting &lt;/span&gt;: Formatted, book-quality financial and management reporting&lt;/li&gt;&lt;li&gt;&lt;span style="font-weight: bold;"&gt;Hyperion Web Analysis &lt;/span&gt;: Web-based online analytical processing (OLAP) analysis, presentation, and reporting&lt;/li&gt;&lt;/ol&gt;Thirdly, the Hyperion products are now also listed on the Oracle price-list. The BI Suite EE has been renamed to BI Suite EE Plus (yeah... three cheers for branding).&lt;br /&gt;&lt;br /&gt;Wow... three factoids in one post. I must be on a roll here...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2198377770034730431?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2198377770034730431/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2198377770034730431' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2198377770034730431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2198377770034730431'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/hyperion-products-now-available-for.html' title='Hyperion products now available for download'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_npWFFuYus3I/Rp2u1BC8Y-I/AAAAAAAAAbg/Sk2SoYFRV3Q/s72-c/5791.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-1227377922400729814</id><published>2008-07-14T04:37:00.001-07:00</published><updated>2008-07-14T04:37:53.145-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='BI Enterprise Edition'/><title type='text'>How to limit the disk cache used by the BI Server</title><content type='html'>This is from a question asked on our internal mailing lists... (yes, I cannot seem to find the time to write new, original posts)&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style: italic;"&gt;Is there any way to limit the amount of disk space taken up by data stored on the BI Server for aggregations, calcuations, etc?&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;The shor answer is "yes".&lt;br /&gt;NQSConfig.ini (under C:\OracleBI\server\Config) has a section named &lt;span style="font-weight: bold;"&gt;[ CACHE ]&lt;/span&gt; for this purpose.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_npWFFuYus3I/Rp2_7RC8ZAI/AAAAAAAAAbw/5lDXroF2WnU/s1600-h/5795.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp0.blogger.com/_npWFFuYus3I/Rp2_7RC8ZAI/AAAAAAAAAbw/5lDXroF2WnU/s320/5795.PNG" alt="" id="BLOGGER_PHOTO_ID_5088434178907464706" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;It reads something like this:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt;###########################################################&lt;br /&gt;#&lt;br /&gt;#  Query Result Cache Section&lt;br /&gt;#&lt;br /&gt;###########################################################&lt;br /&gt;&lt;br /&gt;[ CACHE ]&lt;br /&gt;&lt;br /&gt;ENABLE = YES;&lt;br /&gt;// A comma separated list of &lt;/span&gt;&lt;directory max=""&gt;&lt;span style="font-family: courier new; font-size: 85%;"&gt; pair(s)&lt;br /&gt;//   e.g. DATA_STORAGE_PATHS = "d:\OracleBIData\nQSCache" 500 MB;&lt;br /&gt;DATA_STORAGE_PATHS = "C:\OracleBIData\cache" 500 MB;&lt;br /&gt;MAX_ROWS_PER_CACHE_ENTRY = 100000;  // 0 is unlimited size&lt;br /&gt;MAX_CACHE_ENTRY_SIZE = 1 MB;&lt;br /&gt;MAX_CACHE_ENTRIES = 1000;&lt;br /&gt;POPULATE_AGGREGATE_ROLLUP_HITS = NO;&lt;br /&gt;USE_ADVANCED_HIT_DETECTION = NO;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;For example, this is how my cache folder looks like:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_npWFFuYus3I/Rp2_7hC8ZBI/AAAAAAAAAb4/rpfcLs2ETDc/s1600-h/5796.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp1.blogger.com/_npWFFuYus3I/Rp2_7hC8ZBI/AAAAAAAAAb4/rpfcLs2ETDc/s320/5796.PNG" alt="" id="BLOGGER_PHOTO_ID_5088434183202432018" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;And to get more information on what these settings mean and do, you can see pages 229-240 of the &lt;span style="font-style: italic;"&gt;"Oracle® Business Intelligence Server Administration Guide, Version 10.1.3.2, December 2006,  (Part No B31770-01)" &lt;/span&gt;for a detailed explanation of what the different settings mean, and a brief exposition of the caching strategies.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;Thanks to Krishnan Viswanathan from BI product management for providing the answer (yes... I am rendering credit unto others - wouldn't be nice on my part to steal and scoot - &lt;/span&gt;&lt;/directory&gt;&lt;span style="font-size: 85%;"&gt;चोरी और सीना जोरी&lt;/span&gt;&lt;span style="font-size: 85%;"&gt; "&lt;span style="font-style: italic;"&gt;chori aur seena jori&lt;/span&gt;" is not something I subscribe to).&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-1227377922400729814?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/1227377922400729814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=1227377922400729814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1227377922400729814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/1227377922400729814'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/how-to-limit-disk-cache-used-by-bi.html' title='How to limit the disk cache used by the BI Server'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp0.blogger.com/_npWFFuYus3I/Rp2_7RC8ZAI/AAAAAAAAAbw/5lDXroF2WnU/s72-c/5795.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5259460590073359290</id><published>2008-07-14T04:35:00.000-07:00</published><updated>2008-07-14T04:36:29.084-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer'/><category scheme='http://www.blogger.com/atom/ns#' term='D4O'/><category scheme='http://www.blogger.com/atom/ns#' term='news'/><category scheme='http://www.blogger.com/atom/ns#' term='Discoverer OLAP'/><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><title type='text'>Petrol and OLAP</title><content type='html'>&lt;p&gt;According to this NYT article (&lt;a href="http://www.nytimes.com/2007/07/19/business/19oil.html?_r=2&amp;amp;oref=slogin&amp;amp;oref=slogin"&gt;Big Rise Seen in Demand for Energy - New York Times&lt;/a&gt;), "&lt;span style="font-style: italic;"&gt;It started with a simple question by Samuel W. Bodman, the energy secretary: What does the future hold for supplies of oil and natural gas?".&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;blockquote&gt;In order to answer this question, the National Petroleum Council developed an analytic data warehouse using Oracle relational and OLAP technology. Implemented by Vlamis Consulting, the NPC report states:&lt;br /&gt;  &lt;blockquote&gt;The data warehouse was designed to be the main analytical tool for the Task Groups, accepting all data collected from the survey questionnaire and other data sources. As the survey data were multi-dimensional, Oracle OLAP database technology was used and the collection was organized using 7 dimensions:&lt;br /&gt;1.  Time (year)&lt;br /&gt;2.  Geography (country or geographic  region)&lt;br /&gt;3.  Energy type (e.g., Oil, Gas, Coal, Nuclear, Renewable)&lt;br /&gt;4.   Energy sector (e.g., Commercial, Residential)&lt;br /&gt;5.  Case type (e.g., Business  as usual, Alternative energy policy)&lt;br /&gt;6.  Units (applicable unit of  measure)&lt;br /&gt;7.  Source (e.g., Public, Proprietary)&lt;br /&gt;&lt;/blockquote&gt; The statistics contained in the report posed interesting technical challenges, including non-additive data, skip-level hierarchies, non-standard aggregation rules, and more - all of which Oracle OLAP is designed to manage. Discoverer OLAP was used to analyze the data.&lt;/blockquote&gt;You can find more on the Vlamis blog here (&lt;a href="http://www.vlamis.com/blog.php/?p=28"&gt;Vlamis Software » Blog Archive » Vlamis Used Oracle OLAP For National Petroleum Council Study&lt;/a&gt;)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;Thanks to Marty Gubar from OLAP Product Management for passing this on&lt;/span&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5259460590073359290?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5259460590073359290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5259460590073359290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5259460590073359290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5259460590073359290'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/petrol-and-olap.html' title='Petrol and OLAP'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5363469833248525749</id><published>2008-07-14T04:34:00.000-07:00</published><updated>2008-07-14T04:35:31.998-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hyperion'/><category scheme='http://www.blogger.com/atom/ns#' term='downloads'/><title type='text'>Reply to a comment - Hyperion licenses</title><content type='html'>&lt;p&gt;This is a post in response to a &lt;a href="http://oraclebi.blogspot.com/2007/07/hyperion-products-now-available-for.html#comment-3774115005954403224"&gt;comment&lt;/a&gt; to a post (&lt;a href="http://oraclebi.blogspot.com/2007/07/hyperion-products-now-available-for.html"&gt;Hyperion products now available for download&lt;/a&gt;)&lt;br /&gt;I have reproduced the entire comment here for convenience:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;Anonymous said...&lt;br /&gt;&lt;br /&gt;   I noticed that on Oracle technology network, a developer can download the software with Development License.&lt;br /&gt;   ******&lt;br /&gt;Is there a place where a developer can download the Hyperion products with "Development License" to evaluate/learn the products or even prepare for certification?&lt;br /&gt;   *******&lt;br /&gt;The reason I am asking is that the 30-day trial period on e-delivery website is barely enough for something as complex as Hyperion products. It takes a while to install/configure them!! Most existing Hyperion customers have only a few products licensed and in the past, Hyperion made it very difficult for developers of those customers to get a trial license (you had to go through sales team to get trial software who wouldn't help you unless they saw immediate money). If there was a development license for Hyperion products, I am sure many of the developers of existing customers would try out some of the remaining products that they don't currently have license for and recommend them to the business users. It would be fine if the development license terms restricted use by the individual developer for non-production use Only (there are paid Hyperion developer tools such as Dashboard Architect, studio, etc. that must still be paid for if used in production environment and any development done with Development License can not be installed in production unless a paid license has also been acquired).&lt;br /&gt;&lt;br /&gt;Note: This individual developer "development license" would be different from the "paid development environment" license which is where the development team does the development before installing it to the "paid production environment".&lt;br /&gt;   (hopefully it is not too confusing)&lt;/blockquote&gt;The short answer to this question is that once software is available from &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;OTN&lt;/span&gt; for download, there **should** not be any license requirement.&lt;br /&gt;&lt;br /&gt;Oracle software - all of it - comes without any timed licenses, or trial licenses that lock you out of the product or restrict you to limited functionality after x number of days. If you take the case of &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;Siebel&lt;/span&gt; Business Analytics, which became Oracle Business Intelligence Suite Enterprise Edition (with some products like Oracle BI Publisher joining this suite, which in turn came from the Oracle Applications side of the company and went by the very exciting name of XML Publisher), it also had a license key that was required to install and use the different products therein, like Answers, Dashboards, Disconnected, etc... It took some time to take out the license key requirements from the product, and when Oracle released Oracle BI &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;EE&lt;/span&gt; 10.1.3.2 (aka code name of 'Maui'), it had no license key restrictions. BI EE 10.1.3.2.1 does not have a license key, nor will 10.1.3.3.0 (due very soon), or other releases.&lt;br /&gt;&lt;br /&gt;I totally agree that a 30 day license is probably not enough to install, use, and learn the product family - I would prefer 90 days, and Hyperion does have many products that do not exactly fall in the 'Notepad' variety of easy-to-install-and-learn products (Planning, budgeting, financial performance management, etc...).&lt;br /&gt;&lt;br /&gt;At this point I don't really have an answer - what you could try is to download and install the products with the 30 day license, and after the 30 day period try and obtain a new 30 day license file and see if that works.&lt;br /&gt;&lt;br /&gt;Note that please do not take this as 'legal' advice from Oracle. This is my personal 2 cents (or चार आने  &lt;span style="font-style: italic;"&gt;char &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;anne&lt;/span&gt;&lt;/span&gt; in my lingo).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5363469833248525749?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5363469833248525749/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5363469833248525749' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5363469833248525749'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5363469833248525749'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/reply-to-comment-hyperion-licenses.html' title='Reply to a comment - Hyperion licenses'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7396695482973923089</id><published>2008-07-14T04:32:00.000-07:00</published><updated>2008-07-14T04:34:05.400-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><title type='text'>11g OLAP – Hot Pluggable Performance Booster…</title><content type='html'>Over the last few weeks there have been a lot of headlines, articles and blog posts regarding the 11g release of the database. From the point of BI, this release does have a lot to offer. Most importantly (from my point of view) the multi-dimensional model will finally move beyond the current use cases and evolve into a hot a pluggable performance booster. Here is a direct quote from Charles Rozwat, Oracle executive VP for server technologies:&lt;br /&gt;&lt;br /&gt;“&lt;span style="font-style: italic;"&gt;Oracle's new OLAP features take business intelligence 'from a specialized niche into a much broader market.'&lt;/span&gt; “&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style: italic;"&gt;As data changes in the base data tables, those changes are automatically refreshed to the materialized views stored in the cubes. The bottom line is more automation and a better ability to handle large amounts of data and complex queries with less of an impact on performance.&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;Andy Mendelson has also been widely quoted regarding his comments on 11g OLAP:&lt;br /&gt;&lt;br /&gt;"&lt;span style="font-style: italic;"&gt;The big breakthrough here is that we're able to use the OLAP cubes as a transparent performance accelerator inside the database. The users are still happily using their SQL applications, and they won't even know they're using OLAP. We're moving OLAP from a specialized market to a much broader market among all our SQL users.&lt;/span&gt;"&lt;br /&gt;&lt;br /&gt;The end result is a hot pluggable peformance layer than will help improve response times for all SQL reporting products (Discoverer, BI EE, Business Objects, Cognos etc).&lt;br /&gt;&lt;br /&gt;I am glad to see that Googling the term “11g OLAP” provides a number of links analysing 11g OLAP . The first link, at the moment anyway, is to Intelligent Enterprise and their posting provides a non-technical overview of the launch. From this site you jump directly to the second link: the 11g OLAP datasheet on OTN. The datasheet can be downloaded from the OLAP home page on OTN, or you can access it directly via this link&lt;a href="http://www.oracle.com/technology/products/bi/olap/pdf/olap-11g-datasheet.pdf"&gt; here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The real analysis starts with the next two links from Vlamis and Mark Rittman. Rather than repeat everything here I going to link everyone over to these two postings as together they provide the best analysis of what you can expect from 11g OLAP:&lt;br /&gt;&lt;br /&gt;The Vlamis blog, provides a lot more detail on the launch and 11g Analytic Workspace Manager. Chris and Dan have been heavily involved with the beta program and their 11g OLAP posting contains links to the actual 11g launch webcast and links to a powerpoint presentation with screenshots of key 11g Analytic Workspace Manager features. You can get to their web site via this link which will take you directly to the posting on 11g OLAP: &lt;a href="http://www.vlamis.com/blog.php/?p=27"&gt;http://www.vlamis.com/blog.php/?p=27 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Mark's posting looks more at the SQL access layer and the new SQL CUBE_TABLE function as well as reviewing more general features of 11g OLAP. You can access Mark's review at:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.rittmanmead.com/2007/05/07/oracle-olap-11g-news-and-the-vlamis-blog/"&gt;http://www.rittmanmead.com/2007/05/07/oracle-olap-11g-news-and-the-vlamis-blog/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For those of you wanting to try 11g OLAP the Linux version will be out in August so watch out for the announcement on OTN.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7396695482973923089?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7396695482973923089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7396695482973923089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7396695482973923089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7396695482973923089'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/11g-olap-hot-pluggable-performance.html' title='11g OLAP – Hot Pluggable Performance Booster…'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-6116050428265292800</id><published>2008-07-14T04:31:00.000-07:00</published><updated>2008-07-14T04:32:33.037-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='poll'/><title type='text'>Go vote!</title><content type='html'>I have added a poll page element on the Oracle BI Blog template. This is a new page element that Blogger provided, and I wanted to sort of kick the tyres around. So, please go to the &lt;a href="http://oraclebi.blogspot.com/"&gt;blog&lt;/a&gt; and vote.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;Edits: corrected a typo. And added a screenshot - within minutes of posting this post and adding the poll page element my blog showed up with an error message for the poll! It's up and working now; anyway, signing off for the weekend.&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_npWFFuYus3I/RrOVu0kfGyI/AAAAAAAAAnk/AmJvwjUU9mI/s1600-h/5970.PNG"&gt;&lt;img style="cursor: pointer;" src="http://bp3.blogger.com/_npWFFuYus3I/RrOVu0kfGyI/AAAAAAAAAnk/AmJvwjUU9mI/s400/5970.PNG" alt="" id="BLOGGER_PHOTO_ID_5094580235104361250" border="0" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-6116050428265292800?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/6116050428265292800/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=6116050428265292800' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6116050428265292800'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/6116050428265292800'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/go-vote.html' title='Go vote!'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_npWFFuYus3I/RrOVu0kfGyI/AAAAAAAAAnk/AmJvwjUU9mI/s72-c/5970.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5523308267680479141</id><published>2008-07-14T04:29:00.000-07:00</published><updated>2008-07-14T04:31:15.560-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='etcetera'/><title type='text'>Russian BI Blog</title><content type='html'>Doing some &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;clickstream&lt;/span&gt; analysis on the BI Blog, I saw some hits coming this way from a site &lt;a href="http://oraclebi.ru/"&gt;http://oraclebi.ru/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Check the blog out; and in case you don't know &lt;span class="blsp-spelling-corrected" id="SPELLING_ERROR_1"&gt;Russian&lt;/span&gt;, you can try the Google translated site &lt;a href="http://translate.google.com/translate?hl=en&amp;amp;sl=ru&amp;amp;u=http://www.oraclebi.ru/&amp;amp;sa=X&amp;amp;oi=translate&amp;amp;resnum=1&amp;amp;ct=result&amp;amp;prev=/search%3Fq%3Dhttp://www.oraclebi.ru/"&gt;here&lt;/a&gt;. It lists Mark &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;Rittman's&lt;/span&gt; blog and mine among others.&lt;br /&gt;&lt;br /&gt;&lt;span style="color: rgb(102, 102, 102); font-size: 85%;"&gt;Post Edit: I got an email from the blog author, Andrey Pivovarov, who is a sales consultant with Oracle, based out of Moscow.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5523308267680479141?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5523308267680479141/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5523308267680479141' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5523308267680479141'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5523308267680479141'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/russian-bi-blog.html' title='Russian BI Blog'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-5823008125802532772</id><published>2008-07-14T04:25:00.000-07:00</published><updated>2008-07-14T04:29:23.992-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Warehouse'/><category scheme='http://www.blogger.com/atom/ns#' term='Warehouse Builder'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Mining'/><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><title type='text'>Oracle Extends Its Lead in the DW Platform Tools Market</title><content type='html'>&lt;h3 class="post-title"&gt; &lt;/h3&gt;  &lt;div class="post-body"&gt; &lt;p&gt;More excellent news for the database team, following hot on the heels of the extremely positive coverage of the 11g database, a new analyst report from IDC has identified Oracle as the leader, by a very big margin, in data warehouse platform tools market. The full story is on the Oracle.com website and can be found &lt;a href="http://www.oracle.com/corporate/press/2006_nov/110706-IDC-BA-report-FINAL.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;This market segment comprises both DW generation and DW management tools. According to IDC, Oracle has over 40% of the market which translated into $1.8 billion in revenue for 2006. So which products were included as part of the platform in this survey? The same group of products that featured heavily in the 11g press releases via comments from Andy Mendelsohn and Charles Rozwat:&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;Warehouse Builder&lt;/li&gt;&lt;li&gt;Partitioning&lt;/li&gt;&lt;li&gt;OLAP&lt;/li&gt;&lt;li&gt;Data Mining&lt;/li&gt;&lt;/ul&gt;all of these products are key to growing Oracle's dominance of the data warehouse market, and from the information released as part of the 11g presentations (see previous posting) these products are adding significant new features that are going to make building and managing an Oracle data warehouse even easier.&lt;br /&gt;&lt;br /&gt;Interestingly, IDC sees Oracle as being in an excellent position to exploit new areas such as spatial analytics. In fact, Warehouse Builder 10gR2 can already "&lt;span style="font-style: italic;"&gt;spatially enable&lt;/span&gt;" an existing schema so there is nothing stopping customers from using spatial features today. The front page of OTN has a link to an article on integrating spatial with Google map:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/pub/articles/lokitz-spatial-geoserver.html"&gt;http://www.oracle.com/technology/pub/articles/lokitz-spatial-geoserver.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The only problem now is : where to send everyone to get more information? Personally, I always use the Yahoo websites for this type of information so here is the link :&lt;br /&gt;&lt;br /&gt;&lt;a href="http://biz.yahoo.com/prnews/070806/aqm088.html?.v=14"&gt;http://biz.yahoo.com/prnews/070806/aqm088.html?.v=14&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Alternatively try typing "Oracle Named Worldwide Market Share Leader in Data Warehouse Platform Tools" into Google and you should get over 150,00 hits.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-5823008125802532772?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/5823008125802532772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=5823008125802532772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5823008125802532772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/5823008125802532772'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/oracle-extends-its-lead-in-dw-platform.html' title='Oracle Extends Its Lead in the DW Platform Tools Market'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-7798280266589787899</id><published>2008-07-14T04:23:00.000-07:00</published><updated>2008-07-14T04:24:56.184-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='epm'/><category scheme='http://www.blogger.com/atom/ns#' term='hyperion'/><title type='text'>The BI - EPM Blog</title><content type='html'>&lt;p&gt;You may have seen the &lt;a href="https://www.blogger.com/comment.g?blogID=13714584&amp;amp;postID=3060290342873004601"&gt;blog comment&lt;/a&gt;, if you haven't, here's the really good piece of news: there is a new BI - EPM blog available now at &lt;a href="http://blogs.oracle.com/frankbuytendijk/"&gt;http://blogs.oracle.com/frankbuytendijk/&lt;/a&gt;. Here's an introduction from the blog:&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Frank Buytendijk&lt;/span&gt;, Vice President of Corporate Strategy for Oracle|Hyperion and previously a Gartner Research Vice President, is one of world's most recognized thought leaders on business intelligence (BI) and enterprise performance management (EPM). As a researcher, presenter, and business strategy consultant for Oracle|Hyperion's customers, Buytendijk's style is best described as provocative, out-of-the-box, and future-oriented, while adding a human touch. Based in The Netherlands, Buytendijk brings 20 years of experience in BI &amp;amp; EPM.&lt;/blockquote&gt;&lt;br /&gt;You can subscribe to the blog feed &lt;a href="http://blogs.oracle.com/frankbuytendijk/xml/rss.xml"&gt;here&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-7798280266589787899?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/7798280266589787899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=7798280266589787899' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7798280266589787899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/7798280266589787899'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/bi-epm-blog.html' title='The BI - EPM Blog'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-2112876165394256693</id><published>2008-07-14T04:21:00.000-07:00</published><updated>2008-07-14T04:23:14.852-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='AWM'/><category scheme='http://www.blogger.com/atom/ns#' term='OLAP'/><title type='text'>What no GUI? How to Load AW XML Files</title><content type='html'>&lt;p&gt;This part of a series of postings prompted by many questions I received about how to manage an analytic workspace without using a GUI (AWM or OWB) . In this post I want to provide some more information on using XML templates. Most of this information came from Marty Gubar, OLAP Product Manager, who is an expert in using AW XML.&lt;br /&gt;&lt;br /&gt;Personally, I am still not sure how you would create an XML file for an AW without using Analytic Workspace Manager, however, based on recent posts on the OLAP forum and from questions posted to our internal help mail list, it is obvious there are people actually designing and building AWs without ever using AWM. So I going to make the assumption that you have somehow managed to created your XML file that describes a dimension or a cube, or any other supported object, and question now is how do you load that file into the AW?&lt;br /&gt;&lt;br /&gt;The first thing you need to do is to find this extremely useful jar file, called ImportXML.jar file. For the moment you will have to email me (keith.laker@oracle.com) to get a copy of this file, but hopefully the product management team will get it hosted on the OLAP OTN home page very shortly. Once you have this jar file you can create a script file as follows:&lt;br /&gt;&lt;br /&gt;java.exe -classpath .\ImportXML.jar samples.awxml.ImportXML %1 %2 %3 %4 %5 %6 %7 %8 %9&lt;br /&gt;&lt;br /&gt;The script takes the following arguments&lt;br /&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;id/pwd  ID and Password&lt;/li&gt;&lt;li&gt;-con [host:port:sid]   Connect string (e.g.  localhost:1521:orcl)&lt;/li&gt;&lt;li&gt;-aw [TargetAW]  AW that is the target for the XML input (required when XML does not include a complete AW)&lt;/li&gt;&lt;li&gt;- file [file]  Name of XML file&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Examples:&lt;/span&gt;&lt;br /&gt;1. Importing an object (e.g. a calculation) into the GLOBAL analytic workspace:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;import scott/tiger -con localhost:1521:orcl -aw global -file my_model.xml&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;2. Importing an entire analytic workspace:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;import scott/tiger -con localhost:1521:orcl -file global_aw.xml&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The above script can be used with the XML template files generated by Analytic Workspace Manager as well. Alternatively you can manually create your own (as some of you are quite clearly doing!). If you are manually creating these files, or just want to modify an existing file to make some changes hopefully the following overviews will help:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Structure of an XML File:&lt;/span&gt; Each XML file is broken down into four basic blocks, which relate to the type of work being performed.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Step 1 is to attach the required AW via an “Attach Id” tag.&lt;/li&gt;&lt;li&gt;Step 2 is to process the object identified within the file&lt;/li&gt;&lt;li&gt;Step 3 is to commit all changes&lt;/li&gt;&lt;li&gt;Step 4 is detach the AW&lt;/li&gt;&lt;/ul&gt;There is a quick an easy way to understand what is required and how these files are processed. If you use Warehouse Builder, it is possible to use Control Center to generate deployment scripts, which you can then review. For example I used OWB to generate a a CREATE dimension and a DROP dimension script so I could understand the steps involved and review the code it generated. There are a number basic tags that you need to use&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Attach&lt;/li&gt;&lt;li&gt;Commit&lt;/li&gt;&lt;li&gt;Delete&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Create&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;commit id=""&gt;&lt;/commit&gt;Delete&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;detach id=""&gt;&lt;/detach&gt;Alter&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;create id=""&gt;&lt;/create&gt;ActiveObject&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;update id=""&gt;&lt;/update&gt;Id&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;Hopefully, the following sections will help to explain how to use these various tags:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Attaching an AW&lt;/span&gt;&lt;br /&gt;The process for attaching is very simple.  There are two ways to do this, you either:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;pass a parameter into your script file via the command line using -AW  &lt;span style="font-style: italic;"&gt;aw_name&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-style: italic;"&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;code the AW and schema name into the XML file&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;I think the first is probably the best idea because it makes it easier to move XML and import files into different database instances. But if you want to hard code this information into your XML file then you need provide the following code:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_5ecFmVOLrwo/RryDaoTn-gI/AAAAAAAAAJo/QbVXxG2dR8k/s1600-h/XML_Code1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_5ecFmVOLrwo/RryDaoTn-gI/AAAAAAAAAJo/QbVXxG2dR8k/s400/XML_Code1.JPG" alt="" id="BLOGGER_PHOTO_ID_5097093371796126210" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;(I am hoping you can read this code!). The process is quite straightforward. The first four lines are the normal XML header information, after that comes the following:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Attach tag with an Id tag that contains an the word &lt;span style="font-style: italic;"&gt;Action&lt;/span&gt; with a number, like this "Action1" . This controls the order of processing and in an normal XML file you will see this repeated with numbers increasing sequentially through the file&lt;/li&gt;&lt;li&gt;ActiveObject tag starts the block to identify what the file is going to process which is determined by the next line&lt;/li&gt;&lt;li&gt;In this case the attach needs to process an AW so an AW tag is used to identify the specific AW to be attached&lt;/li&gt;&lt;li&gt;The last three rows contain the termination tags for rows 1,2 and 3.&lt;/li&gt;&lt;/ol&gt;It is possible to define an attach mode within this block as well, allowing the AW to only be attached in read-only mode which allows AWs to be shared across multiple projects and allows an AW to be attached by multiple processes at the same time.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Committing Changes within an AW&lt;/span&gt;&lt;br /&gt;The process for committing  is the same as the attach process except the tag &lt;span style="font-style: italic;"&gt;Commit&lt;/span&gt; is used. Because during a session we could in theory have mulitple AWs attached the commit block still requires an ActiveObject block to identify the AW to be updated. This allows to not update other AWs as required.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp3.blogger.com/_5ecFmVOLrwo/RryH3oTn-jI/AAAAAAAAAKA/y454gJEl8H8/s1600-h/XML_Code4.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp3.blogger.com/_5ecFmVOLrwo/RryH3oTn-jI/AAAAAAAAAKA/y454gJEl8H8/s400/XML_Code4.JPG" alt="" id="BLOGGER_PHOTO_ID_5097098268058843698" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Detaching an AW&lt;/span&gt;&lt;br /&gt;The process for detaching is also the same as the attach process except the tag &lt;span style="font-style: italic;"&gt;Detach&lt;/span&gt; is used. Because during a session we could in theory have mulitple AWs attached the detach block still requires an ActiveObject block to identify the AW to detach.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp2.blogger.com/_5ecFmVOLrwo/RryG5YTn-iI/AAAAAAAAAJ4/Cw8UH1wZ7fk/s1600-h/XML_Code3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp2.blogger.com/_5ecFmVOLrwo/RryG5YTn-iI/AAAAAAAAAJ4/Cw8UH1wZ7fk/s400/XML_Code3.JPG" alt="" id="BLOGGER_PHOTO_ID_5097097198611986978" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Building a CREATE Script&lt;/span&gt;&lt;br /&gt;Create scripts are the output from Analytic Workspace Manager.  After the main header block you will find a &lt;span style="font-style: italic;"&gt;Create &lt;/span&gt;tag with an associated Id that defines the action reference for the create statement.  If you are using the &lt;span style="font-style: italic;"&gt;Attach&lt;/span&gt; tag as well, then the number associated with "Action" for the &lt;span style="font-style: italic;"&gt;Create &lt;/span&gt;block must be greater than that used in the &lt;span style="font-style: italic;"&gt;Attach &lt;/span&gt;block.  It all sounds very complicated but when you see the code it is very simple.&lt;br /&gt;&lt;br /&gt;The Create block identifies the create process in full.  For a dimension that full process is:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Dimension name&lt;/li&gt;&lt;li&gt;Dimension labels&lt;/li&gt;&lt;li&gt;Dimension attributes&lt;/li&gt;&lt;li&gt;Dimension levels&lt;/li&gt;&lt;li&gt;Dimension hierarchies&lt;/li&gt;&lt;li&gt;Dimension mappings&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;A lot of information needs to be provided in the XML file, which is why I prefer to use Analytic Workspace Manager to generate these!&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Building a DELETE Script&lt;br /&gt;&lt;/span&gt;Performing a Delete operation in Analytic Workspace Manager is very simple - highlight the object and hit the delete key. Assuming there are no supporting objects that prevent the delete process from running the object will be deleted - for example you cannot delete a dimension while it is still associated with a cube. However, outside of Analytic Workspace Manager the XML file does provide a &lt;span style="font-style: italic;"&gt;Delete&lt;/span&gt; tag to allow for command line deletion of objects. The amount of information you need to supply to delete an object is minimal. For a dimension it is simply the lines containing the Dimension tag and the end-Dimension tag. The delete process will remove all the objects with dimension automatically.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp0.blogger.com/_5ecFmVOLrwo/RryN74Tn-kI/AAAAAAAAAKI/fJ_BlqkUawc/s1600-h/XML_Code5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp0.blogger.com/_5ecFmVOLrwo/RryN74Tn-kI/AAAAAAAAAKI/fJ_BlqkUawc/s400/XML_Code5.JPG" alt="" id="BLOGGER_PHOTO_ID_5097104938143054402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Building an ALTER Script&lt;/span&gt;&lt;br /&gt;It is possible to update certain parts of an AW using this method. To be honest, I have not tried everything. According to the Java documentation this method allows you to update any of the text attributes, such as:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Long descriptive label&lt;/li&gt;&lt;li&gt;Short descriptive label&lt;/li&gt;&lt;li&gt;Plural descriptive label&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;So you could change a dimensions description from "Products" to "Company Products" for example. For more heavy duty alterations, such as modifying a hierarchy by changing the levels within the hierarchy I think you would need to delete the hierarchy first and then rebuild it. It may depend on the types of changes you want to make, however, the API documentation seems to indicate this is a heavily restricted tag. But enjoy!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-2112876165394256693?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/2112876165394256693/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=2112876165394256693' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2112876165394256693'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/2112876165394256693'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/what-no-gui-how-to-load-aw-xml-files.html' title='What no GUI? How to Load AW XML Files'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp3.blogger.com/_5ecFmVOLrwo/RryDaoTn-gI/AAAAAAAAAJo/QbVXxG2dR8k/s72-c/XML_Code1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3213857575606318559.post-4928020007807673615</id><published>2008-07-14T04:19:00.000-07:00</published><updated>2008-07-14T04:21:03.750-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='downloads'/><category scheme='http://www.blogger.com/atom/ns#' term='database'/><title type='text'>Oracle Database 11g on Linux now available</title><content type='html'>For those keeping track, Oracle Database 11g Release 1 (11.1.0.6.0) - Standard Edition, Standard Edition One, and Enterprise Edition - became avialable for download from OTN. You can download it from this &lt;a href="http://www.oracle.com/technology/software/products/database/index.html"&gt;link&lt;/a&gt; - a 1.7GB single zip file. Also see Keith's previous post - &lt;a href="http://oraclebi.blogspot.com/2007/08/11g-olap-hot-pluggable-performance.html"&gt;11g OLAP – Hot Pluggable Performance Booster…&lt;/a&gt; and &lt;a href="http://oraclebi.blogspot.com/2007/08/oracle-extends-its-lead-in-dw-platform.html"&gt;Oracle Extends Its Lead in the DW Platform Tools M...&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3213857575606318559-4928020007807673615?l=oraclebuk.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://oraclebuk.blogspot.com/feeds/4928020007807673615/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3213857575606318559&amp;postID=4928020007807673615' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4928020007807673615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3213857575606318559/posts/default/4928020007807673615'/><link rel='alternate' type='text/html' href='http://oraclebuk.blogspot.com/2008/07/oracle-database-11g-on-linux-now.html' title='Oracle Database 11g on Linux now available'/><author><name>chinchu</name><uri>http://www.blogger.com/profile/11561785644610916477</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
