<?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-18830350</id><updated>2012-01-16T10:47:55.092Z</updated><category term='data integration'/><category term='Oracle Partitioning'/><category term='standby logs'/><category term='Controlfile Autobackup'/><category term='High Availability'/><category term='DGMGRL'/><category term='Migrate your database to ASM'/><category term='Salesforce Exam'/><category term='SQL Server 2000'/><category term='Greek Islands'/><category term='decode function'/><category term='CopyForce'/><category term='crosscheck'/><category term='MS SQL Server Dictionary'/><category term='SQL Access Advisor'/><category term='delete files with cron'/><category term='RANK'/><category term='DBA_LOCK'/><category term='EPG'/><category term='Standby Database'/><category term='Oracle Streams Synchronous Capture'/><category term='DBMS_SQLTUNE'/><category term='CACHE'/><category term='11g'/><category term='FGA'/><category term='web service'/><category term='Solaris'/><category term='GATHER_SCHEMA_STATS'/><category term='cron'/><category term='Oracle Processes'/><category term='Greek islands weather'/><category term='force.com'/><category term='Cloud computing'/><category term='Oracle Job Scheduler'/><category term='Data Mart'/><category term='Oracle 11g Upgrade'/><category term='Salesforce'/><category term='downtime'/><category term='DBMS_JOB'/><category term='Salesforce Security'/><category term='connect by'/><category term='Oracle Price'/><category term='DENSE_RANK'/><category term='Oracle SQL Developer Data Modeling'/><category term='Data Mining'/><category term='Dimensional Model'/><category term='Recover Read Only Tablespaces'/><category term='Oracle Statistics'/><category term='import script'/><category term='ASM'/><category term='Compression'/><category term='MS SQL Server Views'/><category term='Service Level Agreement'/><category term='Oracle Editions and versions'/><category term='DI'/><category term='Oracle Enterprise Edition'/><category term='new feautures'/><category term='Oracle Analytic Functions'/><category term='Data Modelling'/><category term='integration'/><category term='MERGE'/><category term='Oracle Analytics'/><category term='Bind Variables'/><category term='Oracle Standby'/><category term='ER diagram'/><category term='DBA'/><category term='DMBS_ADVISOR.QUICK_TUNE'/><category term='UTL_HTTP'/><category term='From 10g to 11g'/><category term='Dev401'/><category term='Google Chart'/><category term='Database Upgrade'/><category term='Oracle Installation on Solaris'/><category term='dbms_job.submit'/><category term='SQL MERGE INTO'/><category term='Unix'/><category term='Innovation'/><category term='Google Maps'/><category term='Semaphores'/><category term='Aggregate SQL'/><category term='ETL'/><category term='workflow'/><category term='Table Compression'/><category term='RMAN Hot Backup script'/><category term='sp_spaceused'/><category term='Historical Data Management'/><category term='Data Model'/><category term='maximum open cursors exceeded'/><category term='list backup'/><category term='Oracle'/><category term='Oracle BI'/><category term='Business Intelligence'/><category term='Ajax'/><category term='Oracle Installation on Ubuntu'/><category term='DB_CACHE_BUFFER'/><category term='HTMLDB'/><category term='blocking sessions'/><category term='CTAS'/><category term='LAG'/><category term='ORA-14400'/><category term='dbms_metadata'/><category term='xml db'/><category term='xmlagg'/><category term='dba_part_tables'/><category term='Oracle License'/><category term='ER Modeling'/><category term='Apache FOP'/><category term='Data Guard'/><category term='Data Warehousing Definitions'/><category term='DBMS_STATS'/><category term='import job monitoring'/><category term='Oracle Standard Edtion One'/><category term='Salesforce API and Oracle'/><category term='Oracle SQL developer'/><category term='Entity Relationshing diagram'/><category term='Oracle Salesforce Real-time'/><category term='analytic functions'/><category term='SQL Tuning Advisor'/><category term='Redo Logging'/><category term='Partition Compression'/><category term='Greenplump'/><category term='INSTR'/><category term='Fine Grained Auditing'/><category term='OLAP'/><category term='Default Value'/><category term='Embedded PL/SQL Gateway'/><category term='Informatica'/><category term='Monitor RMAN time'/><category term='get DDL'/><category term='LAST_VALUE'/><category term='Visualforce'/><category term='Oracle Apex'/><category term='Physical Standby Database'/><category term='Recovery'/><category term='Delete obsolete backups'/><category term='Oracle Functions'/><category term='Informatica cloud'/><category term='RMAN'/><category term='Oracle Streams'/><category term='ATOMIC_REFRESH'/><category term='Moving Partitions'/><category term='Microsoft SQL Server 2000 data dictionary view'/><category term='DDL'/><category term='Oracle Prompt'/><category term='library cache pin'/><category term='Oracle BI Publisher'/><category term='ORA-01000'/><category term='SLA percentage table'/><category term='crosscheck backup'/><category term='Oracle Apex Hosting'/><category term='Redo'/><category term='Data Warehousing'/><category term='Excessive Redo Logging'/><category term='Move partition'/><category term='Ubuntu'/><category term='Disaster Recovery'/><category term='DBUA'/><category term='DEV 401'/><category term='Data Warehouse Modelling'/><category term='ORA-04021'/><category term='obiee'/><category term='RMAN Hot Backup'/><category term='Data Guard Broker'/><category term='SQL Case'/><category term='Free Charts'/><title type='text'>Database Systems</title><subtitle type='html'>Database Systems is a blog about databases. I write mostly about Oracle, RMAN, Data Warehousing, SQL, Oracle Analytics and everyday issues in administering databases and lately I write about Salesforce.com, Informatica and Data Integration</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>94</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-18830350.post-6029600078138369916</id><published>2011-12-16T15:44:00.001Z</published><updated>2011-12-16T19:51:54.167Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Salesforce Real-time'/><title type='text'>Salesforce to Oracle Real Time Integration</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;In this blog post I will show you how to make Web Service like calls from Salesforce to Oracle, using Informatica Cloud Endpoint URL in real time. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;In Winter 12 release of Informatica Cloud we will have the ability to make Salesforce outbound message calls to an Informatica Cloud task and enable real-time integration.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;i&gt;The idea is simple&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Use Salesforce Workflow Rule (a database trigger) and make an outbound message call whenever a new Account Record is edited or created.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Step by step instructions&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;1) You will create a vanilla Data Synchronisation task, I called mine '&lt;i&gt;test ws'&lt;/i&gt;, where you read the Account fields from Salesforce(left) and you UPSERT them to an Oracle(right), in a table called &lt;i&gt;FROMSFDC&lt;/i&gt; like this:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-m3-RjSPJPws/Tus_V786iGI/AAAAAAAAAx4/tcdR09KY5lg/s1600/infaw12_1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="188" src="http://3.bp.blogspot.com/-m3-RjSPJPws/Tus_V786iGI/AAAAAAAAAx4/tcdR09KY5lg/s320/infaw12_1.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;2) Then at the 6.Schedule step of the Informatica Cloud task you will see the a new option called:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;Run this task in real-time upon receiving an outbound message from Salesforce&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-d_zDlYkTw34/TuugpJgTM2I/AAAAAAAAAyo/YLIKCv_SemA/s1600/InfaW12_2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="110" src="http://3.bp.blogspot.com/-d_zDlYkTw34/TuugpJgTM2I/AAAAAAAAAyo/YLIKCv_SemA/s320/InfaW12_2.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://1.bp.blogspot.com/-gKm-SpX3vwg/TutA_7JGJDI/AAAAAAAAAyA/-AH4-GK5X1M/s1600/InfaW12_2.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;When you tick this option, as seen above, an Endpoint URL is generated for the 'test ws'&amp;nbsp; Informatica Cloud task. You can call this task whenever you save a record in Salesforce and force it to execute the&amp;nbsp; UPSERT and update the Oracle table FROMSFDC. Next is to put the above Endpoint URL in a Salesforce Workflow Action (Basically an AFTER INSERT/UPDATE TRIGGER).&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;3) Next thing to do is to open up Salesforce and go to Workflow &amp;amp; Approvals &amp;gt; Outbound Messages and paste the above Endpoint URL like this:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Y6brxGPTNNw/TuuhRDYLypI/AAAAAAAAAyw/Ez9MApu8LsA/s1600/InfaW12_3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="210" src="http://3.bp.blogspot.com/-Y6brxGPTNNw/TuuhRDYLypI/AAAAAAAAAyw/Ez9MApu8LsA/s320/InfaW12_3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-sptNO8m8SmA/TutNPe4lUSI/AAAAAAAAAyI/UlbhlnlhteU/s1600/InfaW12_3.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;4) Last thing to do on this is to create a Workflow Rule to fire the Outbound Message you have just created to call the Informatica Cloud task. Here I created something like this:&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://2.bp.blogspot.com/-zHOe1L0OtlY/TutOCchobdI/AAAAAAAAAyQ/WZmXfNNZrCE/s1600/InfaW12_4.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="193" src="http://2.bp.blogspot.com/-zHOe1L0OtlY/TutOCchobdI/AAAAAAAAAyQ/WZmXfNNZrCE/s320/InfaW12_4.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; font-family: inherit; text-align: left;"&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;That's it! Now, don't forget to Activate the rule.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Whenever a new Salesforce Account is added to Oracle As well. Whenever a Salesforce Account is edited it is UPSERTED to Oracle as well.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Below you see the test records inserted in Salesforce and then Upserted to Oracle (Oracle Apex in this case).&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Here is the record in Salesforce being created, look at timestamp.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-5ZhBDZPiPCk/TutiVgOy6QI/AAAAAAAAAyY/wb3_Z2-0iJk/s1600/Infa12_5.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="232" src="http://3.bp.blogspot.com/-5ZhBDZPiPCk/TutiVgOy6QI/AAAAAAAAAyY/wb3_Z2-0iJk/s320/Infa12_5.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;That is the record created in Salesforce. Check the timestamp. &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;And here you can see the same record pushed in real-time to my Oracle Apex account via the Informatica Cloud URL Endpoint option in my 'test ws' task.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" dir="rtl" style="clear: both; font-family: inherit; text-align: center;"&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://3.bp.blogspot.com/-PtT0iI7LFHw/TutikpK89bI/AAAAAAAAAyg/Fa3gsdVYalM/s1600/InfaW12_6.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;" target="_blank"&gt;&lt;img border="0" height="269" src="http://3.bp.blogspot.com/-PtT0iI7LFHw/TutikpK89bI/AAAAAAAAAyg/Fa3gsdVYalM/s320/InfaW12_6.png" width="320" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Conclusion: &lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;It is easy to connect in real-time Salesforce and Oracle, or any other database.&amp;nbsp; The benefits are tremendeous, for something similar with Web Services you would have to write code to send SOAP messages to the Database, and you would have to do lots of configuration work in the database to receive those messages. The beauty with Informatica Cloud Endpoint URL task schedule is that you can call Informatica Cloud tasks in real-time from Salesforce with zero coding and just config.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;Note:&lt;/b&gt; The Data Synchronisation Endpoint URL functionality of Informatica Cloud will be available in January 2012. I have a beta test org which I have used for this blog post. You can find out more about Informatica Cloud Winter 2012 release &lt;a href="http://www.informaticacloud.com/products/winter-12-whats-new.html" target="_blank"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-6029600078138369916?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/6029600078138369916/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=6029600078138369916' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6029600078138369916'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6029600078138369916'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2011/12/salesforce-to-oracle-real-time.html' title='Salesforce to Oracle Real Time Integration'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-m3-RjSPJPws/Tus_V786iGI/AAAAAAAAAx4/tcdR09KY5lg/s72-c/infaw12_1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5607070008530948692</id><published>2011-09-01T19:51:00.001+01:00</published><updated>2011-09-01T19:51:47.591+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Informatica cloud'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='decode function'/><category scheme='http://www.blogger.com/atom/ns#' term='data integration'/><title type='text'>Update data in the same Salesforce Object with a 'Self-join' Informatica Cloud Task</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;When you use &lt;b&gt;&lt;a href="http://www.informaticacloud.com/"&gt;Informatica Cloud&lt;/a&gt;&lt;/b&gt; you usually use it to do Migration, Integration and Synchronisation. That's about what it is used for, right?&lt;br /&gt;&lt;br /&gt;It is all about moving data from point &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; to point &lt;b&gt;&lt;u&gt;B&lt;/u&gt;&lt;/b&gt; or &amp;nbsp;syncing&amp;nbsp;data between &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; and &lt;b&gt;&lt;u&gt;B&lt;/u&gt;&lt;/b&gt;. That is what &amp;nbsp;Informatica Cloud is built for, to move/sync data from &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; to &lt;b&gt;&lt;u&gt;B&lt;/u&gt;&lt;/b&gt; and while moving it, maybe transform it as well. &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; is the 'source' and &amp;nbsp;&lt;b&gt;&lt;u&gt;B&lt;/u&gt;&lt;/b&gt; is the 'target'. Correct!&amp;nbsp;&lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; can be an Oracle or ERP database and &lt;b&gt;&lt;u&gt;B&lt;/u&gt;&lt;/b&gt; can be a Salesforce Org. Classical use case of Informatica Cloud.&lt;br /&gt;&lt;br /&gt;Well, not exactly. How about if you think a little bit differently.&lt;br /&gt;&lt;br /&gt;How about if &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; is the source and &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; is the target, as well!&lt;br /&gt;&lt;br /&gt;Yes, that's it. Read from &lt;b&gt;&lt;u&gt;A&lt;/u&gt;&lt;/b&gt; and Write to &lt;u&gt;&lt;b&gt;A&lt;/b&gt;&lt;/u&gt; via an Informatica Cloud&amp;nbsp;synchronisation&amp;nbsp;task. A kind of &amp;nbsp;Informatica Cloud Data Syncronisation Task which will 'self-join' an Object or Table. To be used to 'self cleanse' or &amp;nbsp;'self update' the Salesforce custom object data or Oracle database table. This is possible, yes we can use &amp;nbsp;Informatica Cloud as 'self-join' SQL command as well, to edit our data 'in-place' in one single object/table.&lt;br /&gt;&lt;br /&gt;I will try to explain this concept with an example. Suppose you have data in your Salesforce standard object called 'Account' which you want to change. A standard approach would be to 'export' data in a CSV file via a report, change the data manually in Excel or something and then use Apex Data Loader to put the changed data back to the Accounts object in your Salesforce Org right?&lt;br /&gt;&lt;br /&gt;The&amp;nbsp;screen shots&amp;nbsp;below show you how to do this type of operations without actually exporting the data, but doing it in place with an Informatica Cloud synchronisation task.&lt;br /&gt;&lt;br /&gt;What this&amp;nbsp;synchronisation&amp;nbsp;task does is, it uses the &lt;b&gt;&lt;u&gt;same&lt;/u&gt;&lt;/b&gt; Salesforce Org connection and Account object as 'Source' and as 'Target'. That is it, the Account Standard object for this task is the Source connection and the Target connection at the same time.&lt;br /&gt;&lt;br /&gt;This way the Informatica Cloud task, reads the data from the Account object and writes it back, after it transforms it, into the same Account object. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a Source on the Account object&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-T0pIABtxPYc/Tl-ml7CaTEI/AAAAAAAAArw/NcqppgBRELw/s1600/su_source.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="95" src="http://1.bp.blogspot.com/-T0pIABtxPYc/Tl-ml7CaTEI/AAAAAAAAArw/NcqppgBRELw/s320/su_source.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Create a Target for the&amp;nbsp;same Account object in the same org. Just choose as target the same object.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-nWgCEXThJjU/Tl-mpVFyJlI/AAAAAAAAAr0/BfDhr9nHMYQ/s1600/su_target.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://1.bp.blogspot.com/-nWgCEXThJjU/Tl-mpVFyJlI/AAAAAAAAAr0/BfDhr9nHMYQ/s320/su_target.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Field Mapping a kind &amp;nbsp;of &amp;nbsp;'Self-Join', see Id=id&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-iwcM1xEuKJU/Tl-qP-SvrBI/AAAAAAAAAr8/Vw6eL0A0V5c/s1600/su_self_join.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://2.bp.blogspot.com/-iwcM1xEuKJU/Tl-qP-SvrBI/AAAAAAAAAr8/Vw6eL0A0V5c/s320/su_self_join.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Use DECODE function in the same Field Mapping to manipulate data&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-e7Ou5dJTiPY/Tl-msjQdQbI/AAAAAAAAAr4/-utNWhX9WWM/s1600/su_field_mapping.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://4.bp.blogspot.com/-e7Ou5dJTiPY/Tl-msjQdQbI/AAAAAAAAAr4/-utNWhX9WWM/s320/su_field_mapping.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The Informatica Cloud string function 'DECODE' does the trick. Observe how it changes the&amp;nbsp;occurrences&amp;nbsp;of the string '&lt;i&gt;Direct Employer&lt;/i&gt;' to '&lt;i&gt;Employer&lt;/i&gt;' in the Type field of the standard Salesforce Account object, which is actually the same object it reads it from. &lt;/div&gt;&lt;blockquote&gt;&lt;i&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="color: #0b5394;"&gt;decode(Type,'Direct Employer','Employer')&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;/blockquote&gt;When you save and run this task it will read from the same Account object and write back to the same Account object the changed data. All within an Informatica Cloud Data Synchronisation 'Self-join' task! No file downloads, Excel use or whatever. Just one command. Given the plethora of &amp;nbsp;Informatica Cloud String, Arithmetic, Date etc... functions available, just imagine what you can do to your data!&lt;br /&gt;&lt;br /&gt; This is a wonderful and simple example of how Informatica Cloud can be used to cleanse data, I think. &lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt; &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5607070008530948692?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5607070008530948692/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5607070008530948692' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5607070008530948692'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5607070008530948692'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2011/09/update-data-in-same-salesforce-object.html' title='Update data in the same Salesforce Object with a &apos;Self-join&apos; Informatica Cloud Task'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-T0pIABtxPYc/Tl-ml7CaTEI/AAAAAAAAArw/NcqppgBRELw/s72-c/su_source.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3132725432298677171</id><published>2011-08-18T20:06:00.001+01:00</published><updated>2011-08-19T16:24:48.032+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CopyForce'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle'/><title type='text'>Copy your Salesforce org into Oracle with CopyForce</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;div&gt;&lt;h1&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;We found this really cool piece of code called &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;a href="http://code.google.com/p/sqlforce/wiki/CopyForce"&gt;CopyForce&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; in Google code the other day which lets you:&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;h1&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: small; font-weight: normal;"&gt;Copy your Salesforce org objects (tables, indexes) into Oracle or  any other RDBMS, yes you can!&lt;/span&gt;&lt;/i&gt;&lt;/h1&gt;&lt;h1&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;The code I believe is freely available. But not to lose time I used the GUI which is available with trial a license of 30 days from &lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;a href="http://www.capstorm.com/main/"&gt;CAPSTORM&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;. I&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;n this post I want to quickly show you how you can copy your whole Salesforce org dev or prd with its data into Oracle,  then do whatever you like with it. &lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;Installing CopyForce with CAPSTORM GUI.&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;1. Download the CopyForceOrace.zip file from the above site.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;2. Extract the zip file to a directory of your choice&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br clear="none" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 60px;" style="margin-left: 60px;"&gt;&lt;span data-mce-style="font-family: 'courier new', courier; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;/home/crazyman/copystorm&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 60px;" style="margin-left: 60px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;3. Change directory permissions chmod +x on shell script CopyStorm.sh&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;4. Start the GUI by running &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br clear="none" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 60px;" style="margin-left: 60px;"&gt;&lt;span data-mce-style="font-family: 'courier new', courier; font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace;"&gt;./CopyStorm.sh&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 60px;" style="margin-left: 60px;"&gt;&lt;span data-mce-style="font-family: 'courier new', courier; font-size: small;" style="font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br clear="none" /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span data-mce-style="font-family: 'times new roman', times; font-size: medium;" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;5. Start the CAPSTORM GUI, accept EULA.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span data-mce-style="font-family: 'times new roman', times; font-size: medium;" style="font-size: small;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;6. Remember this is a 30 day trial only.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br clear="none" /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;span data-mce-style="font-family: 'times new roman', times; font-size: medium;" style="font-size: small;"&gt;Once the GUI is up you just have to provide your Salesforce and Oracle connection credentials. &lt;/span&gt;Before that I logged to Oracle and created a dummy schema called ORA_SFDC and in this schema the CAPSTORM programme will copy the whole Salesforce developer org objects. &lt;/span&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 30px;" style="margin-left: 30px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-tUNCRXMMDqs/Tk1Cd2J9fFI/AAAAAAAAArM/S91jA3Qu8KU/s1600/capstorm0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="201" src="http://1.bp.blogspot.com/-tUNCRXMMDqs/Tk1Cd2J9fFI/AAAAAAAAArM/S91jA3Qu8KU/s320/capstorm0.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div data-mce-style="margin-left: 30px;" style="margin-left: 30px;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: 'times new roman',times;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;Once you have configured and tested both connections, then you can start the copy process. &lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-GkSPPyFd1bk/Tk1C_PEJ6pI/AAAAAAAAArU/wucyr8Bm76A/s1600/capstorm2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" src="http://3.bp.blogspot.com/-GkSPPyFd1bk/Tk1C_PEJ6pI/AAAAAAAAArU/wucyr8Bm76A/s320/capstorm2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;Once the process finishes lets login to Oracle and see how many objects were created in this blank ORA_SFDC schema. &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;So I can see by running an Oracle dictionary view SQL that I get in my Schema only tables, views and LOBs.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-rMFf83K_ntc/Tk1DVkc0xcI/AAAAAAAAArY/SQqSQ5W-oNk/s1600/capstorm3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://3.bp.blogspot.com/-rMFf83K_ntc/Tk1DVkc0xcI/AAAAAAAAArY/SQqSQ5W-oNk/s320/capstorm3.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3d85c6; font-family: 'Courier New',Courier,monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: #3d85c6; font-family: 'Courier New',Courier,monospace; font-size: x-small;"&gt;SQL&amp;amp;amp;amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;pre style="margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6; font-family: 'Courier New',Courier,monospace; font-size: x-small;"&gt;select object_type, count(*)&lt;br /&gt;from user_objects&lt;br /&gt;group by object_type&lt;br /&gt;order by 2 desc&lt;/span&gt;&lt;/pre&gt;&lt;pre style="margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6; font-family: 'Courier New',Courier,monospace; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;pre style="margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: 'Courier New',Courier,monospace; font-size: x-small;"&gt;&lt;span class="Apple-style-span" style="color: #3d85c6;"&gt;OBJECT_TYPE         COUNT(*)               &lt;br /&gt;------------------- ---------------------- &lt;br /&gt;TABLE               161                   &lt;br /&gt;INDEX               161                   &lt;br /&gt;LOB                 89   &lt;/span&gt;                  &lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;That's it, that's what you get in Oracle from a vanilla Salesforce developer Org and a few &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;custom objects that I had in this particular developer org. 161 tables per org only, not bad huh!&lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;Now just imagine what you can do with this! &lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;The other good thing you get with CopyForce is since now you have copied your Salesforceorg  schema and your Salesforce data into Oracle, you can now use SQL to your heart's content and massage &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;this data as you wish! That is, gone are the days where you had to dump Salesforce data to Excel &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;and change it manually before you put  it back into Salesforce. Now you can change your Salesforce &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;data in an Oracle database with all the sophistication ofSQL and put it back to Salesforce. &lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;I think CopyForce has lots of future, and really would be a good choice for one-off data &lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;integration, data beautification projects. &lt;/span&gt;&lt;/pre&gt;&lt;pre style="color: black; margin-bottom: 8px; margin-left: 8px; margin-right: 8px; margin-top: 8px;"&gt;&lt;span class="Apple-style-span" style="font-family: Arial,Helvetica,sans-serif;"&gt;I wonder what is in those LOBs ? I bet is the Apex code....&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-family: 'times new roman',times;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3132725432298677171?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3132725432298677171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3132725432298677171' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3132725432298677171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3132725432298677171'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2011/08/copy-your-salesforce-org-into-oracle.html' title='Copy your Salesforce org into Oracle with CopyForce'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-tUNCRXMMDqs/Tk1Cd2J9fFI/AAAAAAAAArM/S91jA3Qu8KU/s72-c/capstorm0.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4193564264007430457</id><published>2011-07-15T11:30:00.004+01:00</published><updated>2011-07-15T11:35:35.011+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce Exam'/><category scheme='http://www.blogger.com/atom/ns#' term='Dev401'/><category scheme='http://www.blogger.com/atom/ns#' term='DEV 401'/><title type='text'>Salesforce Dev 401 Exam study material</title><content type='html'>Just a quick post to share with you my past &lt;b&gt;Salesforce Dev401&lt;/b&gt; Exam study materials. I have assembled this table&amp;nbsp; of &lt;b&gt;87&lt;/b&gt; questions when I was studying for the exam back in January 2011.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;These are not actual Exam questions, don't be fooled! &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This is study stuff that I have compiled reading the study guides and the available training materials I found online. It did help me pass the exam. The quiz like questions I compiled helped me a lot to understand concepts and limits.&lt;br /&gt;&lt;br /&gt;I have also tried to categorise the questions &amp;amp; quizzes by the Salesforce Dev401 study guide syllabus.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Here is the link to the questions:&lt;/b&gt; &lt;a href="http://apex-outsource.com/pls/apex/f?p=309:Dev401"&gt;http://apex-outsource.com/pls/apex/f?p=309:Dev401&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Hope it helps!&lt;br /&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/18830350-4193564264007430457?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4193564264007430457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4193564264007430457' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4193564264007430457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4193564264007430457'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2011/07/salesforce-dev-401-exam-study-material.html' title='Salesforce Dev 401 Exam study material'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3571359098734986172</id><published>2011-04-02T23:40:00.001+01:00</published><updated>2011-04-02T23:44:16.868+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce API and Oracle'/><title type='text'>Salesforce API call from Oracle APEX</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This post is about integrating Salesforce force.com with Oracle using the Salesforce API.&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;I will try to show you how you can write a PL/SQL procedure to quickly send an SQL INSERT you do in an Oracle table to a Salesforce custom object as well. That is, how you can INSERT to a Salesforce object simultaneously when you insert to an Oracle table. I will use Oracle APEX, an Oracle RAD (Rapid Application Development) tool, as the Oracle database.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;You can achieve this by using the Oracle APEX package &lt;b&gt;APEX_WEB_SERVICE.MAKE_REQUEST&lt;/b&gt; and send SOAP envelopes to the Salesforce WSDL, without the HTTPS option, as I couldn't get that part working with my FREE Salesforce Developer account and my hosted Oracle Apex instance.&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;The idea is simple, you will create the PL/SQL procedure in Oracle, run it and insert data into an Oracle table and a Salesforce custom object simultaneously via SOAP envelope. The SOAP elements will be sent to Salesforce from the PL/SQL block using &lt;/span&gt;&lt;span style="font-size: small;"&gt;the APEX_WEB_SERVICE.MAKE_REQUEST&lt;/span&gt;&lt;span style="font-size: small;"&gt; package. The data flow direction is from Oracle Apex to Salesforce. To do this, you will create two SOAP envelopes.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;1. One to get authenticated and login to Salesforce, once you login you can get the Salesforce sesionID.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;2. And two to send the INSERT (Create in Salesforce parleur) data DML.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Here is the code you run in Oracle, you don't have to do anything in Salesforce, all you need in Salesforce is to have a custom object to insert the data into, your credentials and obviously your XML envelopes should be written accordingly based on the &lt;a href="http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_quickstart_steps.htm"&gt;Salesforce WSDL&lt;/a&gt; which you will generate. I have the following code as a PL/SQL anonymous block in an Oracle Apex page process and does the job for me. Just to save you time, you need an Oracle Apex instance with enabled external network calls, unfortunately &lt;a href="http://apex.oracle.com/"&gt;apex.oracle.com&lt;/a&gt; will not let you do that, that was when I checked it last time, you can always get a low cost fully external network enabled Oracle Apex instance from hosting companies, the one I use is &lt;a href="http://enciva.com/"&gt;Enciva.com&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Enough said, here is the code make sure you pass in your Salesforce credentials with the security token.&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;DECLARE&lt;br /&gt;l_envelope CLOB;&lt;br /&gt;l_envelope_create CLOB;&lt;br /&gt;l_xml XMLTYPE;&lt;br /&gt;l_xml_create XMLTYPE;&lt;br /&gt;v_session_id varchar2(1000);&lt;br /&gt;BEGIN&lt;br /&gt;wwv_flow_api.set_security_group_id;&lt;br /&gt;-- &lt;br /&gt;-- &lt;br /&gt;-- ENVELOPE LOGIN&lt;br /&gt;l_envelope :='&amp;lt;?xml version="1.0" encoding="utf-8"?&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" &lt;br /&gt;xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://&lt;br /&gt;www.w3.org/2001/XMLSchema"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soap:Body&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;login xmlns="urn:enterprise.soap.sforce.com"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;username&amp;gt;YOUR@SALESFORCEUSERNAME&amp;lt;/username&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;password&amp;gt;YOURPASSWORDANDSECURITYTOKEN&amp;lt;/password&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/login&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:Body&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/soap:Envelope&amp;gt;';&lt;br /&gt;&amp;nbsp; &lt;br /&gt;-- make request&lt;br /&gt;l_xml := apex_web_service.make_request(&lt;br /&gt;p_url =&amp;gt; 'http://na7.salesforce.com/services/Soap/c/20',&lt;br /&gt;p_action =&amp;gt; 'http://na7.salesforce.com/services/Soap/c/20/login',&lt;br /&gt;p_envelope =&amp;gt; l_envelope&lt;br /&gt;);&lt;br /&gt;-- &lt;br /&gt;-- ENVELOPE CREATE&lt;br /&gt;-- get session id&lt;br /&gt;-- You will need the salesforce session id , I know this is an ugly way of getting it, write a better one then, I just wanted to get it working&lt;br /&gt;&lt;br /&gt;v_session_id := replace(replace(&lt;br /&gt;substr(substr(l_xml.getClobVal(),0,instr(l_xml.getClobVal(),'&amp;lt;/sessionId&amp;gt;')),instr(substr(l_xml.getClobVal(),0,instr(l_xml.getClobVal(),'&amp;lt;/sessionId&amp;gt;')),'&amp;lt;sessionId&amp;gt;'))&lt;br /&gt;,'&amp;lt;sessionId&amp;gt;',''),'&amp;lt;','');&lt;br /&gt;-- debug&lt;br /&gt;dbms_output.put_line('session_id is: '||v_session_id);&lt;br /&gt;&amp;nbsp; &lt;br /&gt;l_envelope_create :='&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt; &lt;br /&gt;&amp;lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Header&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="urn:enterprise.soap.sforce.com"&amp;gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns2:sessionId xmlns:ns2="urn:enterprise.soap.sforce.com"&amp;gt;'||v_session_id||'&amp;lt;/ns2:sessionId&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/ns1:SessionHeader&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Header&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;soapenv:Body&amp;gt;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;create xmlns="urn:enterprise.soap.sforce.com"&amp;gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;sObjects xsi:type="ns3:linkstream__c" xmlns:ns3="urn:sobject.enterprise.soap.sforce.com"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns3:wbid__c&amp;gt;'||:P3_WBID ||'&amp;lt;/ns3:wbid__c&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns3:Link__c&amp;gt;'||:P3_LINK ||'&amp;lt;/ns3:Link__c&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns3:Description__c&amp;gt;'||:P3_DESCRIPTION ||'&amp;lt;/ns3:Description__c&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ns3:Display_link__c&amp;gt;'||UPPER(:P3_DISPLAY_LINK) ||'&amp;lt;/ns3:Display_link__c&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/sObjects&amp;gt;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/create&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Body&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;lt;/soapenv:Envelope&amp;gt; ';&lt;br /&gt;&lt;br /&gt;dbms_output.put_line(l_envelope_create);&lt;br /&gt;&lt;br /&gt;l_xml_create := apex_web_service.make_request(&lt;br /&gt;p_url =&amp;gt; 'http://na7.salesforce.com/services/Soap/c/20',&lt;br /&gt;p_action =&amp;gt; 'http://na7.salesforce.com/services/Soap/c/20/create',&lt;br /&gt;p_envelope =&amp;gt; l_envelope_create&lt;br /&gt;);&lt;br /&gt;dbms_output.put_line(substr(l_xml_create.getClobVal(),1,25500));&lt;br /&gt;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;div style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/div&gt;As you can see the code executes in one PL/SQL block. You can call the procedure via an Insert Trigger on the Oracle table, or as a 'Page processing' process in Oracle Apex. It ads a link to my force.com sites custom object from my Oracle Apex app. I display this mock force.com sites on the left column in this blog, under 'My force.com apps' section.&lt;br /&gt;&lt;br /&gt;Needless to say, there are maybe dozens of easier ways of doing the same thing between Oracle and Salesforce with tools such as CastIron, Talend, Informatica or Apatar. Some are even free. But hey, this is using no tool but just HTTP! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3571359098734986172?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3571359098734986172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3571359098734986172' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3571359098734986172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3571359098734986172'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2011/04/salesforce-api-call-from-oracle-apex.html' title='Salesforce API call from Oracle APEX'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-1112367061716162352</id><published>2011-01-29T17:50:00.000Z</published><updated>2011-01-29T17:50:41.319Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='force.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='workflow'/><title type='text'>Salesforce workflow</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;What is Salesforce Workflow?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Workflow in force.com, is business logic and in this post I will try to explain it.&lt;br /&gt;&lt;br /&gt;In force.com, you can create custom objects and then you can create relationships on your custom objects according to the application data model you have designed. Very good, but if you don't have workflow, your force.com app will be nothing more than a lousy database. A mere database to enter and search records. What is salesforce anyway? Isn't it a data-centric, based around a database application building platform? Another database front end?&lt;br /&gt;&lt;br /&gt;Not, just that! Force.com workflow will bring this database into life. Instead of being a stagnant repository of passive and past data, it will become a forward thinking and forward acting alive database. Maybe the &lt;i&gt;thinking&lt;/i&gt; bit was a bit of an exaggeration but nevertheless, deductive databases is what we want, isn't it? Maybe one day...&lt;br /&gt;&lt;br /&gt;What the force.com workflow engine does is things like: automatically send email alerts, assign tasks, or update field values based on rules that we define. That is it's job, and that is exactly what it does. The force.com workflow engine, based on rules we define, can:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Assign a 'Task' to a force.com user&lt;/li&gt;&lt;li&gt; Send an email alert to 'anyone' (a valid email will suffice).&lt;/li&gt;&lt;li&gt;Update the field of a particular record on an object&lt;/li&gt;&lt;li&gt;Send an outbound message to an external system, things like webservice call, SOAP etc.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;When does the workflow action fire? &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So a workflow can do all these things. That is great! But when? Based on what? It is nice to have the ability to send emails and update fields, but what determines or induces these actions? Well the answer is, &lt;b&gt;The Workflow Rule&lt;/b&gt;. &lt;br /&gt;&lt;br /&gt;The workflow rule is the main container where all these events are included and are programmed to execute. They execute only when certain workflow '&lt;i&gt;evaluation criteria&lt;/i&gt;' and workflow '&lt;i&gt;rule criteria&lt;/i&gt;' are met. &lt;br /&gt;&lt;br /&gt;That is, the workflow rule is basically watching a custom object (it can only watch over one custom object at a time) and when certain evaluation criteria on the watched custom object and rule criteria (a condition) are met, bang!... Then it activates (fires) the workflow actions and does all the things the workflow can do, like send emails, field updates etc. It sounds so much like a database trigger, hmm... doesn't it?&lt;br /&gt;&lt;br /&gt;The 'evaluation criteria' tells the workflow rule when to watch the custom object. &lt;br /&gt;&lt;br /&gt;The 'rule criteria' tells the workflow rule when to fire the events and based on what condition.&lt;br /&gt;&lt;br /&gt;The 'evaluation criteria' and 'rule criteria' together must be met successfully for the workflow rule to fire. &lt;br /&gt;&lt;br /&gt;Now, for the workflow rule 'evaluation criteria' we have predetermined choices and these are: &lt;br /&gt;&lt;br /&gt;1. When a record is created, or when a record is edited and did not previously meet the rule criteria (this again and again repeatedly triggers the rule every&lt;br /&gt;time a record is saved only until the rule's criteria are met, then it stops, sort of once only if you can say, subsequent edits are ignored)&lt;br /&gt;2. Only when a record is created (this ignores updates to existing records)&lt;br /&gt;3. Every time a record is created or edited (which repeatedly triggers the rule every time the record is saved, it does this only when the rule criteria is met as well).&lt;br /&gt;&lt;br /&gt;These are the only times that we can choose for a workflow to be evaluated. Remember evaluation is not enough, the 'rule criteria' has to be met as well for the workflow actions to fire!&lt;br /&gt;&lt;br /&gt;For setting the 'rule criteria' we have 2 options. We can use a filter like setup, a condition on the watched/associated custom object, i.e when the Status field of the custom object equals to Open(Status=Open) then fire the workflow or when a Formula Expression evaluates to true. &lt;br /&gt;&lt;br /&gt;So to summarise, we can send emails, update fields and do outbound web service calls from force.com using workflow. This is easy to setup, is based on an object and the evaluation and rule criteria must be satisfied for the workflow to fire. Well quite handy piece of work from salesforce, so you don't need to write your own workflows any more! The mantra 'No Software' used in Salesforce's adverts suits this well.&lt;br /&gt;&lt;br /&gt;What are you waiting for? Use your Free developer.force.com account login and go to Setup &amp;gt; Create &amp;gt; Workflow &amp;amp; Approvals &amp;gt; Workflow Rules and start practising.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-1112367061716162352?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/1112367061716162352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=1112367061716162352' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1112367061716162352'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1112367061716162352'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/12/salesforce-workflow.html' title='Salesforce workflow'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-286685700655608590</id><published>2010-12-22T00:30:00.004Z</published><updated>2011-01-29T17:41:59.963Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='force.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce Security'/><title type='text'>Salesforce Security</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Salesforce security? Cloud security? Multi tenancy? I can't believe myself I set off writing a blog entry maybe on the hottest discussion topic in the industry nowadays. No, no, not at all, not yet, not yet. &lt;br /&gt;&lt;br /&gt;I will rather try to quickly outline for the benefit of the interested reader how security is applied within a force.com Org. That is, security which enables or prevents certain users in the Org seeing the other user's records/data and how users are prevented from seeing certain fields and objects in the Org. So in-house Salesforce 'data' security I should say, not inter-cloud security.&lt;br /&gt;&lt;br /&gt;Were you ever interested? We know Oracle and other databases use words like 'permissions' to describe data access. We know applications use words like 'authorisation' or 'authentication' to describe security. Were you ever interested what and how security is accomplished in Salesforce and force.com? If you are, keep on reading, else give up now.&lt;br /&gt;&lt;br /&gt;Data Security in Salesforce is tricky, different and not something which is similar to anything else. There aren't words like 'authorisation' and 'privileges' in the force.com world. Once a Salesforce or force.com user logs in, 'data access' security kicks in. Somebody can only login if he/she is a salesforce user. &amp;nbsp;I use &lt;b&gt;Force.com&lt;/b&gt; and &lt;b&gt;Salesforce&lt;/b&gt; interchangeably here, it is the same platform at the end of the day. And the security in this platform described in descending order from big data to small data access  is something like this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Object Level Security: &lt;/b&gt;This type of security prevents a user form deleting, updating, seeing or creating any instance of the object (record in the table or if you like more old fashioned, tuple in the relation).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Field Level Security: &lt;/b&gt;In this type of security a user is prevented from seeing, editing and/ or deleting the value for a particular field of an object. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;I know you already started visualising a database table. Object, what object?&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;3. Record Level Security: &lt;/b&gt;In this type of security we control data with a little bit more of a 'finesse'. We allow particular users to see an object, but we restrict the individual object records a user can see. A bit like virtual private database (VPD). In Oracle achieved with DBMS_RLS. I wonder how is this done in Salesforce? Salesforce is implemented on an Oracle database anyway. This is hot stuff. Everyone is interested in this nowadays, this means you can slice and dice the 'object' (table) horizontally! How is this done in Salesforce? Well the methods are four.&lt;br /&gt;&lt;blockquote&gt;&lt;b&gt;3.1 Organisational Wide Defaults (OWD):&lt;/b&gt; This is the baseline level of access to objects (tables ;-) ) a user has. OWD is defined for each standard or custom (your make) object in Salesforce. OWD in other words is the "baseline level of access that the most restricted user should have".  Another name for OWD is "Sharing Model".  That is, use OWD to lock-down objects to the most restrictive level. &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;3.2 Role Hierarchies&lt;/b&gt;: Role hierarchy, is the first way we can share access to records per se. OWD is a very 'lock-down' and 'restrictive' thing at the object level, whereas roles is the beginning of opening access to certain records via a hierarchy. The role hierarchy ensures that a manager will always have access to the same data as his or her employees. A polite way of saying your boss owns all your data. That is if you own 10 records in Salesforce, you own them, but your boss owns them as well. Typical, hierarchical record level access control coming down vertically, top to bottom and the 'Top' owns all! You can even assign access through hierarchies on an object-by-object basis as well. &lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;3.3 Sharing Rules:&lt;/b&gt; Is when you start making exceptions, and confusing people. Not really! Sharing rules let us make automatic exceptions to Organisational Wide Defaults (OWD) for particular groups of users. As you realised in Role hierarchies section 3.2 above, the Role Hierarchies enable certain group of people to own lower level people's data. Low, down that is. Well Sharing Rules, don't do down, they do left and right. Did you get it? Basically saying that if there are 2 managers in the same hierarchy at the same level, how would they be able to see each others data? Enter Sharing Rules. Sharing Rules enable the access to records across levels in the hierarchy, by establishing certain groups which contain this same level managers, so that they can share their data. Something like Marketing wants to share its records with the IT department, with Role hierarchy this is not possible unless the departments are one 'under' the other and not across at the same level and next to each other in the hierarchy.&lt;/blockquote&gt;&lt;blockquote&gt;&lt;b&gt;3.4 Manual Sharing:&lt;/b&gt; What manual sharing in few words is to 'give access to your record, to the guy you like'. No, not exactly but similar. With manual sharing you can grant read or read/write access on records that you own to any other user, role, or public group in Salesforce manually whenever you fancy and like. Although it isn't automatically like in all 3 cases above, manual sharing gives you the flexibility to share particular records. So manual sharing is when you can't do it in any of the 3 ways above. That is when you can't grant access to the record via OWD, Role hierarchies and Sharing Rules, you use Manual Sharing. &lt;/blockquote&gt;&lt;br /&gt;This was my attempt to give you a taste of what is data security in force.com. We started by letting you see the object, then playing with which fields of the object you can see, and lastly what records of the object you can see. &lt;br /&gt;&lt;br /&gt;If you are interested to read more on this topic check 'Force.com Fundamentals' by Chris McGuire and Caroline Roth. A very Cloud book.&lt;br /&gt;&lt;blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-286685700655608590?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/286685700655608590/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=286685700655608590' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/286685700655608590'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/286685700655608590'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/12/salesforce-security.html' title='Salesforce Security'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-8425922318817504758</id><published>2010-11-04T21:33:00.001Z</published><updated>2010-11-04T21:37:31.469Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Apache FOP'/><title type='text'>Oracle Apex 4.0 UKOUG SIG in London</title><content type='html'>I attended the &lt;a href="http://www.ukoug.org/"&gt;UKOUG&lt;/a&gt; SIG on Apex 4.0 in London yesterday and learned lots of new things. Thanks to presenters like John Scott from SumNeva and Hillary Farrell from Oracle. Looking forward to receive the seminar notes. &lt;br /&gt;&lt;br /&gt;Briefly the things to take home from this SIG meeting for me were:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Oracle Apex plugins are great. Great presentation from John Scott on this. &lt;/li&gt;&lt;li&gt; In Oracle Apex release 4.0.2, there will be new themes which will render nicely, almost like native apps, on iPhones and iPads.&lt;/li&gt;&lt;li&gt;Lots of tips and tricks on how to scale and tune Oracle Apex using tools like, Jmeter, Firebug, Yslow&lt;/li&gt;&lt;/ul&gt;The Q&amp;amp;A was interesting, as it seems like I am not the only person on earth who thinks that having such an excellent tool such as&amp;nbsp; Oracle Apex without "Publishing" capabilities, printing in PDF, Word etc, is a bad thing. Why doesn't Apex enable you to print in PDF by default? Why do you have to buy more software from Oracle such as BI Publisher to do this?&amp;nbsp; I hope I am not sounding stupid. I know there are Free alternatives which enable you to print in PDF such as Apache FOP, but hey, why can't I just be able to print in PDF out of the box?&lt;br /&gt;&lt;br /&gt;Specifically, Oracle Apex has a feature which enables you to migrate your Oracle Forms &amp;amp; Reports into Apex. That is, you can say bye bye to your Oracle Forms &amp;amp; Reports fat clients and get your Forms &amp;amp; Reports on the web with Apex, a brilliant free alternative, instead of the expensive Oracle Fusion Middleware stack, the new version of Forms &amp;amp; Reports. Who wouldn't want that? Especially in the age of Cloud computing! What a cool idea!&lt;br /&gt;&lt;br /&gt;But there is a snag. You can't just convert your stylish Reports for free.&amp;nbsp; If you want to carry an Oracle PDF report you created in Oracle Reports, say an invoice with colors and boxed sections, pixel-by-pixel as it is to Oracle Apex, you will have to first convert it in BI Publisher to a "Report Layout" file and then import it in your Oracle Apex workspace. There is no other way to extract the XSLT from your Oracle Report and upload it to Oracle Apex, you will have to go through the BI Publisher route. Prove me wrong, please has anyone found another free and legitimate way?&lt;br /&gt;&lt;br /&gt;You might say, with a bit of configuration work you can get Apache FOP to print you PDF output from your Apex reports and regions and you can do that free. You can even create new layouts and print them in PDF using Apache FOP, that is fine. But what if you want to migrate 100 reports, all invoice and billing templates which took developers ages to create? You will realize that to move an existing Oracle Reports report style (XSLT) into Oracle Apex as-it-is, pixel-by-pixel is possible only through BI Publisher. I tried and researched deep and wide on this topic. Is there anybody  who managed to extract XSLT from their existing Oracle Reports and  create an Apex Report layout?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I like Apex, I like the idea.&amp;nbsp; But to get the&amp;nbsp; business and the managers to like it, will have to do a little bit more.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-8425922318817504758?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/8425922318817504758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=8425922318817504758' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/8425922318817504758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/8425922318817504758'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/11/oracle-apex-40-ukoug-sig-in-london.html' title='Oracle Apex 4.0 UKOUG SIG in London'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-879716282692807522</id><published>2010-10-22T14:36:00.020+01:00</published><updated>2010-10-24T23:42:59.417+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml db'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Streams'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Streams Synchronous Capture'/><title type='text'>Oracle 11g Streams Synchronous Capture</title><content type='html'>Have you ever wanted just to maintain a table in two different databases? In two different schemas? Something like replicating, keeping a copy of a table in sync in another database, not in real-time, but almost real time? There is an easy way, use Oracle Streams Synchronous Capture!&lt;br /&gt;&lt;br /&gt;Many times in development I get this request, where a developer in a team will come with a request like "Can we get a copy of that table in our schema in some sort of sync please?". Alternative ways of providing the developer with this table would be backup/restore, data-pump,  both not so much "in sync" and overkill solutions. There is a better way, Oracle Streams Synchronous Capture.&lt;br /&gt;&lt;br /&gt;Oracle Streams is a tool which propagates information between databases using Advance Queuing in almost real-time. It has 3 main components &lt;b&gt;Capture, Propagate&lt;/b&gt; and &lt;b&gt;Apply&lt;/b&gt;. Capture is the process with which you capture the data in the source database. Propagate is the process which transfers the data from the source database to the target database. The Apply process  copies (inserts) the data into the target database, once the data arrives to the target database. Oracle Streams is easy to setup and use, most important of it all, it is FREE. Yes, Oracle Streams would be the perfect candidate to have data available in two or more database systems in sync for whatever reason, be it development tests, production replication between sites or whatever legitimate reason you want a copy of your data to exist somewhere else as well.&lt;br /&gt;&lt;br /&gt;You might argue, there is something fundamentally wrong with asking to have a copy of the data. That is, the data twice, three times and even more, in different places. The action of having the copy of data in different places not in real-time, with delay, might dilute the truth and might even version the truth. When all we want is just "one" truth, one real and correct answer. Oracle streams usually will have two ends, the source database and the target database. There is nothing stopping us from changing the data of the target database after it is streamed down from the source. I will probably agree with you if you are thinking like this. Nevertheless, Oracle Streams still proves useful.&lt;br /&gt;&lt;br /&gt;Reading the &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_over.htm" target="_blank"&gt;Oracle documentation on Oracle Streams&lt;/a&gt; you can see that although there are multiple ways to configure Oracle Streams, there seems to be only 2 kinds of Oracle Streams. The Asynchronous Redo Log Capture based Streams and the Synchronous Capture "internal-mechanism/trigger" based Streams. Both have their uses. The former is the heavy weight type, where all changes on your source database objects are captured from the Redo Logs of the source database and then they are propagated in the Redo Logs of the target database where the Apply process picks them up and applies them. A system suitable if you want to stream everything,  including DML and DDL, between the source and target databases, or more just than few tables. On the other hand, if you just want to stream only the DML of few tables between databases then you can use Oracle Streams Synchronous Capture, where triggers are used to capture the changes as they happen in the source database and then propagate the changes to the target database,no redo log mining is used for this. This is exactly what this post is all about, using Oracle Streams Synchronous Capture to replicate few tables between databases, a New Feature of Oracle 11g, which doesn't rely on archivelogs or redo logs to propagate DML changes on tables between databases. &lt;br /&gt;&lt;br /&gt;Below is a step-by-step implementation of Oracle Synchronous Capture in Oracle 11g. I use two database instances &lt;i&gt;SOURDB&lt;/i&gt; for the source database and &lt;i&gt;TARGDB&lt;/i&gt; for the target database. I create two Oracle Streams administrator schemas on these databases first. Then I create the Oracle Streams users, the table and the capture, propagate and apply processes. The PL/SQL package &lt;b&gt;DBMS_APPLY_ADM&lt;/b&gt; is used, although if you read the documentation you will see that there are other packages which you can use.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Step by step implementation&lt;/h3&gt;&lt;br /&gt;1. Create U_SOURCE users to be used for the test on both databases. Yes on both systems the users is called U_SOURCE, as it has to be identical for the following example to work. You can have different usernames, but then you have to create a transformation process, look in the documentation you will understand. I didn't want this blog entry to take forever, I took a shortcut by naming both schemas in both databases SOURDB and TARGDB as U_SOURCE.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;-- on SOURDB create user&lt;br /&gt;connect / as sysdba&lt;br /&gt;&lt;br /&gt;create user u_source&lt;br /&gt;identified by u_source&lt;br /&gt;default tablespace users&lt;br /&gt;temporary tablespace temp;&lt;br /&gt;&lt;br /&gt;grant connect,resource to u_source;&lt;br /&gt;&lt;br /&gt;-- db link to connect to target&lt;br /&gt;CREATE DATABASE LINK TARGDB CONNECT TO strmadmin&lt;br /&gt;IDENTIFIED BY strmadmin&lt;br /&gt;USING 'TARGDB';&lt;br /&gt;&lt;br /&gt;-- on TARGDB create user&lt;br /&gt;&lt;br /&gt;connect / as sysdba&lt;br /&gt;&lt;br /&gt;create user u_source&lt;br /&gt;identified by u_source&lt;br /&gt;default tablespace users&lt;br /&gt;temporary tablespace temp;&lt;br /&gt;grant connect,resource to u_source;&lt;br /&gt;&lt;br /&gt;-- db link to connect to source&lt;br /&gt;CREATE DATABASE LINK SOURDB CONNECT TO strmadmin&lt;br /&gt;IDENTIFIED BY strmadmin&lt;br /&gt;USING 'SOURDB';&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;2. Now create the Streams Administrator users on both SOURDB and TARGDB databases, with their own STREAMS tablespace. Run the script below on SOURDB as well as TARGDB as SYSDBA. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;CREATE TABLESPACE streams_tbs&lt;br /&gt;DATAFILE SIZE 25M&lt;br /&gt;AUTOEXTEND ON MAXSIZE 256M;&lt;br /&gt;&lt;br /&gt;CREATE USER strmadmin IDENTIFIED BY strmadmin&lt;br /&gt;DEFAULT TABLESPACE streams_tbs&lt;br /&gt;QUOTA UNLIMITED ON streams_tbs;&lt;br /&gt;&lt;br /&gt;grant dba to strmadmin;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;3. Now is time to create the Capture process in the SOURDB. We use Oracle AQ as the structure to capture DML changes. That is why first we need to create the queue and then add the table which we want to capture the changes from. Also, in synchronous capture you don't have to start the capture process, it starts automatically once you create the table rule.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;--in SOURCEDB as user STRMADMIN set up the queue&lt;br /&gt;--if you want to remove queue use &lt;br /&gt;--exec dbms_streams_adm.remove_queue('strmadmin.SOURDB_queue',true,true);&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.SET_UP_QUEUE(&lt;br /&gt;queue_table =&amp;gt; 'strmadmin.SOURDB_queue_table',&lt;br /&gt;queue_name  =&amp;gt; 'strmadmin.SOURDB_queue',&lt;br /&gt;queue_user  =&amp;gt; 'strmadmin');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;4. Now still as the STRMADMIN user in the SOURDB which owns the above queue, you can add the table from which you want to capture the changes like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_TABLE_RULES(&lt;br /&gt;table_name   =&amp;gt; 'U_SOURCE.T1',&lt;br /&gt;streams_type =&amp;gt; 'SYNC_CAPTURE',&lt;br /&gt;streams_name =&amp;gt; 'SYNC_CAPTURE',&lt;br /&gt;queue_name   =&amp;gt; 'strmadmin.SOURDB_queue',&lt;br /&gt;include_dml  =&amp;gt; true,&lt;br /&gt;include_ddl  =&amp;gt; false,&lt;br /&gt;include_tagged_lcr =&amp;gt; false,&lt;br /&gt;inclusion_rule =&amp;gt; true,&lt;br /&gt;source_database =&amp;gt; 'SOURDB');&lt;br /&gt;END;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;5. Still logged in as the STRMADMIN user in SOURDB, create the propagation process between SOURDB and TARGDB. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;--To drop existing propagation&lt;br /&gt;--BEGIN&lt;br /&gt;--DBMS_PROPAGATION_ADM.DROP_PROPAGATION('strmadmin.SOURDB_propagation');&lt;br /&gt;--END;&lt;br /&gt;&lt;br /&gt;--To create a propagation between SOURDB to TARGDB&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(&lt;br /&gt;table_name              =&amp;gt; 'u_source.t1',&lt;br /&gt;streams_name            =&amp;gt; 'SOURDB_propagation',&lt;br /&gt;source_queue_name       =&amp;gt; 'strmadmin.SOURDB_queue',&lt;br /&gt;destination_queue_name  =&amp;gt; 'strmadmin.TARGDB_queue@TARGDB',&lt;br /&gt;include_dml             =&amp;gt; TRUE,&lt;br /&gt;include_ddl             =&amp;gt; FALSE,&lt;br /&gt;include_tagged_lcr      =&amp;gt; FALSE,&lt;br /&gt;source_database         =&amp;gt; 'SOURDB',&lt;br /&gt;inclusion_rule          =&amp;gt; TRUE,&lt;br /&gt;queue_to_queue          =&amp;gt; TRUE);&lt;br /&gt;END;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;6. On the target database TARGDB create the Apply process, again first you will have to create the queue and then the Apply process.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;--exec dbms_streams_adm.remove_queue('strmadmin.TARGDB_queue',true,true);&lt;br /&gt;BEGIN&lt;br /&gt;DBMS_STREAMS_ADM.SET_UP_QUEUE(&lt;br /&gt;queue_table =&amp;gt; 'strmadmin.TARGDB_queue_table',&lt;br /&gt;queue_name  =&amp;gt; 'strmadmin.TARGDB_queue',&lt;br /&gt;queue_user  =&amp;gt; 'strmadmin');&lt;br /&gt;END;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;--now create the apply process &lt;br /&gt;begin&lt;br /&gt;dbms_apply_adm.create_apply(&lt;br /&gt;queue_name      =&amp;gt; 'strmadmin.TARGDB_queue',&lt;br /&gt;apply_name      =&amp;gt; 'sync_apply',&lt;br /&gt;apply_captured  =&amp;gt; false); &amp;amp;lt;-- very important to be set to FALSE!       end;       /  --set Apply process rule, which table etc..  begin dbms_streams_adm.add_table_rules( table_name         =&amp;gt; 'U_SOURCE.T1',&lt;br /&gt;streams_type       =&amp;gt; 'APPLY',&lt;br /&gt;streams_name       =&amp;gt; 'SYNC_APPLY',&lt;br /&gt;queue_name         =&amp;gt; 'strmadmin.TARGDB_queue',&lt;br /&gt;include_dml        =&amp;gt; true,&lt;br /&gt;include_ddl        =&amp;gt; false,&lt;br /&gt;include_tagged_lcr =&amp;gt; false,&lt;br /&gt;source_database    =&amp;gt; 'SOURDB');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;7. Once you have created the Apply process on the target database, you will have to instantiate the target database 'replica' table with the SCN number. This creates a point in time on the target table which shows the point the target table started accepting changes from the source database table. So, in the target database TARGDB as the user U_SOURCE  do the following:&lt;br /&gt;&lt;br /&gt;&lt;code&gt; &lt;br /&gt;select dbms_flashback.get_system_change_number apply_scn from dual;&lt;br /&gt;&lt;br /&gt;insert into u_source.t1&lt;br /&gt;(select *&lt;br /&gt;from u_source.t1@SOURDB as of scn 13983123089);&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;--Instantiate, point of no turning back! &lt;br /&gt;begin&lt;br /&gt;dbms_apply_adm.set_table_instantiation_scn(&lt;br /&gt;source_object_name   =&amp;gt; 'u_source.t1',&lt;br /&gt;source_database_name =&amp;gt; 'SOURDB',&lt;br /&gt;instantiation_scn    =&amp;gt; 13983123089);&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;--Confirm the instantiation is complete &lt;br /&gt;select source_database,&lt;br /&gt;source_object_owner||'.'||source_object_name object,&lt;br /&gt;instantiation_scn&lt;br /&gt;from dba_apply_instantiated_objects;&lt;br /&gt;&lt;br /&gt;--Start the Apply process, from this point onwards all changes in source table T1 are &lt;br /&gt;--propagated to the target table T1.&lt;br /&gt;begin&lt;br /&gt;dbms_apply_adm.start_apply('SYNC_APPLY');&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;8. Now, you can test the setup by going to the SOURDB U_SOURCE schema and inserting some rows to the table T1 and coming back to the TARGDB U_SOURCE schema and seeing the changes being replicated. If everything went&amp;nbsp;alright, your DML will be propagated across from source to target, as a logical chanage record (LCR) as the Oracle Streams&amp;nbsp;parlor denotes it.&lt;br /&gt;&lt;br /&gt;For more reading and monitoring of the Oracle Streams operation go to &lt;a href="http://download.oracle.com/docs/cd/B28359_01/server.111/b28321/strms_cpmon.htm#CFFBEDGE" target="_blank"&gt;Monitoring a Capture Process&lt;/a&gt; You can also use Oracle Enterprise Manager to monitor Oracle Streams. Unfortunately although you CAN setup the first type of Oracle Streams using Redo Logs with Enterprise Manager, you CAN NOT setup Oracle Streams Synchronous Capture.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-879716282692807522?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/879716282692807522/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=879716282692807522' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/879716282692807522'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/879716282692807522'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/10/oracle-11g-streams-synchronous-capture.html' title='Oracle 11g Streams Synchronous Capture'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>2</thr:total><georss:featurename>Westminster, London, UK</georss:featurename><georss:point>51.5001524 -0.1262362</georss:point><georss:box>51.286429399999996 -0.5931552 51.7138754 0.34068279999999995</georss:box></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-7595307149736006006</id><published>2010-09-11T21:58:00.005+01:00</published><updated>2010-10-24T22:57:08.378+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xml db'/><category scheme='http://www.blogger.com/atom/ns#' term='web service'/><title type='text'>Web services</title><content type='html'>I have been going around websites/wikis to find a definition for, w&lt;b&gt;hat is a webservice? &lt;/b&gt;Especially I was interested to find out the kind of web services, which of course, have to do with databases, Oracle in particular.&amp;nbsp;I spend the whole day looking at certain websites and here is my DIY one-liner definition:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Web services is all about give and take data over HTTP. When you give data you are a 'provider' of a web service and when you take data you are a 'consumer' of a web service.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Oracle 11g is doing both.&lt;br /&gt;&lt;br /&gt;You can turn your Oracle database into web service provider, a source of data for the internet where people can come to a certain URL (WSDL) and be able to query data that you keep in your database, just using HTTP. The visitors to this URL will run your database PL/SQL procedures, functions and packages using this URL and then they will be able to read the results. This setup is called being a provider of a web service.&lt;br /&gt;&lt;br /&gt;On the other hand, being a consumer of a web service in Oracle, is being able to write SQL or PL&lt;br /&gt;/SQL which makes external calls from your Oracle database to other web service providers' services on the internet. I have used this type of webservices in my blog. An example of such a web service is when you make an HTTP_REQUEST to the Google Maps API or other sources such as Yahoo and PayPal which themselves are providers of web services. See this demo app&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p align="center"&gt;&lt;br /&gt;&lt;a href="http://apex-outsource.com/pls/apex/f?p=237:GreekIslands" target="_blank"&gt;&lt;img border="0" height="120" src="http://4.bp.blogspot.com/_s3yzuaSeYss/TJ3SCdW240I/AAAAAAAAAjM/8ZLZPgz19ro/s200/GreekIslands.png" width="200" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;When your database makes a call to an external web services then you become the consumer of &amp;nbsp;a web service.&lt;br /&gt;&lt;br /&gt;A platform to try both, with no hassle, of course is Oracle Apex. The installation of Apex in Oracle 11g will enable you to use web services in both ways described above.&lt;br /&gt;&lt;br /&gt;The best place to start is &lt;a href="http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm#CHDECACB"&gt;Chapter 33&lt;/a&gt;&amp;nbsp;of&amp;nbsp;&lt;b&gt;Oracle XML Developers Guide&lt;/b&gt;. Here you will find how to setup and get Oracle 11g to use &lt;b&gt;Native Oracle XML DB web services&lt;/b&gt;. Once you set up, all you have to do really is create a PL/SQL procedure or function and the WSDL is automatically generated and saved in Oracle for you. All you have to do then is just run the procedure from the URL via a little program which will call this web service, yes you can use 'wget' or any other command line script which will make a call to web service.&lt;br /&gt;&lt;br /&gt;The next link is a good blog entry which describes step by step how to setup Native Oracle XML DB Web Services &amp;nbsp;and how to Access PL/SQL stored Procedures Using a Web Service in Oracle.&amp;nbsp;The post is called the &amp;nbsp;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; font-weight: normal;"&gt;&lt;a href="http://tardate.blogspot.com/2007/08/first-tests-of-11g-native-web-services.html"&gt;First Tests of 11g native web services by Paul Gallagher&lt;/a&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: medium; font-weight: normal;"&gt;&amp;nbsp;I really liked Paul's post, is concise and straight to the point. It even has a perl script which tests to see if your web service provider database setup works.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Other related posts on the topic of Oracle web services are:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.liberidu.com/blog/?p=471"&gt;Create a Native Database Web Service by Marco Gralike&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-7595307149736006006?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/7595307149736006006/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=7595307149736006006' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7595307149736006006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7595307149736006006'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/09/web-services.html' title='Web services'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_s3yzuaSeYss/TJ3SCdW240I/AAAAAAAAAjM/8ZLZPgz19ro/s72-c/GreekIslands.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4125399140749163078</id><published>2010-06-21T00:15:00.004+01:00</published><updated>2010-10-24T23:06:06.574+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='xmlagg'/><category scheme='http://www.blogger.com/atom/ns#' term='connect by'/><title type='text'>CONNECT_BY_ROOT with XMLAGG</title><content type='html'>This is a post about Oracle hierarchical queries. The other day I was after a solution which would display the hierarchy in the execution of some PL/SQL procedures. That is, there was&amp;nbsp; a main procedure which would call several dozens of other procedures in a predefined order. This order was pre-recorded in a table. What I was after was the ancestral relationship in the order of executions. To demonstrate simply, say there is table called steps, which looks like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;MAIN_ID                DEPENDANT_ID           &lt;br /&gt;---------------------- ---------------------- &lt;br /&gt;1                      2&lt;br /&gt;1                      3   &lt;br /&gt;2                      4&lt;br /&gt;2                      3&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Process MAIN_ID 1 depends on the execution of 2 and 3 first and then 2 depends on the execution of 4 and 3. Can we execute 1 after we execute 2 and 3? &lt;br /&gt;&lt;br /&gt;Well the table says YES!. But how about ancestry? We can clearly see that for process 2 to execute process 4 must execute first! Wouldn't it be nicer, if we could show this ancestry relationship via an SQL query straight out of this table? An SQL query which would show us  all dependants of 1 and 2, including parents, granddads etc...&lt;br /&gt;&lt;br /&gt;So the results we are after could look like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;MAIN_ID                DEPENDS_ONTHIS&lt;br /&gt;---------------------- --------------&lt;br /&gt;1                      2,4,3  &lt;br /&gt;2                      3,4 &lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Here is the query to obtain such hierarchical relationships out of this table by using the &lt;b&gt;CONNECT_BY_ROOT&lt;/b&gt;,  Oracle 10g operator and some &lt;b&gt;XMLAGG&lt;/b&gt; function magic for hierarchical queries:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;select main_id, rtrim(xmlagg(xmlelement(d, dependant_id||',')).extract ('//text()'),',') depends_onthis &lt;br /&gt;from &lt;br /&gt;(&lt;br /&gt;SELECT&amp;nbsp; distinct connect_by_root main_id main_id,&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; dependant_id&lt;br /&gt;&amp;nbsp; FROM steps&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; CONNECT BY prior dependant_id=main_id&lt;br /&gt;&amp;nbsp; ORDER BY 1,2&lt;br /&gt;)&lt;br /&gt;group by main_id&lt;br /&gt;order by main_id&lt;br /&gt;&lt;br /&gt;MAIN_ID                DEPENDS_ONTHIS&lt;br /&gt;---------------------- --------------&lt;br /&gt;1                      2,4,3  &lt;br /&gt;2                      3,4 &lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;I found this new Operator in Oracle 10g amusing and cool. Here is the &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/operators004.htm#i1035022"&gt;Oracle documentation&lt;/a&gt;: &lt;br /&gt;&lt;br /&gt;And here is the test table scripts if you want to run the above test case for yourself:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;drop table steps;&lt;br /&gt;&lt;br /&gt;create table steps &lt;br /&gt;(&lt;br /&gt;main_id number, &lt;br /&gt;dependant_id number&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;insert into steps values (1,2);&lt;br /&gt;insert into steps values (1,3);&lt;br /&gt;insert into steps values (2,4);&lt;br /&gt;insert into steps values (2,3);&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-4125399140749163078?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4125399140749163078/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4125399140749163078' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4125399140749163078'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4125399140749163078'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/06/connectbyroot-with-xmlagg.html' title='CONNECT_BY_ROOT with XMLAGG'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4274964450732494759</id><published>2010-04-01T20:52:00.009+01:00</published><updated>2010-10-24T22:56:25.255+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ATOMIC_REFRESH'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Warehousing'/><title type='text'>Materialized View Refresh and the ATOMIC_REFRESH parameter</title><content type='html'>&lt;span style="font-family: inherit;"&gt;When refreshing big materialized views in large data warehouses it is always good to check the parameter options available in the DBMS_MVIEW.REFRESH procedure.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Oracle changes the default parameters of its DBMS packages from release to release. I remember back at the times of Oracle 9i a complete refresh would truncate the materialized view, thus the only work that the database was actually doing in a complete refresh, was just an INSERT after the TRUNCATE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Now in Oracle 10g and Oracle 11g parameters have changed. When there is a COMPLETE materialized view refresh, for the purposes of data preservation, a DELETE is done instead of a TRUNCATE! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;The reason for this is because Oracle "changed" the default parameter value of ATOMIC_REFRESH in the DBMS_MVIEW.REFRESH package. In earlier releases the parameter was set to FALSE by default but now it is set to TRUE, which forces a DELETE of the materialized view instead of&amp;nbsp; TRUNCATE, making the materialized view more "available" at refresh time.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;But this DELETE is an expensive operation in terms of refresh time it takes. A DELETE is always expensive and sometimes even impossible when we are talking about the complete refresh of materialized views with millions of rows. At COMPLETE refresh a DELETE command takes long time, as it has to make the materialized view available to the users and comply with the ACID theory and its transactional reasons, but who cares? What if we really want to get the refresh done quickly and we don't care about the availability of the materialized view, say in a data warehouse maintenance window?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;I have tested how the refresh time improves when you set the ATOMIC_REFRESH =&amp;gt; FALSE in the procedure on a 1 CPU home computer with Oracle 11g. If you have more CPUs it will even be quicker because of the PARALLEL parameter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;I just wanted to show the improvement you get in refresh times when ATOMIC_REFRESH is FALSE and Oracle does a&amp;nbsp; TRUNCATE instead of a DELETE at complete refresh. A real time saver with big materialized views in data warehouses.&lt;/span&gt; Here is the test:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-- Enable parallel DML&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ALTER SESSION FORCE PARALLEL DML&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-- Cleanup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-- DROP TABLE BASE_TABLE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-- Create the Test table&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;CREATE TABLE BASE_TABLE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; id NUMBER(10) PRIMARY KEY NOT NULL,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; X&amp;nbsp; VARCHAR2(255),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y&amp;nbsp; VARCHAR2(255)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; PARTITION BY RANGE&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; INTERVAL&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; )&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; (&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PARTITION P1 VALUES LESS THAN (100000),&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PARTITION P2 VALUES LESS THAN (200000)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; );&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;-- Make the test table paralllel&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;ALTER TABLE BASE_TABLE PARALLEL 5&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Load the test table with data from a dummy cartesian join so that you get millions of rows. Do you like my loop? Loops only once. Well I had it there to add more millions if I wanted to :-) &amp;gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;BEGIN&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; FOR I IN 1 .. 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; LOOP&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INSERT&amp;nbsp;&amp;nbsp; /*+ PARALLEL(BASE_TABLE, 5) */&amp;nbsp;&amp;nbsp;&amp;nbsp; INTO BASE_TABLE SELECT ROWNUM, a.object_name, a.status&amp;nbsp; FROM all_objects a, emp b, dept c;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; END LOOP;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;END;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;3010392 rows inserted&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Create a materialized view log for fast refresh&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DROP MATERIALIZED VIEW LOG ON BASE_TABLE;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;CREATE MATERIALIZED VIEW LOG ON BASE_TABLE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Create the fast refresh materialized view&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;DROP MATERIALIZED VIEW MV_BASE_TABLE;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;CREATE materialized VIEW mv_base_table parallel 5 refresh fast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;AS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;&amp;nbsp; SELECT * FROM BASE_TABLE;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Update the Test table to simulate changing data&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;UPDATE BASE_TABLE SET Y='INVALID';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;3010392 rows updated&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Now you are ready to do the materialized view refresh with the ATOMIC_REFRESH values set to TRUE and then to FALSE. Observe the refresh times. &lt;/span&gt;&lt;span style="font-family: inherit;"&gt;Refresh the materialized view with the two different values in the&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;ATOMIC_REFRESH parameter.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;TRUE case with DELETE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;EXEC DBMS_MVIEW.REFRESH(LIST =&amp;gt; 'MV_BASE_TABLE', METHOD =&amp;gt; 'C', ATOMIC_REFRESH =&amp;gt; TRUE);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Elapsed 558.8 seconds&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Now is time to do the test with the ATOMIC_REFRESH parameter set to FALSE.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;FALSE case with TRUNCATE&lt;/span&gt;&lt;span style="font-family: inherit;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Must update again to simulate change in the logs&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;UPDATE BASE_TABLE SET Y='VALID';&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;COMMIT;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;EXEC DBMS_MVIEW.REFRESH(LIST =&amp;gt; 'MV_BASE_TABLE', METHOD =&amp;gt; 'C', ATOMIC_REFRESH =&amp;gt; FALSE);&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;"&gt;Elapsed 215.3 seconds&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: inherit;"&gt;Half the time! Well if you have real computers it will be much faster. So again we see DELETE is really not good when you work with millions of rows. Nice to have options!&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-4274964450732494759?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4274964450732494759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4274964450732494759' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4274964450732494759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4274964450732494759'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/04/materialized-view-refresh-and.html' title='Materialized View Refresh and the ATOMIC_REFRESH parameter'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>3</thr:total><georss:featurename>London, UK</georss:featurename><georss:point>51.5001524 -0.1262362</georss:point><georss:box>51.473436899999996 -0.1846012 51.5268679 -0.06787119999999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3647555510945855176</id><published>2010-02-01T19:30:00.031Z</published><updated>2010-10-24T23:06:58.491+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Migrate your database to ASM'/><category scheme='http://www.blogger.com/atom/ns#' term='ASM'/><title type='text'>Migrate your Oracle 10g database to ASM</title><content type='html'>This blog entry is about migrating your Oracle 10g database to ASM using OEM Database Control on ubuntu 9.10 Karmic Koala. To be able to do this you must have:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;CSS service running on your ubuntu box&lt;/li&gt;&lt;li&gt;ASM instance running&lt;/li&gt;&lt;li&gt;OEM Database control&amp;nbsp;running&lt;/li&gt;&lt;/ul&gt;To resolve your problems of starting the Oracle CSS daemon and ASM instance running on Ubuntu Karmic Koala, follow the resources I give below.&lt;br /&gt;&lt;br /&gt;You will have to do some hocus-pocus with some parameters to adjust memory, improvise disks with &lt;i&gt;dd&lt;/i&gt; (cause I only had one) and CSS script startup hick-ups. Insist with the resources excession.org.uk and pythian.com and oraclebase kindly provide and you will be running ASM on single instance on ubuntu 9.10 Karmic Koala in no time.&lt;br /&gt;&lt;br /&gt;You should have the above three ready before you attempt to migrate your databases to ASM. You must go through the trouble and create an ASM instance with DBCA as per the resource below. No ASM instance no migration!&lt;br /&gt;&lt;br /&gt;Once you are ready there only 4 steps to follow on the OEM and they are easy!&lt;br /&gt;&lt;br /&gt;&lt;b&gt;About ASM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;For years DBAs and SAs have been looking over spindles and trying to decide where to put what. Which files shall I put on which disk? RAID this RAID that and so on...&lt;br /&gt;&lt;br /&gt;What is the best way to tune I/O for Oracle?&lt;br /&gt;&lt;br /&gt;The answer is, easily enough, Let Oracle tune I/O for you with their &lt;b&gt;SAME (Stripe and Mirror Everything)&lt;/b&gt; approach. More, the mirroring and striping is done at the extent level and file level and not disk level.&lt;br /&gt;&lt;br /&gt;That is exactly what ASM does, it balances I/O activity. It is an Oracle instance which runs alongside your database instances, in memory, and balances the I/O of database data files. It balances and tunes I/O whenever you add disks or you drop them, even online with no intrusion!&lt;br /&gt;&lt;br /&gt;All your Oracle datafiles now are controlled by ASM and the way it does it is that&amp;nbsp;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman', sans-serif; font-size: small;"&gt;ASM makes sure that &lt;b&gt;a file is evenly spread across all disks&lt;/b&gt; when the file is allocated, so rebalancing is not required.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman', sans-serif; font-size: small;"&gt;All this sounds very good, if we don't care about I/O tuning what will happen to SQL Tuning? Are we going to do structural and logical tuning only?&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman', sans-serif; font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="border-collapse: collapse; font-family: 'Times New Roman', sans-serif; font-size: small;"&gt;Further, with emergence of "Oracle TimesTen In memory" database technology where the whole database can be loaded easily in solid state memory (Flash Disks), I wonder how long will ASM last?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources:&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.excession.org.uk/blog/installing-oracle-on-ubuntu-karmic-64-bit.html"&gt;http://www.excession.org.uk/blog/installing-oracle-on-ubuntu-karmic-64-bit.html&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.pythian.com/news/810/howto-set-up-oracle-asm-on-ubuntu-gutsy-gibbon/"&gt;http://www.pythian.com/news/810/howto-set-up-oracle-asm-on-ubuntu-gutsy-gibbon/&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;a href="http://www.oracle-base.com/articles/10g/AutomaticStorageManagement10g.php"&gt;&lt;b&gt;http://www.oracle-base.com/articles/10g/AutomaticStorageManagement10g.php&lt;/b&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3647555510945855176?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3647555510945855176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3647555510945855176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3647555510945855176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3647555510945855176'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/02/migrate-your-oracle-10g-database-to-asm.html' title='Migrate your Oracle 10g database to ASM'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-1687844014980409774</id><published>2010-01-19T14:38:00.008Z</published><updated>2010-10-24T23:06:58.496+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='force.com'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Visualforce'/><title type='text'>Salesforce and force.com</title><content type='html'>I like &lt;a href="http://www.salesforce.com/"&gt;salesforce.com&lt;/a&gt; and &lt;a href="http://developer.force.com/"&gt;force.com&lt;/a&gt;. Both I think are real pioneers in the &lt;i&gt;terra-incognita&lt;/i&gt;, or maybe I should call it the &lt;i&gt;nimbus-incognita&lt;/i&gt;, which is called the "Cloud-platform". Both are very easy to use SaaS (Software as a Service) platforms. The applications are based on solid data modelling principles and the back-end relational database used is a massive parallel implementation of Oracle databases around the world. You can check their systems availability and the number of transactions done per day here &lt;a href="http://trust.salesforce.com/trust/status/"&gt;trust.salesforce.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Although salesforce insists that their applications are stored in objects which are not "just database tables", their first step in creating an application involves capturing the data model. This is really a very "database" platform.&lt;br /&gt;&lt;br /&gt;The platform offers a solid 2x2=4 environment to build and host applications and all work is done with a browser. That is, their IDE is the browser. They even provide you with a sandbox for your unit tests and and Eclipse plug-in for code access to the platform. The IDE is shared between their CRM platform salesforce.com and their developer platform force.com. In the salesforce.com platform you are able to extend a complete and very well designed CRM data model to include anything you wish. In the force.com platform you can create&amp;nbsp;applications&amp;nbsp;from scratch about anything! Among the two, force.com is what impressed me the most and made me to write this blog post. There is not much to be done in the salesforce.com platform, as is a complete working CRM application in itself which would suit any size company which needs a good CRM system.&lt;br /&gt;&lt;br /&gt;Force.com on the other hand is a blank canvas. As long as you now what you want, you can start building it straight away. You start with the data model, then you determine your objects, and their relationships and once you have layered your data model in your system, the platform straight away provides you with the means to update and insert records in the back-end database. It automatically builds forms and reports. It also provides you with work-flow and automatic callendaring and emailing functions. Plus, it has a coding language called Apex, which is Java like with classes and triggers enabling you to enhance your application logic. It also has a very HTML like markup language called Visualforce. If you want to migrate your legacy data into the platform you should look at cloud ready ETL and data integration tools like &lt;a href="http://www.informaticaondemand.com/"&gt;Informatica&lt;/a&gt; (£££) and &lt;a href="http://uk.talend.com/index.php"&gt;Talend Open Studio &lt;/a&gt;&amp;nbsp;(free).&lt;br /&gt;&lt;br /&gt;A project I recently have done in Kizoom using this platform which took me 82 hours that is 10 days approximately to complete. The project was migrating all data and application logic from a legacy database system to force.com. During my work, data integration tools like Informatica and Talend helped me to move the data quickly into the force.com data model, and the already built in features of force.com provided me data entry forms and advanced reports. Because all this is in the cloud I was able to easily utilise geolocation with Google Maps API. The legacy system was a Microsoft SQL Server online database of fault records of computers in publicly available street kiosks around UK. Force.com made the application available in the cloud which meant the UK-wide field engineers of the company were able to easily login and access it on the road without having to use the company network (VPN) but just the cloud.&lt;br /&gt;&lt;br /&gt;Below is a snapshot of the app.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_s3yzuaSeYss/S1XJiLPbnGI/AAAAAAAAAf0/bYAGivngjyk/s1600-h/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_s3yzuaSeYss/S1XJiLPbnGI/AAAAAAAAAf0/bYAGivngjyk/s320/Screenshot.png" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;The platform is very capable, easy to use and very&amp;nbsp;intuitive. It has tremendous potential and achieves good economics in the development efforts. One shouldn't be shy to use it.&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-1687844014980409774?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/1687844014980409774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=1687844014980409774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1687844014980409774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1687844014980409774'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/01/salesforce-and-forcecom.html' title='Salesforce and force.com'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_s3yzuaSeYss/S1XJiLPbnGI/AAAAAAAAAf0/bYAGivngjyk/s72-c/Screenshot.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-1331925337750090116</id><published>2010-01-04T09:43:00.003Z</published><updated>2010-10-24T23:06:58.501+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBMS_SQLTUNE'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Access Advisor'/><category scheme='http://www.blogger.com/atom/ns#' term='DMBS_ADVISOR.QUICK_TUNE'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Tuning Advisor'/><title type='text'>SQL Tuning Advisor and SQL Access Advisor in Oracle 10g</title><content type='html'>Oracle 10g with its AWR (Automatic Workload Repository) for automatic collection of performance statistics and with ADDM (Automatic Database Diagnostic Monitor) for identifying root causes of problems, is a self-healing and self-tuning getting wiser every day and very soon will start to think on its own database. &lt;br /&gt;&lt;br /&gt;There are features in Oracle 10g which help you to quickly find out what is wrong with the database. Features like ASH (Active Session History) to peak into what your active sessions are waiting for and Server Generated Alerts with Metrics and Thresholds are all tools which tell you what is really going on in your database. The OEM (Oracle Enterprise Manager) Database control is a brilliant interface you can use to learn and find out more about all these smart enhancements. All in the name of pro-active database management.&lt;br /&gt;&lt;br /&gt;What is database well-being all about anyway? Isn't it high throughput(OLTP) and response time(DSS)? Aren't all databases working to achieve these?&lt;br /&gt;&lt;br /&gt;Oracle 10g has also an &lt;b&gt;Advisory Framework&lt;/b&gt; which based on workload, will also try to advise you on configuration issues like Buffer Cache, Library Cache, PGA, Undo and Segments used. There are also Tuning-Related Advisors which deal with SQL Tuning and these are:&lt;br /&gt;&lt;br /&gt;I  - SQL Tuning Advisor&lt;br /&gt;II - SQL Access Advisor&lt;br /&gt;&lt;br /&gt;In this post I will try to explain the usage of these two advisors in the job of tuning bad and nasty SQL statements. &lt;br /&gt;&lt;br /&gt;All automation is good, self healing databases are very good. But what happens in the development arena when a developer turns up to your desk pointing to an email he/she just sent to you and says &lt;b&gt;'...what's wrong with this SQL statement? it takes ages? Why is Oracle so slow?...'&lt;/b&gt; I am particularly fond of the last comment.&lt;br /&gt;&lt;br /&gt;How can we quickly look at what is wrong with the SQL statement using the SQL Tuning Advisor? Here is how.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; I - SQL Tuning Advisor&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Using the DBMS_SQLTUNE package to tune SQL &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Assuming the suspect query is something like &lt;i&gt;"SELECT * FROM SESSIONS, SOURCE_EVENTS"&lt;/i&gt;, two very large tables, and your schema has the ADVISOR privilege granted, you would put this query into the Oracle SQL Tuning Advisor engine using the PL/SQL package &lt;b&gt;DBMS_SQLTUNE&lt;/b&gt; like this:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Create the tuning task&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;In SQL*Plus and in the schema where objects live, use the procedure &lt;i&gt;dbms_sqltune.create_tuning_task&lt;/i&gt; to create a tuning task.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt;&lt;br /&gt;declare tname varchar2(30);&lt;br /&gt;begin&lt;br /&gt;tname := dbms_sqltune.create_tuning_task(sql_text=&amp;gt;'select * from sessions, source_events');&lt;br /&gt;end;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Then you can check to make sure that your task is created and get the TASK_NAME value as you will need this in the next step. I could name the task, just being lazy...&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt; select task_name from user_advisor_log;&lt;br /&gt;&lt;br /&gt;TASK_NAME&lt;br /&gt;------------------------------&lt;br /&gt;TASK_51415&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Execute the tuning tasks&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Execute the tuning task you created in step 1 with the procedure &lt;i&gt;dbms_sqltune.execute_tuning_task&lt;/i&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&amp;gt; exec dbms_sqltune.execute_tuning_task('TASK_51415');&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Get the tuning report&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Get the tuning report/recommendation with the following SQL.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; set long 50000&lt;br /&gt;SQL&gt; select dbms_sqltune.report_tuning_task('TASK_51415') from dual;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;DBMS_SQLTUNE.REPORT_TUNING_TASK('TASK_51415')                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    &lt;br /&gt;&lt;br /&gt;(CLOB) GENERAL INFORMATION SECTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               &lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;Tuning Task Name                  : TASK_51415                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   &lt;br /&gt;Tuning Task Owner                 : ACHILLES                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &lt;br /&gt;Scope                             : COMPREHENSIVE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                &lt;br /&gt;Time Limit(seconds)               : 1800                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         &lt;br /&gt;Completion Status                 : COMPLETED                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    &lt;br /&gt;Started at                        : 12/20/2009 18:44:05                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;Completed at                      : 12/20/2009 18:44:14                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;Number of SQL Restructure Findings: 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            &lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;Schema Name: ACHILLES                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        &lt;br /&gt;SQL ID     : 8qsdf0a6qv4g7                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       &lt;br /&gt;SQL Text   : select * from sessions, source_events                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               &lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;FINDINGS SECTION (1 finding)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     &lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;&lt;br /&gt;1- Restructure SQL finding (see plan 1 in explain plans section)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &lt;br /&gt;----------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &lt;br /&gt;An expensive cartesian product operation was found at line ID 3 of the                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         &lt;br /&gt;execution plan.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                &lt;br /&gt;&lt;br /&gt;Recommendation                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &lt;br /&gt;--------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 &lt;br /&gt;- Consider removing the disconnected table or view from this statement or                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;add a join condition which refers to it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     &lt;br /&gt;&lt;br /&gt;Rationale                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;---------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;A cartesian product should be avoided whenever possible because it is an                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     &lt;br /&gt;expensive operation and might produce a large amount of data.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                &lt;br /&gt;&lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;EXPLAIN PLANS SECTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            &lt;br /&gt;-------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  &lt;br /&gt;&lt;br /&gt;1- Original                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;-----------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;Plan hash value: 3883039950                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      &lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;| Id  | Operation                | Name          | Rows  | Bytes | Cost (%CPU)| Time     | Pstart| Pstop |    TQ  |IN-OUT| PQ Distrib |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;---------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   0 | SELECT STATEMENT         |               |    33T|  4158T|  4367M  (2)|999:59:59 |       |       |        |      |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   1 |  PX COORDINATOR          |               |       |       |            |          |       |       |        |      |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   2 |   PX SEND QC (RANDOM)    | :TQ10001      |    33T|  4158T|  4367M  (2)|999:59:59 |       |       |  Q1,01 | P-&amp;gt;S | QC (RAND)  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   3 |    MERGE JOIN CARTESIAN  |               |    33T|  4158T|  4367M  (2)|999:59:59 |       |       |  Q1,01 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   4 |     SORT JOIN            |               |       |       |            |          |       |       |  Q1,01 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   5 |      PX RECEIVE          |               |  8439K|   829M|  3175   (2)| 00:00:39 |       |       |  Q1,01 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   6 |       PX SEND BROADCAST  | :TQ10000      |  8439K|   829M|  3175   (2)| 00:00:39 |       |       |  Q1,00 | P-&amp;gt;P | BROADCAST  |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   7 |        PX BLOCK ITERATOR |               |  8439K|   829M|  3175   (2)| 00:00:39 |     1 |    16 |  Q1,00 | PCWC |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   8 |         TABLE ACCESS FULL| SESSIONS      |  8439K|   829M|  3175   (2)| 00:00:39 |     1 |    16 |  Q1,00 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|   9 |     BUFFER SORT          |               |  4013K|   122M|  4367M  (2)|999:59:59 |       |       |  Q1,01 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|  10 |      PX BLOCK ITERATOR   |               |  4013K|   122M|   532   (4)| 00:00:07 |     1 |    16 |  Q1,01 | PCWC |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;|  11 |       TABLE ACCESS FULL  | SOURCE_EVENTS |  4013K|   122M|   532   (4)| 00:00:07 |     1 |    16 |  Q1,01 | PCWP |            |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;---------------------------------------------------------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;&lt;br /&gt;1 rows selected&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;Well done SQL Tuning Advisor, a good answer. It immediately spotted the Cartesian product and it recommends with a rationale that it would be expensive! &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;II - SQL Access Advisor&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;SQL Access advisor is another Advisory Framework tool which provides primarily advice on the creation of indexes, materialized views, materialized view logs to improve query performance and response time. &lt;br /&gt;&lt;br /&gt;Both SQL Tuning Advisor and SQL Access Advisor tools are quite powerful as they can source the SQL they will tune automatcially from multiple different sources, including SQL cache, AWR, SQL tuning Sets and user defined workloads. Look at the Oracle documentation to find out how all this is possible under OEM Database Control. &lt;br /&gt;&lt;br /&gt;What I focus on here is how to quickly pass through these tools ad-hoc SQL that the developer will bring to you and will demand to be tuned there and then.&lt;br /&gt;&lt;br /&gt;So using the &lt;b&gt;QUICK_TUNE&lt;/b&gt; procedure from the &lt;b&gt;DBMS_ADVISOR&lt;/b&gt; package here is how you would tune a nasty single SQL statement for better data access paths with SQL Access Advisor.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Create tuning task&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the schema where the table is run the following&lt;br /&gt;&lt;code&gt;&lt;br /&gt;VARIABLE tname    VARCHAR2(30);&lt;br /&gt;VARIABLE sql_stmt VARCHAR2(30);&lt;br /&gt;EXECUTE :sql_stmt := 'select count(*) from sessions where short_code=''abracadambra'' ';&lt;br /&gt;EXECUTE :tname    := 'myquicktunetask';&lt;br /&gt;EXECUTE DBMS_ADVISOR.quick_tune(dbms_advisor.sqlaccess_advisor, :tname, :sql_stmt);&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Check to see the task is there&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Again to see the task &lt;i&gt;myquicktunetask&lt;/i&gt; which you just created run in the schema&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; select task_name from user_advisor_log&lt;br /&gt;TASK_NAME                      &lt;br /&gt;------------------------------ &lt;br /&gt;TASK_51415                     &lt;br /&gt;myquicktunetask                &lt;br /&gt;&lt;br /&gt;2 rows selected&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;b&gt;3. See tuning advice &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, to see the advice you get you will have to look in the DBA dictionary view &lt;b&gt; &lt;br /&gt;DBA_ADVISOR_ACTIONS&lt;/b&gt;. So login as DBA and filter for the task_name='myquicktunetask' in the DBA_ADVISOR_ACTIONS dictionary view. Well, you can view the advice in the USER_ADVISOR_ACTIONS dictionary view as well. &lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT command,&lt;br /&gt;attr2        ,&lt;br /&gt;attr3        ,&lt;br /&gt;attr4        ,&lt;br /&gt;attr5&lt;br /&gt;FROM dba_advisor_actions&lt;br /&gt;WHERE TASK_NAME='myquicktunetask'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;TASK_NAME||'|'||COMMAND||'|'||ATTR2||'|'||ATTR3||'|'||ATTR4||'|'||ATTR5                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          &lt;br /&gt;(CLOB) myquicktunetask|CREATE MATERIALIZED VIEW LOG||ROWID, SEQUENCE| INCLUDING NEW VALUES|("SHORT_CODE")                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        &lt;br /&gt;(CLOB) myquicktunetask|CREATE MATERIALIZED VIEW||REFRESH FAST WITH ROWID|ENABLE QUERY REWRITE|SELECT ACHILLES.SESSIONS.SHORT_CODE C1, COUNT(*) M1 FROM ACHILLES.SESSIONS WHERE (ACHILLES.SESSIONS.SHORT_CODE = 'tl') GROUP BY ACHILLES.SESSIONS.SHORT_CODE                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       &lt;br /&gt;(CLOB) myquicktunetask|GATHER TABLE STATISTICS||-1||   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Conclusion&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well I find both tools extremely useful. Both are good starting points in resolving SQL tuning issues and discussions. SQL Tuning Advisor seems to be doing logical optimization mainly by checking your SQL structure and statistics and the SQL Access Advisor does suggest good data access paths, that is mainly work which can be done better on disk.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-1331925337750090116?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/1331925337750090116/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=1331925337750090116' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1331925337750090116'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1331925337750090116'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2010/01/sql-tuning-advisor-and-sql-access.html' title='SQL Tuning Advisor and SQL Access Advisor in Oracle 10g'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3687808913908171639</id><published>2009-11-10T19:09:00.002Z</published><updated>2010-10-24T23:06:58.506+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ER Modeling'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Model'/><title type='text'>Do you have a data model of your production schema?</title><content type='html'>For almost a year I have been running a poll on my blog with the above question. Finally the polling time has come to an end and I have some results I can share with you.&lt;br /&gt;&lt;br /&gt;In total I had 36 votes for the poll with the question &lt;b&gt;Do you have a data model of your production schema?&lt;/b&gt; and the results are as follows.&lt;br /&gt;&lt;br /&gt; * 33% answered 'YES'.&lt;br /&gt; * 58% answered 'NO'&lt;br /&gt; * 8% answered 'I don't know'&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What does this tell us? &lt;br /&gt;&lt;br /&gt;I know the sample of 36 is too small almost irrelevant, but what is the right size anyway?&lt;br /&gt;&lt;br /&gt;By looking at these results can we say that people in majority 58% do not know the data model of their databases?&lt;br /&gt;&lt;br /&gt;I suppose as long as the database is performing well and there is enough space to accommodate whatever is thrown into the database, all is jolly and fine and nobody complains. Especially with technologies such as Hibernate where the data model is derived and implemented automatically from the object model persistence layer!? Who cares about Primary Keys and Foreign Keys, is this the end of databases? Is this how I should interpret this? I am not sure.&lt;br /&gt;&lt;br /&gt;Next, what can we say for the second group of voters who are the 33% and who said, Yes! Are these voters in a stronger position than the voters of the 58%? Does this mean that this group does know their data model and do understand the relationships between their entities, and therefore command the SQL and either as a DBA or Developer are able to write better SQL scripts and much more high performance queries and code. Once again I am not sure.&lt;br /&gt;&lt;br /&gt;Last the 8% who said 'I don't know', were they just casual visitors who just wanted to show their indifference in data modeling but at the same time, by voting chose to show that they were still involved with database systems? Again I don't know. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What I know is that all of you who voted gave me a small glimpse of what is out there and may I send you a &lt;b&gt;BIG THANK YOU&lt;/b&gt; for that!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3687808913908171639?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3687808913908171639/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3687808913908171639' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3687808913908171639'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3687808913908171639'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/11/do-you-have-data-model-of-your.html' title='Do you have a data model of your production schema?'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5406930554596168779</id><published>2009-07-23T16:27:00.045+01:00</published><updated>2010-10-24T23:06:58.512+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ORA-04021'/><category scheme='http://www.blogger.com/atom/ns#' term='library cache pin'/><title type='text'>Library Cache Pin Waits during PL/SQL compilation</title><content type='html'>Did you ever tried to compile a PL/SQL procedure in your production database and it took long time? &lt;br /&gt;&lt;br /&gt;Did you face slowdown or other production issues because of this? &lt;br /&gt;&lt;br /&gt;Did you hit an error similar to the following when you or a developer tried to compile PL/SQL procedure which is referenced by another constantly executing high load PL/SQL procedure?&lt;br /&gt;&lt;code&gt;&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-04021: timeout occurred while waiting to lock object AZIMUTH.UPDATEME&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;If yes, then carry on reading. &lt;br /&gt;&lt;br /&gt;This post is about Conncurrency Wait issues you might get when trying to compile highly used constantly executing PL/SQL code in your production database.&lt;br /&gt;&lt;br /&gt;I have come accross this situation on an Oracle 10g R2 production platform. What hapenned was someone tried to quickly compile PL/SQL procedures which were executing 2 times in a second by many sessions. More this procedure was called by a dozen of other PL/SQL procedures that is there were lots of dependencies between packages, views. The PL/SQL procedure in question was basically the busiest piece of code in the database. Logging sessions and their events. &lt;br /&gt;&lt;br /&gt;You have to be carefull when you want to compile such highly used constantly executing piece of PL/SQL code in your system, at run-time. The rule is, that &lt;b&gt;objects cannot be changed when they are used&lt;/b&gt;. As the session you want to compile the code in tends to keep on waiting to obtain a &lt;b&gt;Library Cache Pin&lt;/b&gt; latch from the shared pool. If you do go ahead and compile such code, without scheduling downtime, you will probably halt the system. Try it with re-compiling packages which have dependencies with multiple other packages which are constantly in use, if you dare on production, and see what happens. You will face concurrency waits. Oracle says in metalink that such behaviour is expected and that you have to schedule downtime and maintenance window for re-compiling heavily used PL/SQL. The solution seem to be not to write complex dependencies in PL/SQL or to arrange maintenance window for deployments of PL/SQL. That is what the support told me, they also asked me to use some undocumented "_???" parameters to help with the latches. But the maintenance window seems to be the easiest or maybe standby database configuration. Feel free to comment on this post, workarounds and better solutions you can suggest. &lt;br /&gt;&lt;br /&gt;See some Metalink notes with good reading on the subject:&lt;br /&gt; &lt;ul&gt;&lt;br /&gt;&lt;li&gt;Doc ID: 115656.1 WAIT SCENARIOS REGARDING LIBRARY CACHE PIN AND LIBRARY CACHE LOAD LOCK &lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Doc ID: 1054939.6 COMPILATION OF PACKAGE IS HANGING ON LIBRARY CACHE LOCK AND LIBRARY CACHE&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt; Doc ID:264476.1 ORA-4021 'LIBRARY CACHE PIN' and PL/SQL blocks&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;Doc ID:169139.1  How to analyze ORA-04021 or ORA-4020 errors?&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;  &lt;br /&gt;  &lt;br /&gt;I am trying to simulate the above Concurrency waits with the following procedures where I run &lt;i&gt;lock_test&lt;/i&gt; by many sessions and then try to re-compile &lt;i&gt;updateme&lt;/i&gt;. I do see the Concurrency Waits in V$SESSION_WAITS. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;CREATE OR REPLACE&lt;br /&gt;PROCEDURE updateme&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;  FOR i IN 1 .. 100000000&lt;br /&gt;  LOOP&lt;br /&gt;     UPDATE test SET names = 'x' WHERE names = 'b';&lt;br /&gt;  END LOOP;&lt;br /&gt;  ROLLBACK;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;CREATE OR REPLACE&lt;br /&gt;PROCEDURE lock_test&lt;br /&gt;AS&lt;br /&gt;BEGIN&lt;br /&gt;  updateme;&lt;br /&gt;END;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5406930554596168779?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5406930554596168779/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5406930554596168779' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5406930554596168779'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5406930554596168779'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/07/library-cache-pin-waits-during-plsql.html' title='Library Cache Pin Waits during PL/SQL compilation'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-2913686791409213863</id><published>2009-06-27T09:10:00.107+01:00</published><updated>2011-08-29T13:22:02.941+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UTL_HTTP'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Greek islands weather'/><category scheme='http://www.blogger.com/atom/ns#' term='Greek Islands'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex Hosting'/><category scheme='http://www.blogger.com/atom/ns#' term='Google Maps'/><title type='text'>Oracle Apex Hosting</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;span id="goog_824356264"&gt;&lt;/span&gt;&lt;span id="goog_824356265"&gt;&lt;/span&gt;Long time now, I have been looking for a web hosting company, where I could host my Oracle Apex pages in full and economically, and found one for £3.50 a month!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Oracle's free &lt;a href="http://apex.oracle.com/" target="_blank"&gt;http://apex.oracle.com&lt;/a&gt; hosting platform is not enough as it doesn't allow you to make external network calls, i.e. calls to Google services like Google Maps.&lt;br /&gt;&lt;br /&gt;If you want to create an Oracle Apex application which uses Google Maps or even use internet able PL/SQL  packages such as UTL_HTTP on the internet, you have to look elsewhere as the free Oracle Apex hosting platform doesn't let you do that.&lt;br /&gt;&lt;br /&gt;But don't worry because the &lt;a href="http://www.application-outsource.co.uk/" target="_blank"&gt;Application Outsource UK LTD&lt;/a&gt; platform for £3.50 a month gives you 10MB storage and full Oracle Apex hosting with the ability to do external network calls!&lt;br /&gt;&lt;br /&gt;I can't say how pleased I am with their service. Now I am able to do everything I couldn't do with Oracle's Free Apex hosting platform. They have a great support website too.&lt;br /&gt;&lt;br /&gt;Have a look at my Oracle Apex and Google Maps demo application I have crated using their platform here on &lt;a href="http://apex-outsource.com/pls/apex/f?p=143:home" target="_blank"&gt;My Oracle Apex and Google Maps samples&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" height="120" src="http://4.bp.blogspot.com/_s3yzuaSeYss/TJ3SCdW240I/AAAAAAAAAjM/8ZLZPgz19ro/s200/GreekIslands.png" width="200" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;a href="http://apex-outsource.com/pls/apex/f?p=237:GreekIslands"&gt;Yahoo, Google API and Oracle Apex&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style="text-align: center;"&gt;&lt;img border="0" height="125" src="http://2.bp.blogspot.com/_s3yzuaSeYss/SmgLqXb4EzI/AAAAAAAAAYc/B-zjLAUz410/s200/map1.jpg" width="200" /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class="tr-caption" style="text-align: center;"&gt;&lt;a href="http://apex-outsource.com/pls/apex/f?p=143:home"&gt;Google maps API and Oracle Apex&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;span id="goog_822486362"&gt;&lt;/span&gt;&lt;span id="goog_822486367"&gt;&lt;/span&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;More Reading&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A good starting document on Integrating Google Maps and Oracle Apex. This document gave me the inspiration to try Google Maps with Oracle Apex. &lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://www.oracle.com/technology/products/database/application_express/pdf/Integrating_Application_Express_with_Google_Maps.pdf"&gt;Integrating_Application_Express_with_Google_Maps.pdf&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;2. Google API&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-2913686791409213863?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/2913686791409213863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=2913686791409213863' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/2913686791409213863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/2913686791409213863'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/06/oracle-apex-hosting.html' title='Oracle Apex Hosting'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_s3yzuaSeYss/TJ3SCdW240I/AAAAAAAAAjM/8ZLZPgz19ro/s72-c/GreekIslands.png' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-39210003406911986</id><published>2009-05-18T08:47:00.002+01:00</published><updated>2010-10-24T23:06:58.522+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='MERGE'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL MERGE INTO'/><title type='text'>Update one table from another using ORACLE MERGE INTO</title><content type='html'>Sometimes, during ETL or when is necessary to do data cleansing, I need to update a table with data from another table. I have been looking for scripts to do this easily and I have come across &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#SQLRF01606" target="_blank"&gt;&lt;b&gt;MERGE INTO&lt;/b&gt;&lt;/a&gt;. A very easy to use and understand SQL statement. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Assume we have 2 tables as:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;create table t1 &lt;br /&gt;(&lt;br /&gt;id number primary key not null,&lt;br /&gt;name varchar2(50)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;create table t2&lt;br /&gt;(&lt;br /&gt;id number primary key not null,&lt;br /&gt;job varchar2(50)&lt;br /&gt;);&lt;br /&gt;&lt;br /&gt;insert into t1 values (1, 'Kubilay');&lt;br /&gt;insert into t1 values (2, 'Robin');&lt;br /&gt;insert into t1 values (3, 'Kenny');&lt;br /&gt;&lt;br /&gt;select * from t1;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ID                     NAME                                               &lt;br /&gt;---------------------- -------------------------------------------------- &lt;br /&gt;1                      Kubilay                                            &lt;br /&gt;2                      Robin                                              &lt;br /&gt;3                      Kenny                                              &lt;br /&gt;&lt;br /&gt;3 rows selected&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;insert into t2 values (1, 'DBA');&lt;br /&gt;insert into t2 values (2, 'SA');&lt;br /&gt;insert into t2 values (3, 'Developer');&lt;br /&gt;&lt;br /&gt;select * from t2;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ID                     JOB                                                &lt;br /&gt;---------------------- -------------------------------------------------- &lt;br /&gt;1                      DBA                                                &lt;br /&gt;2                      SA                                                 &lt;br /&gt;3                      Developer                                          &lt;br /&gt;&lt;br /&gt;3 rows selected&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And now we want to create a new column in t1 and move the data which is matching (primary key to primary key) from table t2 to  table t1. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;alter table t1 add job varchar2(60);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Use MERGE INTO to update table t1 with data from table t2.  &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;merge into t1&lt;br /&gt;using t2&lt;br /&gt;on (t1.id = t2.id)&lt;br /&gt;when matched&lt;br /&gt;then update set &lt;br /&gt;t1.job = t2.job;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;select * from t1;&lt;br /&gt;&lt;br /&gt;ID                     NAME                                               JOB                                                          &lt;br /&gt;---------------------- -------------------------------------------------- ------------------------------------------------------------ &lt;br /&gt;1                      Kubilay                                            DBA                                                          &lt;br /&gt;2                      Robin                                              SA                                                           &lt;br /&gt;3                      Kenny                                              Developer                                                    &lt;br /&gt;&lt;br /&gt;3 rows selected&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;As you can see in the &lt;a href="http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#SQLRF01606"&gt;link&lt;/a&gt; you can use the MERGE statement to &lt;b&gt;insert new rows&lt;/b&gt; like &lt;i&gt;UPSERT&lt;/i&gt; when data in table t2 doesn't match with t1. That is, an Oracle UPSERT statement!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-39210003406911986?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/39210003406911986/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=39210003406911986' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/39210003406911986'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/39210003406911986'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/05/update-one-table-from-another-using.html' title='Update one table from another using ORACLE MERGE INTO'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-193171479821357513</id><published>2009-04-09T08:01:00.016+01:00</published><updated>2010-10-24T23:06:58.530+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBUA'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle 11g Upgrade'/><title type='text'>Upgrading to 11g, a technical workshop seminar by Mike Dietrich</title><content type='html'>On 7th of April I have attended the Oracle 11g upgrade technical workshop seminar given by Mike Dietrich in the London City offices of Oracle. &lt;br /&gt;&lt;br /&gt;This was one of the best Oracle Events I have attended. &lt;br /&gt;&lt;br /&gt;Mike run us through his 400+ slides of tips &amp; tricks and best practices when upgrading to Oracle 11g. He also presented 3 real life cases in which he helped 3 big Oracle customers during their upgrade to Oracle 11g. The contents of the slides are very good and the presentation skills of Mike were excellent. In this post there is a link to the slides. The slides are quite big in size so you have to download them in 3 parts (about 8MB in total). Here are the slides: &lt;a href="http://www.oracle.com/technology/products/database/oracle11g/upgrade/index.html"&gt;Oracle 11g Upgrade Workshop presentation&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt; Workshop presentation highlights &lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Better support to the optimizer during upgrade.&lt;br /&gt;&lt;li&gt; Definitely apply the timezone patch, you can't upgrade without it.&lt;br /&gt;&lt;li&gt; Recalculate statistics before upgrade. &lt;br /&gt;&lt;li&gt; If you stay on the host use dbua.&lt;br /&gt;&lt;li&gt; If you move host use command line upgrade.&lt;br /&gt;&lt;li&gt; Provision for performance degradation, do tests, tests and tests.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;It seems when it comes to upgrades in Oracle, people will always wait for R2. Mike said that Oracle is well aware of this and that with 11g they tried to break this taboo by explaining to us how Oracle actually are not introducing anything special as bug fixes in R2. People will see this themselves when they see how many little bugs will be fixed in R2. &lt;br /&gt;&lt;br /&gt;From the presentation I also got the impression that you can upgrade to 11g, it is easy takes little time. But the performance implications the upgrade might introduce are still uncontrollable if you don't have diagnostic &amp; tuning pack license purchased (£1777 each per CPU) . A Diagnostic packs license designed to show and sort out automatically all SQL statements which will regress! If you don't have diagnostic pack purchased, your DBA might end up dealing for days with hundreds of ''Regressed'' SQL statements because of the upgrade. Whereas the diagnostics package deals with it in hours. The DBA poor chap! (Hopefully Not!)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-193171479821357513?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/193171479821357513/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=193171479821357513' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/193171479821357513'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/193171479821357513'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/04/upgrading-to-11g-technical-workshop.html' title='Upgrading to 11g, a technical workshop seminar by Mike Dietrich'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-6550942665592941576</id><published>2009-04-02T16:23:00.027+01:00</published><updated>2010-10-24T23:06:58.535+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Informatica'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='ETL'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='data integration'/><title type='text'>"Informatica on Demand" an ETL tool running in the Cloud</title><content type='html'>Recently I was after ways which I could use to integrate (ETL) data from separate sources into the Cloud. Move data between MS SQL Server and Salesforce or MS SQL Server to Oracle for example. But mostly I was interested in an easy peasy way  to migrate data from back-end database systems such as MS SQL Server into the  Salesforce Cloud.&lt;br /&gt;&lt;br /&gt;How is that possible? First thing which comes to mind is API, Java, Import &amp;amp; Export and custom code, code and code.&lt;br /&gt;&lt;br /&gt;Not really, all you need is &lt;a href="http://www.informaticaondemand.com/" target="_blank"&gt;&lt;b&gt;Informatica on Demand!&lt;/b&gt;&lt;/a&gt; A simple and intro level absolutely &lt;b&gt;free&lt;/b&gt; ETL tool which  &lt;b&gt;is running in the Cloud&lt;/b&gt;! &lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.informatica.com/Pages/index.aspx" target="_blank"&gt;Informatica&lt;/a&gt; is a very reputable company in the Data Integration field. Informatica on Demand is part of their free Software as a Service (SaaS) offering. An ETL tool which is itself in the Cloud. You don't have to install  any software anywhere in your infrastructure, apart from a little Informatica agent which identifies your network to the Informatica Cloud. All you do is just create a login on their website and start working! How cool is that! You login to the Informatica on Demand website and configure and even schedule your data migration and ETL tasks between your databases and the Cloud as easy as checking your email! &lt;br /&gt;&lt;br /&gt;This free tool does schema-to-schema migrations only. It doesn't allow you to migrate by writing custom SQL on the source window and loading its result set to the target. It is limited to table-to-table migrations between separate sources and targets. You can however, save your SQL as a view in your source database and the tool will see this as a table object. &lt;br /&gt;&lt;br /&gt;In the same Informatica on Demand website and within the same Cloud infrastructure, they also have a suite of other more advanced tools such as Data Synchronization, Data Replication and Data Assessment. This stack of tools is not free. But a 30 day trial is still possible.&lt;br /&gt;&lt;br /&gt;Overall, I found the tool quite easy to use and with few clicks, I could transfer thousands of rows from say Oracle to Salesforce and from Microsoft SQL Server to Oracle. No need to install and configure gateways, ODBC and no need tweak any hardware locally. It also has a scheduler which works and sends emails when tasks are complete and all this is still hosted and running in The Could. So you don't have to backup anything or look after things. &lt;br /&gt;&lt;br /&gt;Here is a snapshot of the Field Mapping screen:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_s3yzuaSeYss/SdThTF8bIII/AAAAAAAAAXw/M_J4EGgVjs0/s1600-h/iod1.png" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}"&gt;&lt;img alt="" border="0" id="BLOGGER_PHOTO_ID_5320124777960775810" src="http://2.bp.blogspot.com/_s3yzuaSeYss/SdThTF8bIII/AAAAAAAAAXw/M_J4EGgVjs0/s320/iod1.png" style="cursor: hand; cursor: pointer; display: block; height: 238px; margin: 0px auto 10px; text-align: center; width: 320px;" /&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-6550942665592941576?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/6550942665592941576/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=6550942665592941576' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6550942665592941576'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6550942665592941576'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/04/informatica-on-demand-etl-tool-running.html' title='&quot;Informatica on Demand&quot; an ETL tool running in the Cloud'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_s3yzuaSeYss/SdThTF8bIII/AAAAAAAAAXw/M_J4EGgVjs0/s72-c/iod1.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4930777225419755364</id><published>2009-02-17T07:48:00.016Z</published><updated>2010-10-24T23:16:20.366+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ER diagram'/><category scheme='http://www.blogger.com/atom/ns#' term='ER Modeling'/><title type='text'>ER modeling Tools now on the Web!</title><content type='html'>I was looking at &lt;a href="http://appgallery.appspot.com/" target="_blank"&gt;Google Apps Gallery&lt;/a&gt; and came across this ER modeling tool which is very cool and I decided to blog about it.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;The tool is called &lt;a href="http://appgallery.appspot.com/about_app?app_id=agphcHBnYWxsZXJ5chQLEgxBcHBsaWNhdGlvbnMYjboBDA" target="_blank"&gt;GAE SQL Designer&lt;/a&gt; and is done by Jason W. Miller.  It is an ER modeling tool on the web! All you need is a browser and you start modeling databases, with no installs and no extra software. You can access it directly here &lt;a href="http://gaesql.appspot.com/" target="_blank"&gt;http://gaesql.appspot.com/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Excellent, I liked the idea very much! One thing that is missing is the ability to generate SQL from your data models. There is another less intuitive google app for that here: &lt;a href="http://code.google.com/p/wwwsqldesigner" target="_blank"&gt;http://code.google.com/p/wwwsqldesigner&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;Apart from that, I think Jason's GAE SQL Designer will be useful in quick prototyping and learning. Well done Jason!&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-4930777225419755364?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4930777225419755364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4930777225419755364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4930777225419755364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4930777225419755364'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/02/er-modeling-tools-now-on-web.html' title='ER modeling Tools now on the Web!'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3169004196941467900</id><published>2009-02-04T12:17:00.004Z</published><updated>2010-10-24T23:06:58.545+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle SQL developer'/><category scheme='http://www.blogger.com/atom/ns#' term='Ubuntu'/><title type='text'>Oracle SQL Developer for Ubuntu</title><content type='html'>Here is a nice post about a packaging for Oracle SQL Developer on Ubuntu.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blog.kizoom.com/2009/02/oracle-sqldeveloper-for-ubuntu-version.html"&gt;http://blog.kizoom.com/2009/02/oracle-sqldeveloper-for-ubuntu-version.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3169004196941467900?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3169004196941467900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3169004196941467900' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3169004196941467900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3169004196941467900'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/02/oracle-sql-developer-for-ubuntu.html' title='Oracle SQL Developer for Ubuntu'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5332010295589909011</id><published>2009-01-13T10:44:00.007Z</published><updated>2010-10-24T23:06:58.550+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='DBA_LOCK'/><category scheme='http://www.blogger.com/atom/ns#' term='blocking sessions'/><title type='text'>Blocking sessions-locks in Oracle</title><content type='html'>Did you ever wanted to quickly find which sessions are blocking each other in Oracle? &lt;br /&gt;&lt;br /&gt;In this post I will introduce an SQL script, which would quickly tell you if there is blocking between the sessions and which would also show you what SQL these sessions are using. &lt;br /&gt;&lt;br /&gt;To see the script working, first create a dummy table and insert some test data.&lt;br /&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; create table t (a char(1));&lt;br /&gt;&lt;br /&gt;Table created.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into t values ('z');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then select some rows from the dummy table for update.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;SQL&gt; select * from t where a='z' for update;&lt;br /&gt;&lt;br /&gt;A&lt;br /&gt;-&lt;br /&gt;z&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;In second session try to update the rows which you have selected above. Due to locks this will block! ACID and serialization kicks in. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; update t set a='x' where a='z';&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;It will just hung!&lt;br /&gt;&lt;br /&gt;To see what is blocking, run this query in a third session as SYSDBA.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SELECT TO_CHAR(sysdate, 'DD-MON-YYYY HH24:MI:SS')&lt;br /&gt;  || '  User '&lt;br /&gt;  ||s1.username&lt;br /&gt;  || '@'&lt;br /&gt;  || s1.machine&lt;br /&gt;  || ' ( SID= '&lt;br /&gt;  || s1.sid&lt;br /&gt;  || ' ) with the statement: '&lt;br /&gt;  || sqlt2.sql_text&lt;br /&gt;  ||' is blocking the SQL statement on   '&lt;br /&gt;  || s2.username&lt;br /&gt;  || '@'&lt;br /&gt;  || s2.machine&lt;br /&gt;  || ' ( SID='&lt;br /&gt;  || s2.sid&lt;br /&gt;  || ' ) blocked SQL -&gt;  '&lt;br /&gt;  ||sqlt1.sql_text AS blocking_status&lt;br /&gt;   FROM v$lock l1,&lt;br /&gt;  v$session s1   ,&lt;br /&gt;  v$lock l2      ,&lt;br /&gt;  v$session s2   ,&lt;br /&gt;  v$sql sqlt1    ,&lt;br /&gt;  v$sql sqlt2&lt;br /&gt;  WHERE s1.sid  =l1.sid&lt;br /&gt;AND s2.sid      =l2.sid&lt;br /&gt;AND sqlt1.sql_id= s2.sql_id&lt;br /&gt;AND sqlt2.sql_id= s1.prev_sql_id&lt;br /&gt;AND l1.BLOCK    =1&lt;br /&gt;AND l2.request  &gt; 0&lt;br /&gt;AND l1.id1      = l2.id1&lt;br /&gt;AND l2.id2      = l2.id2&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;BLOCKING_STATUS&lt;br /&gt;--------------------------------------------------------------------------------&lt;br /&gt;15-JAN-2009 07:41:27  User hero@world.com ( SID= 144 ) with the statemen&lt;br /&gt;t: select * from t where a='z' for update is blocking the SQL statement on   hero@world.com ( SID=147 ) blocked SQL -&gt; update t set a='x' where a='z'&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5332010295589909011?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5332010295589909011/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5332010295589909011' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5332010295589909011'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5332010295589909011'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/01/blocking-sessions-locks-in-oracle.html' title='Blocking sessions-locks in Oracle'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5187694119260428384</id><published>2009-01-12T22:48:00.004Z</published><updated>2010-10-24T23:06:58.555+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Google Chart'/><category scheme='http://www.blogger.com/atom/ns#' term='Free Charts'/><title type='text'>Google Chart APIs</title><content type='html'>Now this is cool!&lt;br /&gt;&lt;br /&gt;How about if you could just pass 2-3 numbers to a URL and get back a very nice looking SVG chart on a web page for FREE and on your website?&lt;br /&gt;&lt;br /&gt;I found out that Google now give an API where you pass few numbers in a URL and it just Charts them for your. &lt;br /&gt;&lt;br /&gt;Try for yourself here: &lt;br /&gt;&lt;br /&gt;&lt;a href="http://code.google.com/apis/chart/" target="_blank"&gt;http://code.google.com/apis/chart/&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;I taught I blog about this, as I can see uses of it in real time monitoring. They claim that you can call their API up to 250K times a day for free. &lt;br /&gt;&lt;br /&gt;Here is a nice idea. A day has 86400 seconds, hmmm how about monitoring the load of your server  with it?  :-)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5187694119260428384?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5187694119260428384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5187694119260428384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5187694119260428384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5187694119260428384'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/01/google-chart-apis.html' title='Google Chart APIs'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-6216899500456191672</id><published>2009-01-12T22:23:00.001Z</published><updated>2010-10-24T23:16:20.370+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle SQL Developer Data Modeling'/><category scheme='http://www.blogger.com/atom/ns#' term='ER diagram'/><category scheme='http://www.blogger.com/atom/ns#' term='ER Modeling'/><title type='text'>Create a database using OSDM (Oracle SQL Developer Modeling)</title><content type='html'>In this post I show you how easy it is to create a database using Oracle SQL Developer Data Modeling. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;Suppose your database requirements are as simple as follows:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;You want an event management database system. Not a calendar, but something where you can write events into.&lt;/li&gt;&lt;li&gt;You want to be able to invite friends to attend to these events.&lt;/li&gt;&lt;li&gt;You also want your friends/users to choose the types of events they like most.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Data model it with OSDM&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Using OSDM you can quickly draw the data model with foreign keys and primary keys for your database design requirements above. Is not difficult to use just filling in dialog boxes about the properties of the tables.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;(Click to enlarge)&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_s3yzuaSeYss/SSkZ4njaBuI/AAAAAAAAAV4/MGFlpxzNPNg/s1600-h/EVENTS_MANAGEMENT.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 302px;" src="http://4.bp.blogspot.com/_s3yzuaSeYss/SSkZ4njaBuI/AAAAAAAAAV4/MGFlpxzNPNg/s400/EVENTS_MANAGEMENT.png" alt="" id="BLOGGER_PHOTO_ID_5271773299294734050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;OSDM will not only draw you the model, but will also give you the ability to &lt;span style="font-weight:bold;"&gt;extract the DDL&lt;/span&gt; and then run it on something like Oracle Apex's SQL command prompt. How great is that! I just hope that Oracle WILL give this tool free with Oracle SQL developer in later releases. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Extract the DDL from the Model&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In OSDM use File -&gt; Export -&gt; DDL File to extract the SQL statements from the data model.&lt;br /&gt;&lt;br /&gt;Using the simple OSDM  you can extract the DDL from the above model and you get a nice SQL file with the CREATE TABLE and ALTER TABLE ... CONSTRAINT ... commands which will look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;-- Generated by Oracle SQL Developer Data Modeling Version: 1.5.1 Build: 518&lt;br /&gt;--   at:        2009-01-12 21:56:49&lt;br /&gt;--   for:       Oracle Database 10g&lt;br /&gt;--              Oracle Database 10g&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE EVENTS &lt;br /&gt;    ( &lt;br /&gt;     EVENT_ID NUMBER  NOT NULL , &lt;br /&gt;     EVENT_DESCRIPTION CLOB , &lt;br /&gt;     EVENT_DATE DATE , &lt;br /&gt;     EVENT_TYPE_ID NUMBER  NOT NULL &lt;br /&gt;    ) LOGGING &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE EVENTS &lt;br /&gt;    ADD CONSTRAINT EVENTS_PK PRIMARY KEY ( EVENT_ID ) ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE USERS &lt;br /&gt;    ( &lt;br /&gt;     USER_ID NUMBER  NOT NULL , &lt;br /&gt;     USER_EMAIL VARCHAR2 , &lt;br /&gt;     USER_NAME VARCHAR2 &lt;br /&gt;    ) LOGGING &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE USERS &lt;br /&gt;    ADD CONSTRAINT USERS_PK PRIMARY KEY ( USER_ID ) ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE ATTEND &lt;br /&gt;    ( &lt;br /&gt;     USER_ID NUMBER  NOT NULL , &lt;br /&gt;     EVENT_ID NUMBER  NOT NULL , &lt;br /&gt;     ATTEND_DATE DATE &lt;br /&gt;    ) LOGGING &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE EVENT_TYPES &lt;br /&gt;    ( &lt;br /&gt;     EVENT_TYPE_ID NUMBER  NOT NULL , &lt;br /&gt;     EVENT_TYPE_DESCRIPTION VARCHAR2  NOT NULL &lt;br /&gt;    ) LOGGING &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE EVENT_TYPES &lt;br /&gt;    ADD CONSTRAINT EVENT_TYPES_PK PRIMARY KEY ( EVENT_TYPE_ID ) ;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;CREATE TABLE USER_EVENT_PREFERENCES &lt;br /&gt;    ( &lt;br /&gt;     USER_ID NUMBER  NOT NULL , &lt;br /&gt;     EVENT_TYPE_ID NUMBER  NOT NULL &lt;br /&gt;    ) LOGGING &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE EVENTS &lt;br /&gt;    ADD CONSTRAINT EVENTS_EVENT_TYPES_FK FOREIGN KEY &lt;br /&gt;    ( &lt;br /&gt;     EVENT_TYPE_ID&lt;br /&gt;    ) &lt;br /&gt;    REFERENCES EVENT_TYPES &lt;br /&gt;    ( &lt;br /&gt;     EVENT_TYPE_ID&lt;br /&gt;    ) &lt;br /&gt;    NOT DEFERRABLE &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE ATTEND &lt;br /&gt;    ADD CONSTRAINT ATTEND_USERS_FK FOREIGN KEY &lt;br /&gt;    ( &lt;br /&gt;     USER_ID&lt;br /&gt;    ) &lt;br /&gt;    REFERENCES USERS &lt;br /&gt;    ( &lt;br /&gt;     USER_ID&lt;br /&gt;    ) &lt;br /&gt;    NOT DEFERRABLE &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE ATTEND &lt;br /&gt;    ADD CONSTRAINT ATTEND_EVENTS_FK FOREIGN KEY &lt;br /&gt;    ( &lt;br /&gt;     EVENT_ID&lt;br /&gt;    ) &lt;br /&gt;    REFERENCES EVENTS &lt;br /&gt;    ( &lt;br /&gt;     EVENT_ID&lt;br /&gt;    ) &lt;br /&gt;    NOT DEFERRABLE &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE USER_EVENT_PREFERENCES &lt;br /&gt;    ADD CONSTRAINT USER_EVENT_PREFERENCES_USERS_FK FOREIGN KEY &lt;br /&gt;    ( &lt;br /&gt;     USER_ID&lt;br /&gt;    ) &lt;br /&gt;    REFERENCES USERS &lt;br /&gt;    ( &lt;br /&gt;     USER_ID&lt;br /&gt;    ) &lt;br /&gt;    NOT DEFERRABLE &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ALTER TABLE USER_EVENT_PREFERENCES &lt;br /&gt;    ADD CONSTRAINT USER_EVENT_PREFERENCES_EVENT_TYPES_FK FOREIGN KEY &lt;br /&gt;    ( &lt;br /&gt;     EVENT_TYPE_ID&lt;br /&gt;    ) &lt;br /&gt;    REFERENCES EVENT_TYPES &lt;br /&gt;    ( &lt;br /&gt;     EVENT_TYPE_ID&lt;br /&gt;    ) &lt;br /&gt;    NOT DEFERRABLE &lt;br /&gt;;&lt;br /&gt;&lt;br /&gt;          &lt;br /&gt;&lt;br /&gt;-- Oracle SQL Developer Modeling Summary Report: &lt;br /&gt;-- &lt;br /&gt;-- CREATE TABLE                             5&lt;br /&gt;-- CREATE INDEX                             0&lt;br /&gt;-- ALTER TABLE                              5&lt;br /&gt;-- CREATE VIEW                              0&lt;br /&gt;-- CREATE PROCEDURE                         0&lt;br /&gt;-- CREATE TRIGGER                           0&lt;br /&gt;-- CREATE STRUCTURED TYPE                   0&lt;br /&gt;-- CREATE COLLECTION TYPE                   0&lt;br /&gt;-- CREATE CLUSTER                           0&lt;br /&gt;-- CREATE CONTEXT                           0&lt;br /&gt;-- CREATE DATABASE                          0&lt;br /&gt;-- CREATE DIMENSION                         0&lt;br /&gt;-- CREATE DIRECTORY                         0&lt;br /&gt;-- CREATE DISK GROUP                        0&lt;br /&gt;-- CREATE ROLE                              0&lt;br /&gt;-- CREATE ROLLBACK SEGMENT                  0&lt;br /&gt;-- CREATE SEQUENCE                          0&lt;br /&gt;-- CREATE SNAPSHOT                          0&lt;br /&gt;-- CREATE SYNONYM                           0&lt;br /&gt;-- CREATE TABLESPACE                        0&lt;br /&gt;-- CREATE USER                              0&lt;br /&gt;-- &lt;br /&gt;-- DROP TABLESPACE                          0&lt;br /&gt;-- DROP DATABASE                            0&lt;br /&gt;-- &lt;br /&gt;-- ERRORS                                   0&lt;br /&gt;-- WARNINGS                                 0&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;To get Oracle SQL Developer Data Modeling go to Oracle's Website &lt;a href="http://www.oracle.com/technology/products/database/sql_developer/index.html" target="_blank"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-6216899500456191672?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/6216899500456191672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=6216899500456191672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6216899500456191672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6216899500456191672'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/11/create-database-using-osdm-oracle-sql.html' title='Create a database using OSDM (Oracle SQL Developer Modeling)'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_s3yzuaSeYss/SSkZ4njaBuI/AAAAAAAAAV4/MGFlpxzNPNg/s72-c/EVENTS_MANAGEMENT.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3791947844267644995</id><published>2009-01-08T20:39:00.030Z</published><updated>2010-10-24T23:25:53.855+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Ajax'/><title type='text'>Oracle Apex and Ajax</title><content type='html'>In this post I will try to explain how you can create an Ajax Search Page, in just few steps and very little code on your Apex pages. &lt;br /&gt;&lt;br /&gt;I have already created my Ajax Search Page, see here &lt;a href="http://apex.oracle.com/pls/otn/f?p=38209:fishbase" target="_blank"&gt;http://apex.oracle.com/pls/otn/f?p=38209:fishbase&lt;/a&gt;,  by reading instructions from an example in a book called &lt;i&gt;Pro Oracle Application Express&lt;/i&gt; book by &lt;i&gt;John Edward Scott&lt;/i&gt; and &lt;i&gt;Scott Spendolini &lt;/i&gt;. A very good all-round concepts book on Oracle Apex Development. &lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;You will need 2 pages to create the Ajax Search Page.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 1. Create a new blank page in your application with a search query&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You need to create a new blank page in your application and you need to use the Printer Friendly page template as it has to be minimal looking with no headers, footers or tabs. This page will also have a Report region where you will write the SQL query which the Ajax Search Page will use to search your chosen table on your chosen column. In my case this page was page7. &lt;br /&gt;&lt;br /&gt;The SQL I used  for searching the "fish" table in my application is like below &lt;br /&gt;&lt;code&gt;&lt;br /&gt;select f_name_gb "English", f_name_gr "Greek", f_latin "Latin", f_name_tr "Turkish" from fish&lt;br /&gt;where &lt;br /&gt;(&lt;br /&gt;instr(upper(f_name_gb), upper(nvl(:P7_SEARCH, f_name_gb))) &gt; 0&lt;br /&gt;or&lt;br /&gt;instr(upper(f_name_gr), upper(nvl(:P7_SEARCH, f_name_gr))) &gt; 0&lt;br /&gt;or&lt;br /&gt;instr(upper(f_name_tr), upper(nvl(:P7_SEARCH, f_name_tr))) &gt; 0&lt;br /&gt;or&lt;br /&gt;instr(upper(f_latin), upper(nvl(:P7_SEARCH, f_latin))) &gt; 0&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. Modify the Printer Friendly Page Template you used in step 1 above&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In page7 above, you will also need to change the Body section of the Printer Friendly template to use the code below, that is the template code around the tag #BOX_BODY# , should be modified like below. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;ajax:BOX_B0DY&amp;gt;&lt;br /&gt; &amp;lt;div id=&amp;quot;BOX_BODY&amp;quot;&amp;gt;&lt;br /&gt;#BOX_BODY##REGION_POSITION_02##REGION_POSITION_04#&amp;lt;/div&amp;gt;&lt;br /&gt;&amp;lt;/ajax:BOX_B0DY&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now you can run page7 and it will display all records from your table without applying the search.&lt;br /&gt;&lt;br /&gt;Now the most important bit is the fact that we will call and display page7 with Ajax into a region in another page. That is why the use of the Printer Friendly template on page7. Because page7 will display via a &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag in page1. One more thing, is that page1 which calls the AjaxReport page7, must have a Search Box Text item for the search field where users will type. You must create this text field in page1. This text field is your Search Box, it is where users will type and search. &lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Do an Ajax call on the page you have just created above from another page. &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When users enter text in the Search filed in page1, a call is made to the Ajax page page7 from page1 via the JavaScript function on page1, see below. The search is performed and the SQL is executed. The Javascript you will add to the Header of the calling page1 performs the Ajax call and retrieves the report from page7 and places it in the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag which is in a region of page1. You will see what the region with the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; contains in later steps.&lt;br /&gt;&lt;br /&gt;Just include your page number in lines 5 and 6 below. As you see because my Ajax page number is 7, it has 7 and P7_SEARCH included in these lines. Modify this to reflect your page number.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;!--&lt;br /&gt;&lt;br /&gt;function AjaxReportRefresh(pThis){&lt;br /&gt;var l_val = pThis.value;&lt;br /&gt;var get = new htmldb_Get(null,$x(&amp;#039;pFlowId&amp;#039;).value,null,7);&lt;br /&gt;get.add(&amp;#039;P7_SEARCH&amp;#039;,l_val)&lt;br /&gt;gReturn = get.get(null,&amp;#039;&amp;lt;ajax:BOX_BODY&amp;gt;&amp;#039;,&amp;#039;&amp;lt;/ajax:BOX_BODY&amp;gt;&amp;#039;);&lt;br /&gt;get = null;&lt;br /&gt;$x(&amp;#039;AjaxReport&amp;#039;).innerHTML = gReturn;&lt;br /&gt;return;&lt;br /&gt;}&lt;br /&gt;//--&amp;gt;&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;4. Create a new HTML region on page1 call it AjaxReport &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Next, I created a new HTML region on page1 and called it AjaxReport. This is where the results from page7 will be displayed. The source of this region is the &lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt; tag :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&amp;lt;div id=&amp;quot;AjaxReport&amp;quot;&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 5. Last Step, call the Javascript function created in step 3&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Everytime something is entered into the search field P1_SEARCH on page1 the JavaScript function of step 3 will be called. To do that enter the code below to the HTML Form Element Attributes section for P1_SEARCH (search box Text field item) page item on page1. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;onkeyup=" AjaxReportRefresh (this)"&lt;br /&gt;&lt;/code&gt; &lt;br /&gt;&lt;br /&gt;You are ready to test the page, type some letters and see how the page responds by filtering records from your table as you type the letter. Enjoy! &lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3791947844267644995?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3791947844267644995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3791947844267644995' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3791947844267644995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3791947844267644995'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2009/01/oracle-apex-and-ajax.html' title='Oracle Apex and Ajax'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-6012350811408801283</id><published>2009-01-05T08:03:00.000Z</published><updated>2010-10-24T23:25:53.860+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Embedded PL/SQL Gateway'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='EPG'/><title type='text'>Installing Oracle Apex on Oracle 10g R2 with EPG is not supported</title><content type='html'>Apex with Oracle EPG (Embedded PL/SQL Gateway) is not supported for any version below version Oracle 11g. See here, &lt;a href="http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/otn_install.htm#BABFICIA" target="_blank"&gt;http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/otn_install.htm#BABFICIA&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;The &lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Note&lt;/span&gt; in section "3.3.5 Configure the Embedded PL/SQL Gateway" says it all.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you are going to use Oracle Apex on 10g,  you will have to use an HTTP Server, like Apache or Oracle's version of Apache.&lt;span class="Apple-style-span" style="font-weight: bold;"&gt; &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;Do not try to configure EPG in an earlier release than Oracle 11g, you will be frustrated as this is not supported. Oracle Apex with a seperate HTTP server, that is NO EPG, is possible and supported from Oracle 9.2.0.3 or later releases. &lt;span class="Apple-style-span" style="font-weight: normal;font-family:Tahoma;font-size:13;"  &gt;&lt;span class="Apple-style-span" style="font-weight: bold;font-family:Georgia;font-size:16;"  &gt; &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://apex.oracle.com/"&gt;Oracle Apex&lt;/a&gt; is a rapid application development environment using Oracle XMLDB. Oracle Apex comes free and you get it in Oracle 11g by default. Apex is, I think, Oracle's answer to hosted development and Cloud Computing.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I don't know for what reason one would do install Apex with EPG in Oracle 10g. The purpose of this post was to tell you that this is &lt;span style="font-weight: bold;"&gt;NOT&lt;/span&gt; possible.&lt;br /&gt;&lt;br /&gt;My Oracle 10g R2 dev installation didn't have extra database applications and it was not ready for any kind Apex configuration not even for the supported configuration which uses an HTTP server.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I had to manually configure the Oracle 10gR2  installation on my dev box to be able to use Apex. I had  to install Oracle Text, JVM and the Oracle XML database and do other pre-installation tasks such as change SGA component sizes, see below for details of what you have to do.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Oracle Apex and Oracle 10g database requirements&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/pre_require.htm#BABFCFBC" target="_blank"&gt;http://download.oracle.com/docs/cd/E10513_01/doc/install.310/e10496/pre_require.htm#BABFCFBC&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;Steps for manually installing the extra database components needed for Apex to an existing database installation are below.&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;1. install Oracle Text&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You will have to create the DRSYS tablespace first and then run the following script as SYSDBA&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;code&gt;SQL&gt; @$ORACLE_HOME/ctx/admin/catctx.sql ctxsys DRSYS TEMP NOLOCK&lt;/code&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;&lt;br /&gt;2. Install Oracle JVM (for releases before 10g R1 (10.1) )&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;code&gt;SQL&gt;@$ORACLE_HOME/javavm/install/initjvm.sql&lt;/code&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: bold;"&gt;3. Install Oracle XML Database&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As XMLDB is not installed, (this is not a DB for XML LOBs) you will have to manually install it after creating the XDB tablespace.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;code&gt;SQL&gt;@$ORACLE_HOME/ctx/admin/catqm.sql change_on_install XDB TEMP&lt;/code&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;and then&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;code&gt;SQL&gt;@$ORACLE_HOME/ctx/admin/catxdbj.sql&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. Install Apex&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;SQL&gt;@apexins password APEX_TS APEX_TS TEMP /i/&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;If you succeed you will get:&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;Thank you for installing Oracle Application Express.&lt;br /&gt;&lt;br /&gt;Oracle Application Express is installed in the FLOWS_030000 schema.&lt;br /&gt;&lt;br /&gt;The structure of the link to the Application Express administration services is as follows:&lt;br /&gt;http://host:port/pls/apex/apex_admin&lt;br /&gt;&lt;br /&gt;The structure of the link to the Application Express development interface is as follows:&lt;br /&gt;http://host:port/pls/apex&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-6012350811408801283?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/6012350811408801283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=6012350811408801283' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6012350811408801283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6012350811408801283'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/12/installing-oracle-apex-on-oracle-10g-r2.html' title='Installing Oracle Apex on Oracle 10g R2 with EPG is not supported'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5438330193606963991</id><published>2008-12-20T09:19:00.014Z</published><updated>2008-12-20T09:36:29.012Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='sp_spaceused'/><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server Views'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server 2000'/><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server Dictionary'/><title type='text'>sp_spaceused and other MS SQL Server Dictionary views</title><content type='html'>Many times I am asked to look at Microsoft SQL Servers to investigate things, and I find the following T-SQL procedures and Microsoft SQL Server dictionary views very handy. &lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;To find out how much disk space you Microsoft SQL Server database consumes and other things, you can run the following T-SQL procedures inside the Query Analyzer. &lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sp_spaceused @updateusage = 'TRUE'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To see quickly how many stored procedure, views, tables and other objects your database has you can use this query &lt;a href="http://kubilaykara.blogspot.com/2008/11/microsoft-sql-server-2000-data.html"&gt;here&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;See table disk space usage &lt;br /&gt;&lt;code&gt;&lt;br /&gt;sp_spaceused 'Tablename'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See all tables&lt;br /&gt; &lt;code&gt;&lt;br /&gt;select *&lt;br /&gt;from INFORMATION_SCHEMA.tables&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See all foreign key constraints&lt;br /&gt; &lt;code&gt;&lt;br /&gt;select *&lt;br /&gt;from INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See foreign keys, primary keys of a particular table &lt;br /&gt; &lt;code&gt;&lt;br /&gt;select &lt;br /&gt;from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;See the foreign key of a particular table.&lt;br /&gt;&lt;br /&gt; &lt;code&gt;&lt;br /&gt;select table_name, column_name "foreign key",  constraint_name&lt;br /&gt;from INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE&lt;br /&gt;where TABLE_NAME='put_table_name_here'&lt;br /&gt;and constraint_name not like 'PK%'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Find which MS SQL Server Stored procedure is using a particular table, or in other words dependencies between stored procedures and tables.&lt;br /&gt;&lt;br /&gt; &lt;code&gt;&lt;br /&gt;SELECT DISTINCT so.name&lt;br /&gt;    FROM syscomments sc&lt;br /&gt;            INNER JOIN sysobjects so ON sc.id=so.id&lt;br /&gt;    WHERE sc.TEXT LIKE '%put_table_name_here%' -- enter table name here.&lt;br /&gt;    &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For more info go to: &lt;a href="http://msdn.microsoft.com/en-us/library/aa933209(SQL.80).aspx"&gt;http://msdn.microsoft.com/en-us/library/aa933209(SQL.80).aspx&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5438330193606963991?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5438330193606963991/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5438330193606963991' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5438330193606963991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5438330193606963991'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/12/spspaceused-and-other-ms-sql-server.html' title='sp_spaceused and other MS SQL Server Dictionary views'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5417234173185027019</id><published>2008-12-01T16:39:00.021Z</published><updated>2010-10-24T23:13:08.518+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SLA percentage table'/><category scheme='http://www.blogger.com/atom/ns#' term='Service Level Agreement'/><category scheme='http://www.blogger.com/atom/ns#' term='downtime'/><title type='text'>Service Level Agreement (SLA) figures</title><content type='html'>How does downtime affect your Service Level Agreement (SLA) with your customer? &lt;br /&gt;&lt;br /&gt;What does 99.99999 % uptime per year mean? &lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;If you want answers to these questions you have too look at the availability levels below. They show how many minutes, seconds downtime/system outage  you are allowed to have in a year, to meet certain SLA figures and your contractual obligations.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Level of availability         Total downtime per year&lt;br /&gt;=====================         ======================&lt;br /&gt;99%                           3.6 days&lt;br /&gt;99.9%                         8.76 hours &lt;br /&gt;99.99%                        52 minutes &lt;br /&gt;99.999%                       5 minutes &lt;br /&gt;99.9999%                      30 seconds &lt;br /&gt;99.99999%                     3 seconds &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5417234173185027019?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5417234173185027019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5417234173185027019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5417234173185027019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5417234173185027019'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/12/slas.html' title='Service Level Agreement (SLA) figures'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4278544352969994395</id><published>2008-11-22T08:07:00.052Z</published><updated>2010-10-24T23:26:30.421+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='integration'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='ETL'/><category scheme='http://www.blogger.com/atom/ns#' term='DI'/><category scheme='http://www.blogger.com/atom/ns#' term='data integration'/><title type='text'>Data Integration and the Cloud</title><content type='html'>Recently I read a Special Report from the magazine Economist about the computing "Cloud". The 1 year old, yet still buzzy and exciting new phenomena in the IT world.&lt;br /&gt;&lt;br /&gt;The article is quite analytical and it is definitely worth reading. Here is the full link to the article called "Let it rise!":&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.economist.com/specialreports/displaystory.cfm?story_id=12411882" target="_blank"&gt;http://www.economist.com/specialreports/displaystory.cfm?story_id=12411882&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have to warn you the article is quite lengthy but is worth every page of it.&lt;br /&gt;&lt;br /&gt;After you read the article you get a feeling like returning back to the past in the supercomputers era of mainframes. That is what The Cloud is. A "thing" which lives on the internet, and where all the IT infrastructure lives and it is remote and you connect to it via the internet. &lt;br /&gt;&lt;br /&gt;No more hardware and server rooms in the office, just smart PCs with browsers and the browser actually becoming the operating system, full of internet based applications for you to work with.&lt;br /&gt;&lt;br /&gt;The Cloud is getting rid of all the dusty servers in the server room. All your applications are sucked by the Cloud. If you need word-processing to be done, you will just login to the internet and you use Google Notes or something. If you need spreadsheets, you can use Google Docs. Do you need to design and run a database use Oracle Apex. These are already existing and mature Cloud technologies. Do you need a ready-made CRM application without the complexity of installing it and maintaining it yourself on your PC or your servers, use Salesforce or SugarCRM.&lt;br /&gt;&lt;br /&gt;All these and many more are available for you on the internet, in the form of &lt;b&gt;SaaS&lt;/b&gt; which stands for Software as a Service. All you need to have is an internet browser and little money to pay your subscription to these SaaS services as you would pay for your mobile phone bill. Software is becoming a Pay-As-You-Go thing! There is no more licenses, product installation keys and certificates to worry about. You don't have to download anything and you don't have to install anything. Even better you don't need to upgrade to the new version each time, as this is done for you automatically. Sounds nice doesn't it?&lt;br /&gt;&lt;br /&gt;The Cloud seems a heaven of applications, but how about data? What if I want to store gigabytes-terrabytes of data in the Cloud? How about backups?&lt;br /&gt;&lt;br /&gt;Yep it is possible. Check Amazon AWS and S3 you pay pennies for gigabytes of storage per month. But how practical is this? Will all companies suddenly decide to part from their valuable and competitive data and leave it to the misty-airy hands of The Cloud? Will it happen quickly? I think it won't happen as quickly as it happened for the applications. You can guess reasons why. Usually we don't sell data but we sell applications, applications come and go but data stays, we don't like to pass the control of our data to someone else or somewhere else, are just a few reasons.&lt;br /&gt;&lt;br /&gt;But what is the alternative? &lt;b&gt;The alternative is to connect the cloud to your database or legacy data. &lt;/b&gt; Keep the data, but get The Cloud connect to it! Do we have to care where the data is when we want to analyse it? Do we have to know if it is on Oracle, MS SQL or MySQL or in an MS Excel spreadsheet? Do we have to be looking for the right tool to connect to the right database? In tools issue, I like what Oracle did with Oracle SQL Developer, you can connect it to any database.&lt;br /&gt;&lt;br /&gt;To carry on, we should just be able to get to the data with no gimmicks. Also would be nice to have the data presented in an application in the Cloud. Right? If these are sort of your requirements then probably you are looking at one of those &lt;b&gt;Data Integration&lt;/b&gt; solutions.&lt;br /&gt;&lt;br /&gt;An integration solution which is not just buying Crystal Reports or Business Objects or Oracle OBIEE and installing it on one of your new servers and firing up more and more instances and doing lots of more configurations etc. But a solution where you can have all this in the Cloud, done by others at a Pay-As-You-Go cost, and all you get is a Login to start developing your reports and web applications.&lt;br /&gt;&lt;br /&gt;Who wouldn't prefer not to own the complexity of maintaining a reporting server infrastructure but would like to own the data?&lt;br /&gt;&lt;br /&gt;At the end all you need is a web page which connects to your database and you develop it as easy as writing an email. A web page which is an application, developed on the internet and stays on the internet but connects to your database in your data centre or your PC. Wouldn't that be cool?&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Apatar a Data integration tool&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Yes, there are independent tools out there for the integration of database systems with the Cloud. There are ways to get the cloud to connect to  your whichever database system. I have been looking at one of them recently called &lt;b&gt;Apatar&lt;/b&gt; You can find out more on &lt;a href="http://www.apatar.com/" target="_blank"&gt;www.apatar.com&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Apatar is an Open Source data integration and ETL tool. It is FREE and it lives in &lt;a href="http://sourceforge.net/project/platformdownload.php?group_id=189179&amp;amp;sel_platform=391" target="_blank"&gt;http://sourceforge.net&lt;/a&gt;.  Available both for Linux and Windows. It works a treat. It is just 22MB of software. You can downoad Apatar from:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://apatar.com/download.html" target="_blank"&gt;http://apatar.com/download.html&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Once you installed it you just drag and drop objects to its screens. These objects could be databases and maybe applications you have in the Cloud. You configure the objects by double-clicking on them and providing database login and Cloud login info. At no time, you start pumping and synchronizing data between your database and your Cloud application (i.e. Salesforce). Look at some &lt;a href="http://apatar.com/why_apatar.html" target="_blank"&gt;screen-shots&lt;/a&gt; from the Apatar website to understand how it works. You can even schedule this operations to happen at times of your choice with the tool.&lt;br /&gt;&lt;br /&gt;It is great to see Cloud enabled great software like Apatar for FREE and this doesn't stop here. I found even more tools like apatar for free here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.talend.com/index.php"&gt;Talend&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.xaware.org/"&gt;Xaware&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-4278544352969994395?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4278544352969994395/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4278544352969994395' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4278544352969994395'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4278544352969994395'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/11/data-integration-and-cloud.html' title='Data Integration and the Cloud'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-4520727060162114101</id><published>2008-11-12T13:17:00.022Z</published><updated>2009-01-13T23:24:39.634Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='Entity Relationshing diagram'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle SQL Developer Data Modeling'/><category scheme='http://www.blogger.com/atom/ns#' term='ER diagram'/><category scheme='http://www.blogger.com/atom/ns#' term='ER Modeling'/><title type='text'>Entity Relationship diagrams using Oracle SQL Developer Data Modeling</title><content type='html'>Finally, the early adopter release of Oracle SQL Developer Data Modelling tool is out. It is easy to use and I quickly managed to reverse engineer a database schema from an Oracle 10g database.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;All you have to do is to connect to a database, specify which schema and which tables you want to include in your ER Model, and then just press the button.  It even connects to Microsoft SQL Server 2000 database and extracts the ER Models. Pretty impressive!&lt;br /&gt;&lt;br /&gt;I use ubuntu 8.04 and the install was easy, just unzip the downloaded file osdm-1.5.1-518-no-jre.zip to a directory and run the osdm.sh script. See instructions below.&lt;br /&gt;&lt;br /&gt;It was about time for  Oracle to come with a solution like this and for FREE, well almost. Still not clear! But I downloaded the early adopter version to try it.&lt;br /&gt;&lt;br /&gt;You can download Oracle SQL Developer Data Modeling from: &lt;a href="http://www.oracle.com/technology/products/database/sql_developer/files/Modeling.html"&gt;http://www.oracle.com/technology/products/database/sql_developer/files/Modeling.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here are the instructions to reverse engineer a schema using the tool.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. Go to directory where you unziped the download (in my case the download osdm-1.5.1-518-no-jre.zip) like this:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;cd /opt/osdm1/osdm/bin&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;2. Run the osdm.sh file like this &lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;sh osdm.sh&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;3. When the application starts from the menu, go to:&lt;/span&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;File &gt; Import &gt; DB Catalog&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. The "DB Metadata Extraction Wizard" starts. &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Just follow the instructions and provide your login credentials like you would do with any other tool connecting to a database and choose the tables you want to model.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.oracle.com/technology/products/database/sql_developer/images/import.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px; height: 148px;" src="http://www.oracle.com/technology/products/database/sql_developer/images/importthmb.png" alt="" 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;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Enjoy modeling in your &lt;/span&gt;universe of discourse&lt;span class="fullpost"&gt;!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You can also read my other post on this topic which shows you how to create a database with OSDM &lt;a href="http://kubilaykara.blogspot.com/2008/11/entity-relationship-diagrams-using.html"&gt;here &lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-4520727060162114101?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/4520727060162114101/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=4520727060162114101' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4520727060162114101'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/4520727060162114101'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/11/entity-relationship-diagrams-using.html' title='Entity Relationship diagrams using Oracle SQL Developer Data Modeling'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-2388316080705906224</id><published>2008-11-11T08:10:00.006Z</published><updated>2008-11-11T09:47:43.575Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='MS SQL Server Views'/><category scheme='http://www.blogger.com/atom/ns#' term='Microsoft SQL Server 2000 data dictionary view'/><title type='text'>Microsoft SQL Server 2000 Data Dictionary view to view all objects in the database</title><content type='html'>See all objects in your Microsoft SQL database  and their types. &lt;br /&gt;&lt;br /&gt;This is one of my favorite data dictionary queries in MS SQL Server. It shows me quickly what makes up a database, how many tables, triggers, views etc. &lt;br /&gt;&lt;br /&gt;I have been using it on MS SQL Server 2000 and it works! &lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;select owner,  cnt, object_type =&lt;br /&gt;CASE xtype&lt;br /&gt;when  'C' then 'CHECK constraint'&lt;br /&gt;when  'D' then 'Default or DEFAULT constraint'&lt;br /&gt;when  'F' then 'FOREIGN KEY constraint'&lt;br /&gt;when  'L' then 'Log'&lt;br /&gt;when  'FN' then 'Scalar function'&lt;br /&gt;when  'IF' then 'Inlined table-function'&lt;br /&gt;when  'P' then 'Stored procedure'&lt;br /&gt;when  'PK' then 'PRIMARY KEY constraint (type is K)'&lt;br /&gt;when  'RF' then 'Replication filter stored procedure'&lt;br /&gt;when  'S' then 'System table'&lt;br /&gt;when  'TF' then 'Table function'&lt;br /&gt;when  'TR' then 'Trigger'&lt;br /&gt;when  'U' then 'User table'&lt;br /&gt;when  'Q' then 'UNIQUE constraint (type is K)'&lt;br /&gt;when  'V' then 'View'&lt;br /&gt;else 'unknown'&lt;br /&gt;end&lt;br /&gt;from &lt;br /&gt;(&lt;br /&gt;select su.name owner, so.uid uid, so.xtype xtype,count(*) cnt from sysobjects so, sysusers su &lt;br /&gt;where so.uid = su.uid&lt;br /&gt;group by su.name, so.xtype, so.uid&lt;br /&gt;) sysobjects_info&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;Owner           Count   Object Type&lt;br /&gt;----------      ------- ----------------------------------&lt;br /&gt;dbo             12      CHECK constraint&lt;br /&gt;dbo             363     Default or DEFAULT constraint&lt;br /&gt;dbo             127     FOREIGN KEY constraint&lt;br /&gt;xanthi          34      Stored procedure&lt;br /&gt;dbo             241     Stored procedure&lt;br /&gt;dbo             234     PRIMARY KEY constraint (type is K)&lt;br /&gt;dbo             19      System table&lt;br /&gt;dbo             10      Trigger&lt;br /&gt;dbo             399     User table&lt;br /&gt;dbo             6       unknown&lt;br /&gt;dbo             11      View&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-2388316080705906224?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/2388316080705906224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=2388316080705906224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/2388316080705906224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/2388316080705906224'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/11/microsoft-sql-server-2000-data.html' title='Microsoft SQL Server 2000 Data Dictionary view to view all objects in the database'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-5061274419061948923</id><published>2008-11-10T11:17:00.018Z</published><updated>2010-10-24T23:05:24.158+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='maximum open cursors exceeded'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-01000'/><title type='text'>ORA-01000: maximum open cursors exceeded</title><content type='html'>When you get the &lt;i&gt;ORA-01000: maximum open cursors exceeded&lt;/i&gt; did you ever want to see which SQL is causing this error? That is, try to find where the leak is?&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;Then try running the following sql statements on the dynamic dictionary views V$SESSION and V_$OPEN_CURSOR. This statement shows which SQL statement, which username and which machine are using up your cursors.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; select s.machine, oc.user_name, count(1) as count, oc.sql_text&lt;br /&gt;from sys.v_$open_cursor oc, v$session s&lt;br /&gt;where s.sid = oc.sid&lt;br /&gt;group by s.machine, user_name, sql_text&lt;br /&gt;order by count desc;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;MACHINE       USER_NAME COUNT   SQL_TEXT&lt;br /&gt;----------------------- --------------- ------- ------------------------------------------------------------&lt;br /&gt;Thessaloniki.com   Athena    127  SELECT NAME, EAR_NAME, MASTER_NODE_ONLY, ENABLED, DEFINITION&lt;br /&gt;Rome.com      Athena    120  SELECT NAME, EAR_NAME, MASTER_NODE_ONLY, ENABLED, DEFINITION&lt;br /&gt;Kavala.com      Athena    43   SELECT NAME, EAR_NAME, MASTER_NODE_ONLY, ENABLED, DEFINITION&lt;br /&gt;Kavala.com      Athena    39   select i.obj#,i.ts#,i.file#,i.block#,i.intcols,i.type#,i.fla&lt;br /&gt;Thessaloniki.com   Athena    35   INSERT /*+ IDX(0) */ INTO "Athena_OWNER"."MLOG$_USERS" (dmlt&lt;br /&gt;&lt;/pre&gt;You must run this as SYSDBA. The output is from an Oracle 10g instance.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-5061274419061948923?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/5061274419061948923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=5061274419061948923' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5061274419061948923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/5061274419061948923'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/11/ora-01000-maximum-open-cursors-exceeded.html' title='ORA-01000: maximum open cursors exceeded'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-6011704128974676392</id><published>2008-10-28T07:48:00.029Z</published><updated>2010-10-24T23:26:30.427+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cloud computing'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Salesforce'/><category scheme='http://www.blogger.com/atom/ns#' term='Greenplump'/><title type='text'>Cloud computing</title><content type='html'>These two buzz words "cloud computing" have been in my attention lately and I really wanted to find out what they stand for. I got a classic and short definition from Wikipedia:&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Cloud computing is Internet-based ("cloud") development and use of computer technology ("computing"). "&lt;/span&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Cloud_computing"&gt;see full definition...&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;It seems like it is time for the internet to prove what it stands for, the ultimate computer!?&lt;br /&gt;&lt;br /&gt;Yes, from the look of things, all of the applications and databases of humankind are going to be on the internet.  At the office we will not  have "server rooms" any more, but just PCs with Internet browsers. Developers, will be the only kind of IT people that will stay back in the office, they will sit very near to the boss together with Business Analysts and IT Managers. Modern day developers of the future will be using the browser, and rapidly building applications, maybe with "declarative programming". Is it already hapenning? If you look at the business model of companies like &lt;a href="http://www.salesforce.com/"&gt;Salesforce&lt;/a&gt; where they market concepts like "No Software!" and Software as Service (SaaS) and Oracle's hosted rapid application development environment called  &lt;a href="http://apex.oracle.com/i/index.html"&gt;Oracle Apex&lt;/a&gt; one can easily start seeing The Clouds gathering in the sky. How about the &lt;a href="http://www.greenplum.com/"&gt;Greenplum&lt;/a&gt; the Mega-Giga Titanic Datawarehouse for everyone on the Internet.  A datawarehouse internet appliance where everyone can put their datawarehouse and access it from anywhere on the earth on a browser and do analysis. No Servers, No hardware, No Software just a login to a workspace on the internet and that's it. Everything you need, tools, spreadsheets will be there on the internet wating for you.&lt;br /&gt;&lt;br /&gt;I wonder what will happen to all those other IT guys, SysAdmins, DBAs. Will they lock them up in huge data centres somewhere in the countryside? Will they be needed at all?&lt;br /&gt;&lt;br /&gt;Tom Kyte an Oracle Expert was asked a smilar question on his website and here is &lt;a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1271458700346722335"&gt;Thomas Kyte's comment on Cloud Computing&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Or is it going to be as Tom Kyte says that with 'Cloud Computing', databases will just get larger and larger.&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-6011704128974676392?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/6011704128974676392/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=6011704128974676392' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6011704128974676392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/6011704128974676392'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/10/cloud-computing.html' title='Cloud computing'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-7736179786676394599</id><published>2008-10-27T14:08:00.016Z</published><updated>2008-10-27T19:12:34.094Z</updated><category scheme='http://www.blogger.com/atom/ns#' term='RMAN Hot Backup'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='Monitor RMAN time'/><title type='text'>Monitor the time an RMAN backup takes</title><content type='html'>To see what RMAN is doing now, and see what SID is doing what sort of work, and how much it has got left to do, use the following SQL. This script is good when you are trying to see how much work an RMAN Channels have got left to do. It is good to watch with the RMAN backup script log (tail -f) as the backup is hapenning. For both scripts you have to lonig as SYSDBA on the instance where the BACKUP&lt;br /&gt;is or RESTORE hapenning.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;select&lt;br /&gt;sid,&lt;br /&gt;start_time,&lt;br /&gt;totalwork,&lt;br /&gt;sofar,&lt;br /&gt;(sofar/totalwork) * 100 pct_done&lt;br /&gt;from&lt;br /&gt;v$session_longops&lt;br /&gt;where totalwork &gt; sofar&lt;br /&gt;AND opname NOT LIKE '%aggregate%'&lt;br /&gt;AND opname like 'RMAN%'&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;SID        START_TIM  TOTALWORK      SOFAR   PCT_DONE&lt;br /&gt;---------- --------- ---------- ---------- ----------&lt;br /&gt;       100 27-OCT-08    1554952    1364978 87.7826454&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;To watch the success or failure of an RMAN job in the past, or even when it is hapenning, you can use the dynamic v$ view v$rman_status.  The following query will show you a history of your BACKUP and RESTORE operations. By changing the &lt;b&gt;where start_time &gt;  sysdate -1&lt;/b&gt; clause you control how much in the past you want to look at. I am using this on Oracle 10g, I don't know if it is available on Oracle 9i and before.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;select to_char(start_time, 'dd-mon-yyyy@hh24:mi:ss') "Date", &lt;br /&gt;status, &lt;br /&gt;operation,&lt;br /&gt;mbytes_processed&lt;br /&gt;from v$rman_status vs&lt;br /&gt;where start_time &gt;  sysdate -1&lt;br /&gt;order by start_time&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;Date                 STATUS                  OPERATION                         MBYTES_PROCESSED&lt;br /&gt;-------------------- ----------------------- --------------------------------- ----------------&lt;br /&gt;27-oct-2008@11:40:11 FAILED                  RMAN                                             0&lt;br /&gt;27-oct-2008@11:40:29 COMPLETED               BACKUP                                       11812&lt;br /&gt;27-oct-2008@12:06:30 COMPLETED               BACKUP                                       23112&lt;br /&gt;27-oct-2008@12:41:45 COMPLETED               BACKUP                                         160&lt;br /&gt;27-oct-2008@12:42:28 FAILED                  CONTROL FILE AUTOBACKUP                          0&lt;br /&gt;27-oct-2008@17:24:28 RUNNING                 RMAN                                             0&lt;br /&gt;27-oct-2008@17:24:43 COMPLETED               DELETE                                           0&lt;br /&gt;27-oct-2008@17:24:51 COMPLETED               CATALOG                                          0&lt;br /&gt;27-oct-2008@17:25:16 RUNNING                 RESTORE                                  22082.875&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-7736179786676394599?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/7736179786676394599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=7736179786676394599' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7736179786676394599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7736179786676394599'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/10/monitor-time-rman-backup-takes.html' title='Monitor the time an RMAN backup takes'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-1346895339809722035</id><published>2008-09-25T12:55:00.012+01:00</published><updated>2009-06-30T12:15:09.194+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Partitioning'/><category scheme='http://www.blogger.com/atom/ns#' term='ORA-14400'/><category scheme='http://www.blogger.com/atom/ns#' term='Default Value'/><category scheme='http://www.blogger.com/atom/ns#' term='CTAS'/><title type='text'>Partitioning using CREATE TABLE AS (CTAS) and Column Default Values</title><content type='html'>This is about the CTAS (Create Table As...) operations during the creation of partitioned tables from normal tables in an Oracle database.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;The CTAS operation although copies column constraints such as NULL, NOT NULL from the normal table to the partitioned table during the partitioned table creation, it does not copy DEFAULT VALUEs of the columns. This might lead to a nasty surprise if you are doing RANGE PARTITIONING and the partition key DATE column has a DEFAULT VALUE of SYSDATE in the normal table. &lt;b&gt;This DEFAULT VALUE setting is NOT copied to the partitioned table!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;What will happen is, if you do not specify a date explicitly in your INSERT statements you will get an 'ORA-14400: inserted partition key does not map to any partition' error.  As the partition key value passed in will be NULL and the partitioned table will NOT know about the DEFAULT value. &lt;br /&gt;&lt;br /&gt;Things can be worse if you are using a combination of CTAS to create partitioned tables from normal tables, and then you use an ALTER TABLE ... RENAME TO .. to replace your normal production tables with the new partitioned tables. Let me tell you how. If your application's  INSERT statements into these new partitioned tables, do not explicitly specify the date value of the partition key, you will pass in NULLs and hit ORA-14400. Watch out you will suffer production outage!&lt;br /&gt;&lt;br /&gt;To fix this problem, you will have to either explicitly change your code to pass in a date value for the partition key column, or alter the partitioned table after CTAS and modify the column to have a default value.  &lt;br /&gt;&lt;br /&gt;Here is a demonstration on Oracle 10g R2 of how easily this thing can happen.&lt;br /&gt;&lt;br /&gt;Create the normal table&lt;br /&gt;&lt;code&gt;&lt;br /&gt;conn scott/tiger&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;drop table big_table;&lt;br /&gt;&lt;br /&gt;create table big_table&lt;br /&gt;(id number primary key,&lt;br /&gt; subject varchar2(500),&lt;br /&gt; created_date date default sysdate&lt;br /&gt;)&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;insert into big_table (id, subject) values (4,'tset3')&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Create the partitioned table with CTAS from the normal table above, consider using &lt;b&gt;NOLOGGING&lt;/b&gt; table creation option to avoid trashing the logs if you think this data is recoverable from elsewhere. This will also create the table faster.&lt;br /&gt;&lt;code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;drop table par_big_table&lt;br /&gt;/&lt;br /&gt;-- change dates below appropriately to include the SYSDATE &lt;br /&gt;-- at the time you run this example.&lt;br /&gt;&lt;br /&gt;create table par_big_table&lt;br /&gt;partition by range (created_date)&lt;br /&gt;(&lt;br /&gt;partition p200809 values less than (to_date('01-10-2008', 'DD-MM-YYYY')),&lt;br /&gt;partition p200810 values less than (to_date('01-11-2008', 'DD-MM-YYYY'))&lt;br /&gt;)&lt;br /&gt;as&lt;br /&gt;select * from big_table&lt;br /&gt;/&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now try to insert into the new partitioned table without passing the CREATED_DATE value, as you will wrongly assume the new partitioned table will have a DEFAULT VALUE. See how you get the error.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;insert into par_big_table (id, subject) values (5,'test4')&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;insert into par_big_table (id, subject) values (5,'test4')&lt;br /&gt;            *&lt;br /&gt;ERROR at line 1:&lt;br /&gt;ORA-14400: inserted partition key does not map to any partition&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;This happens because the value the INSERT statement is passing for the CREATED_DATE column is NULL and the partitioned table doesn't have a DEFAULT VALUE for this column.&lt;br /&gt;&lt;br /&gt;To fix this error and stop the production outage you might have caused :-) you have two choices:&lt;br /&gt;&lt;br /&gt; * ALTER the new partitioned table and make the column to have a DEFAULT VALUE&lt;br /&gt; * Change the application code to always include a value for the CREATED_DATE&lt;br /&gt;&lt;br /&gt;Let's ALTER the table.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;alter table par_big_table modify ( created_date date default sysdate);&lt;br /&gt;&lt;br /&gt;insert into par_big_table (id, subject) values (5,'test4');&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;commit;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Again watch for those DEFAULT VALUES in columns when you are creating partitioned tables with CTAS.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-1346895339809722035?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/1346895339809722035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=1346895339809722035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1346895339809722035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/1346895339809722035'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/09/partitioning-using-create-table-as-ctas.html' title='Partitioning using CREATE TABLE AS (CTAS) and Column Default Values'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-3616575365763037170</id><published>2008-08-15T21:34:00.013+01:00</published><updated>2008-08-19T07:25:32.900+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Bind Variables'/><category scheme='http://www.blogger.com/atom/ns#' term='Fine Grained Auditing'/><category scheme='http://www.blogger.com/atom/ns#' term='FGA'/><title type='text'>Capture bind variables in SQL with Oracle FGA</title><content type='html'>In Oracle 10g with fine-grained auditing (FGA) it is possible to track the bind variables of your application's SQL statements. I know, Oracle 11g is out but how amazing, I am still discovering new things in Oracle 10g!&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;Oracle FGA is good for bind variables, if that is what you want after all. It is lightweight and more easy to use than its alternatives, for example the full SQL TRACE with the option '10046 TRACE NAME CONTEXT FOREVER, LEVEL 12'. &lt;br /&gt;&lt;br /&gt;Another benefit of FGA is that you can choose which object you want to audit  and what kind of statements, SELECT, INSERT...etc you want to audit. Whereas with the SQL TRACE you just have to accept the trace dump and the performance implications.&lt;br /&gt;&lt;br /&gt;More good news is that in Oracle 10g you don't have to bounce the database anymore to set the initialization parameter AUDIT_TRAIL and enable auditing for your system. FGA does not require a database shutdown/restart.&lt;br /&gt;&lt;br /&gt;Object or user auditing can be done ad-hoc and on the spot, thanks to FGA. You can audit INSERT, DELETE or just SELECT statements. Moreover, you can be object specific or user specific. For example if you wanted to audit the DML happening on a table all you have to do is to create an Audit Policy for that table. You can use the &lt;b&gt; DBMS_FGA.ADD_POLICY &lt;/b&gt; procedure to create the policy. The modifications on the table, together with the bind variables, are captured and logged in a SYS owned log table called &lt;b&gt;FGA_LOG$&lt;/b&gt;. How amazing! &lt;br /&gt;&lt;br /&gt;Here is an example:&lt;br /&gt;&lt;br /&gt;We set up an object auditing policy, which will monitor all INSERT, UPDATE and DELETE operations on the table EMP on Scott's schema.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; begin&lt;br /&gt;     dbms_fga.add_policy (&lt;br /&gt;      object_schema   =&gt; 'SCOTT',&lt;br /&gt;      object_name     =&gt; 'EMP',&lt;br /&gt;      policy_name     =&gt; 'EMP_DETECTIVES',&lt;br /&gt;      audit_column    =&gt; 'ENAME',&lt;br /&gt;      statement_types =&gt; 'INSERT, UPDATE, DELETE',&lt;br /&gt;      audit_trail =&gt; DBMS_FGA.DB_EXTENDED&lt;br /&gt;);&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Then connect as SCOTT the owner of the object you are auditing and do some changes on the object.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; conn scott/tiger&lt;br /&gt;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;SQL&gt; variable myname varchar2(50);&lt;br /&gt;SQL&gt; exec :myname :='ROBIN';&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;PL/SQL procedure successfully completed.&lt;br /&gt;&lt;br /&gt;SQL&gt; insert into emp values (9999, :myname, null, null, null, null, null,null);&lt;br /&gt;&lt;br /&gt;1 row created.&lt;br /&gt;&lt;br /&gt;SQL&gt; COMMIT;&lt;br /&gt;&lt;br /&gt;Commit complete.&lt;br /&gt;&lt;br /&gt;SQL&gt; delete emp where ename = :myname;&lt;br /&gt;&lt;br /&gt;1 row deleted.&lt;br /&gt;&lt;br /&gt;SQL&gt; commit;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Now look at the &lt;b&gt;FGA_LOG$&lt;/b&gt; to see the audit entries.&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;pre&gt;&lt;br /&gt;SQL&gt; conn sys/***** as sysdba&lt;br /&gt;&lt;br /&gt;Connected.&lt;br /&gt;&lt;br /&gt;SQL&gt; column ntimestamp# format a30&lt;br /&gt;SQL&gt; column lsqltext format a15&lt;br /&gt;SQL&gt; column dbuid format a15&lt;br /&gt;SQL&gt; column obj$name format a10&lt;br /&gt;SQL&gt; column lsqlbind format a15&lt;br /&gt;SQL&gt; column lsqltext format a20&lt;br /&gt;&lt;br /&gt;SQL&gt; select ntimestamp#, dbuid, obj$name, lsqlbind, lsqltext  from sys.fga_log$;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NTIMESTAMP#                    DBUID           OBJ$NAME   LSQLBIND        LSQLTEXT&lt;br /&gt;------------------------------ --------------- ---------- --------------- --------------------&lt;br /&gt;14-AUG-08 19.39.48.427696 PM   SCOTT           EMP         #1(5):ROBIN    insert into emp valu&lt;br /&gt;                                                                          es (9999, :myname, n&lt;br /&gt;                                                                          ull, null, null, nul&lt;br /&gt;                                                                          l, null,null)&lt;br /&gt;&lt;br /&gt;14-AUG-08 19.39.56.577619 PM   SCOTT           EMP         #1(5):ROBIN    delete emp where ena&lt;br /&gt;                                                                          me = :myname&lt;br /&gt;&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;WARNING :&lt;/b&gt; Don't forget to drop the policy once you are done, cause the auditing will go for infinite time on the object. The FGA_LOG$ table will fill up and you will waste space. You can drop the policy once you have done with it like this:&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt;  conn sys/***** as sysdba&lt;br /&gt;SQL&gt; &lt;br /&gt;begin&lt;br /&gt;    dbms_fga.drop_policy ( 'SCOTT', 'EMP','EMP_DETECTIVES');&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-3616575365763037170?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/3616575365763037170/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=3616575365763037170' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3616575365763037170'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/3616575365763037170'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/08/capture-bind-variables-in-sql-with.html' title='Capture bind variables in SQL with Oracle FGA'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-8829184671207740176</id><published>2008-06-16T13:49:00.043+01:00</published><updated>2010-10-24T23:12:26.654+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle BI Publisher'/><category scheme='http://www.blogger.com/atom/ns#' term='Business Intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='obiee'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle BI'/><title type='text'>Oracle OBIEE Install on Unbreakable Linux</title><content type='html'>After visiting a seminar given by Oracle on Data Analysis and Oracle BI, I have decided to explore the Oracle OBIEE product and see it first hand. In this post I would like to share my experience of installing Oracle OBIEE on Oracle's Unbreakable Linux.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;I am in the opinion that  all things should be in the database and I was reluctant and skeptical about Oracle BI. Why on earth do we need another app server kind of server, a server which is half webserver and half app server and all it does is things like daily office automation tasks. After reading some marketing text about the tool I found it to claim to do things like:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Mail merge&lt;/li&gt;&lt;li&gt;Cheque printing&lt;/li&gt;&lt;li&gt;PDF  reports&lt;/li&gt;&lt;li&gt;Flash graphs&lt;/li&gt;&lt;li&gt;Any format Reports&lt;/li&gt;&lt;li&gt;Interactive dashboards&lt;/li&gt;&lt;li&gt;Ad-hoc analysis &lt;/li&gt;&lt;li&gt;Market analysis&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;A true mix of Siebel, JD Edwards and Peoplesoft one can say. Especially what is the point of having a tool like OBIEE, when you can have all this (maybe not all, but a significant portion) directly from the database with Oracle APEX in Oracle 11g served to the user via a web browser and for FREE. Having Google offering MS Word like applications on the web what is the point really of OBIEE. Is OBIEE already old technology?&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Installing Oracle OBIEE on Unbreakable Linux&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, I have downloaded &lt;b&gt;Unbreakable Linux&lt;/b&gt; from the Oracle Store &lt;a href="http://oraclestore.oracle.com/"&gt;here&lt;/a&gt;. Installed the OS on a Desktop Machine and then, downloaded Oracle Business Intelligence Enterprise Edition OBIEE and particularly the Linux version file &lt;b&gt;biee_linux_x86_redhat_101333_disk1.cpio&lt;/b&gt; from Oracle Downloads Website.&lt;br /&gt;&lt;br /&gt;One thing I noticed when I was reading about OBIEE is that it is "Database Agnostic", that is it doesn't need a database to operate, although you can put it in XMLDB. But this is not necessary as OBIEE can live on a file system.&lt;br /&gt;&lt;br /&gt;That is what I did and I run the command on the downloaded file like this from my Linux prompt&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;i&gt;$ cpio -idmv &lt; biee_linux_x86_redhat_101333_disk1.cpio&lt;/i&gt;when the file extracted gave me following directory structure&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;i&gt;/home/oracle/RH_Linux/Server/Oracle_Business_Intelligence/&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;then all you need to do to start installilng the OBIEE is run the &lt;i&gt;setup.sh&lt;/i&gt; script like this&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;i&gt;/home/oracle/RH_Linux/Server/Oracle_Business_Intelligence/setup.sh&lt;br /&gt;&lt;/i&gt;&lt;/p&gt;During the installation the trickiest part was to provide your JDK software's home. That is you have to have Java installed on the box where you will run OBIEE as it runs on OC4J (Oracle Containers 4 Java) platform. Basically a J2EE platform.&lt;br /&gt;&lt;br /&gt;Once I have correctly indicated the directory where my Java JDK 1.5 (or greater) was installed the installation was smooth and finished quickly. I have chosen the full complete installation of OBIEE from the install options and it put software in the designated Oracle BI homes.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;i&gt;/home/oracle/OracleBI&lt;br /&gt;/home/oracle/OracleBIData&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;/p&gt;As this is not MS Windows I didn't get lots of menu items at the end of the installation. Instead I had to go to a directory and start certain scripts in order to get the whole of my OBIEE infrastructure up and running. If you want to know which servers and services to start, you will need to read stuff on the Installation manuals and other BI blogs. But as a starter page after the installation you will get the welcome page: file:///home/oracle/OracleBI/index_bi_ee.html&lt;br /&gt;&lt;br /&gt;This page tells it all. You get links to the 3 main components of your OBIEE installation on the right top corner of this page and these are:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;i&gt; Application Server Control&lt;/i&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Oracle BI Interactive Dashboards&lt;/i&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;&lt;i&gt;Oracle BI Publisher&lt;/i&gt;&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;Theoretically all 3 should work when you click them. In my case I found only the 1st link to be working. After some Google whacking and troubleshooting search I have realised that some services or some '.sh' scripts required didn't automatically run and required services weren't started properly. Tsk, tsk tsk... Remember? This is a linux platform. Probably OBIEE is best run on Windows, then!?&lt;br /&gt;&lt;br /&gt;Anyway I found the &lt;i&gt;/home/oracle/OracleBI/setup&lt;/i&gt; directory to be full of cool xxxx.sh scripts which you can use to start stuff in OBIEE.&lt;br /&gt;&lt;br /&gt;After successfully starting Oracle BI  Server, Oracle BI Presentation Services (SAW server) I have finally managed the get all 3 links to work and started exploring the Oracle BI Infrastructure.&lt;br /&gt;&lt;br /&gt;In another post I hope to write about my thoughts on OBIEE.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;NOTES:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;OBIEE Defaut User is : Administrator&lt;br /&gt;OBIEE Default User password is : Administrator&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Resources I used for the OBIEE installation.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;a href="http://www.biblogs.com/?p=5093"&gt;http://www.biblogs.com/?p=5093&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technology/documentation/bi_ee.html"&gt;http://www.oracle.com/technology/documentation/bi_ee.html&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-8829184671207740176?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/8829184671207740176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=8829184671207740176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/8829184671207740176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/8829184671207740176'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/06/oracle-obiee-install-on-unbreakable.html' title='Oracle OBIEE Install on Unbreakable Linux'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-7467260566407503885</id><published>2008-06-12T06:53:00.012+01:00</published><updated>2010-10-24T23:25:53.864+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Business Intelligence'/><category scheme='http://www.blogger.com/atom/ns#' term='obiee'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apex'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Warehousing'/><title type='text'>Data Analysis: A Quick &amp; Cost Effective Approach by Oracle Cornerstone Briefings</title><content type='html'>I have attended yesterday the &lt;span style="font-weight: bold;"&gt;Data Analysis: A Quick &amp;amp; Cost Effective Approach&lt;/span&gt; by &lt;a href="http://www.oracle-cornerstone-briefings.com/Main/LandingPage.html"&gt;Oracle Cornerstone Briefings&lt;/a&gt; for customers in TVP, Reading, Oracle UK Headquarters. &lt;br /&gt;&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;I must say working in UK for the last decade I have never visited this part of the country which is considered the "Silicon Valley" of UK. I was impressed by the buildings Oracle's training rooms and facilities. Woow!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The topic was about Data Analysis and the OBIEE Server. The presentation was in two parts and was Given by &lt;b&gt;Aidan &lt;/b&gt;and&lt;b&gt; Stuart &lt;/b&gt;of  Oracle UK.&lt;br /&gt;&lt;br /&gt;Part one focused in the current situation and challenges in Data Management today. The reference architecture was a 3 component chart described as "process data" , "manage data" and then "access data".&lt;br /&gt;&lt;br /&gt;The highlights of the first part can be summarized as:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;The data management process is still difficult, there are still a questions about the "single version of truth" in data management still people chop and spread data all over the place and analyse it in tools such as Excel and etc. &lt;/li&gt;&lt;li&gt;There is still complexities even the best of the tools out there can not address. &lt;/li&gt;&lt;li&gt;The sources, where we gather data from are still evolving, and new sources appear from which we are not able to harvest the data quickly and efficiently. &lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;The second part of the briefing was, if you haven't guessed already, about how Oracle with its &lt;a href="http://www.oracle.com/technology/products/bi/enterprise-edition.html"&gt;Business Intelligence Server Enterprise Edition (OBIEE)&lt;/a&gt;, ex Siebel a company Oracle has purchased recently, is able to meet these challenges and complexities on data management.&lt;br /&gt;&lt;br /&gt;It seems to me like OBIEE, sweet name for a product, they call it just "obiee", is an application which is "Database Agnostic" that is, it doesn't need to belong or be installed on or work with a particular database. It is a system which is installed on a file system, windows, linux whatever and then it runs all your reporting, report publishing, dashboarding and metadata in one place. So it is not a database! It is a kind of application which manages your reporting and dashboarding metadata storage and publication processes. A kind of webserver and appserver together which schedules and runs queries on any database, the extract of reports via email, pdf, Excel, XML, Flash Charts, dashboards you name it, and it is possible kind of tool.&lt;br /&gt;&lt;br /&gt;When I was listening and seeing demonstrations about all this I was thinking how different is OBIEE from &lt;a href="http://apex.oracle.com/i/index.html"&gt;Oracle APEX&lt;/a&gt;. Then I asked them.&lt;br /&gt;&lt;br /&gt;Their answer was that they were not similar at all. APEX is more like a rapid application development environment on the web and is all stored in the database in XMLDB. Whereas although OBIEE can be stored in XMLDB like Apex, Obiee is not an application development tool but a data analysis environment. They are different. Are they?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/18830350-7467260566407503885?l=kubilaykara.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://kubilaykara.blogspot.com/feeds/7467260566407503885/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=18830350&amp;postID=7467260566407503885' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7467260566407503885'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/18830350/posts/default/7467260566407503885'/><link rel='alternate' type='text/html' href='http://kubilaykara.blogspot.com/2008/06/data-analysis-quick-cost-effective.html' title='Data Analysis: A Quick &amp; Cost Effective Approach by Oracle Cornerstone Briefings'/><author><name>Kubilay Tsil Kara</name><uri>https://profiles.google.com/103901222720404137805</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh5.googleusercontent.com/-8mz9uRZtitg/AAAAAAAAAAI/AAAAAAAAA0Y/u-C923s1tHY/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-18830350.post-8275648228318599970</id><published>2008-05-22T12:29:00.055+01:00</published><updated>2008-09-17T00:35:57.558+01:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard'/><category scheme='http://www.blogger.com/atom/ns#' term='High Availability'/><category scheme='http://www.blogger.com/atom/ns#' term='DGMGRL'/><category scheme='http://www.blogger.com/atom/ns#' term='DBA'/><category scheme='http://www.blogger.com/atom/ns#' term='RMAN'/><category scheme='http://www.blogger.com/atom/ns#' term='standby logs'/><category scheme='http://www.blogger.com/atom/ns#' term='Physical Standby Database'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Guard Broker'/><category scheme='http://www.blogger.com/atom/ns#' term='Standby Database'/><title type='text'>Oracle Data Guard and High Availability Physical  Standby Database configuration using Oracle 10g R2 and Ubuntu 7.10</title><content type='html'>In this post I would like to share my experience of setting up an Oracle Data Guard (DG) Fast-Start Failover High Availability (HA) environment with a Physical Standby Database and Data Guard Broker enabled, using 2 PCs with Ubuntu 7.10 Desktop and Oracle 10g R2.&lt;br /&gt;&lt;span class="fullpost"&gt;&lt;br /&gt;&lt;br /&gt;Data Guard and High Availability is not much of DBA work really, there is no tuning, data modelling  or core DBA skills like SQL involved.&lt;br /&gt;&lt;br /&gt;This is all about the chit-chat between two servers, lots of networking magic-do, and one server informing the other when it is down. Is like SysAdmin disguised as a DBA. You can also call it a "&lt;span style="font-style: italic;"&gt;poor man's RAC&lt;/span&gt;", I suppose.&lt;br /&gt;&lt;br /&gt;It took me about 2-3 hours, depending on the size of your database, to set up and successfully implement the following.&lt;br /&gt;&lt;br /&gt;&lt;b&gt; Summary of steps&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="#config"&gt;Configure the primary database&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="#physical"&gt;Create a physical standby database from your primary database using RMAN.&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="#dgmgrl"&gt;Oracle Data Guard and Data Broker (DGMGRL) configuration&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="#failover"&gt;Do the failover&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="#reinstate"&gt;Reinstate the failed primary database as a physical standby database after the failover&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;My instructions will be as brief and as neat as possible. Here we go:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. &lt;a name="config"&gt;Configure the primary database &lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.1 Enable Forced Logging on the primary database&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; conn / as sysdba&lt;br /&gt;SQL&gt; alter database force logging&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1,2 Create a password file with orapwd on then primary database&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$ orapwd file=/usr/local/oracle/product/10.2.0.1/dbs/orapwtest01 password=kubi entries=2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.3 Configure standby redo Logs on the primary database, these will be needed when the primary changes role and becomes standby&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo01.log' SIZE 50M;&lt;br /&gt;SQL&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo02.log' SIZE 50M;&lt;br /&gt;SQL&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo03.log' SIZE 50M;&lt;br /&gt;SQL&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo04.log' SIZE 50M;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.4 Get a better than the default standby_archive_dest location&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; alter system set standby_archive_dest='/u01/oradata/test01/standby_archive_dest';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.5 Create pfile from the existing database spfile, if you have used dbca to create your db you probably have an spfile&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; create pfile='/usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora' from spfile;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.6 Then Edit the pfile and add those Data Guard specific parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;On the primary database box edit the pfile for the primary database like this, add the following at the end of the file, change your host names and database SID accordingly.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;# DG Config PRIMARY ROLE initialization parameters&lt;br /&gt;*.db_unique_name=host_istanbul&lt;br /&gt;*.db_domain='mediterranean'&lt;br /&gt;*.log_archive_config='DG_CONFIG=(host_istanbul,host_london)'&lt;br /&gt;*.log_archive_dest_1='LOCATION=/u01/oradata/test01/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES)&lt;br /&gt;DB_UNIQUE_NAME=host_istanbul'&lt;br /&gt;*.log_archive_dest_2='SERVICE=TO_HOST_london LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)&lt;br /&gt;DB_UNIQUE_NAME=host_london'&lt;br /&gt;*.log_archive_dest_state_1=ENABLE&lt;br /&gt;*.log_archive_dest_state_2=ENABLE&lt;br /&gt;*.log_archive_max_processes=4&lt;br /&gt;*.db_flashback_retention_target=4320&lt;br /&gt;*.undo_retention=3600&lt;br /&gt;#&lt;br /&gt;# DG Config STANDBY ROLE initialization parameters&lt;br /&gt;*.fal_server=host_london&lt;br /&gt;*.fal_client=host_istanbul&lt;br /&gt;*.standby_file_management=auto&lt;br /&gt;#&lt;br /&gt;# Flashback&lt;br /&gt;*.db_recovery_file_dest=/u01/oradata/test01/fra&lt;br /&gt;*.db_recovery_file_dest_size=524288000&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.7 Then startup the primary database instance using the pfile with the new Data Guard parameters&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; startup force pfile='/usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.8 After the instance startup, recreate the spfile to include the new added Data Guard parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQ&gt; create spfile from pfile='/usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.9 Bounce the primary database so that it starts up using the spfile and the new Data Guard parameters&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; shutdown immediate;&lt;br /&gt;&lt;br /&gt;SQL&gt; startup mount;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;1.10 Put the primary database in archivelog mode&lt;/b&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; alter database archivelog;&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.11 Enable flashback on the primary database, flashback will be necessary for fast-start failovers&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; alter database flashback on;&lt;br /&gt;SQL&gt; alter database open;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now you have a database ready to be used as primary database with all Data Guard configuration parameters in place. It is now time to create the physical standby database, lets move on.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. &lt;a name="physical"&gt;Create a physical standby database from your primary database using RMAN&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2.1 Create a backup copy of the primary database data files with RMAN (Oracle 10g R2) ready to be used for standby duplication.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# !/bin/bash&lt;br /&gt;&lt;br /&gt;# Unix controls&lt;br /&gt;#&lt;br /&gt;trap cleanup 1 2 3 15&lt;br /&gt;cleanup()&lt;br /&gt;{&lt;br /&gt;echo "Caught CTRL-C Signal ... exiting script."&lt;br /&gt;exit 1&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#!/bin/bash&lt;br /&gt;# Oracle Environemt Variables&lt;br /&gt;#&lt;br /&gt;export ORACLE_SID=test01&lt;br /&gt;export ORACLE_BASE=/usr/local/oracle&lt;br /&gt;export ORACLE_HOME=/usr/local/oracle/product/10.2.0.1&lt;br /&gt;export PATH=$PATH:${ORACLE_HOME}/bin&lt;br /&gt;#&lt;br /&gt;rman target=/ &lt;&lt;&lt;br /&gt; EOF&lt;br /&gt;configure controlfile autobackup on;&lt;br /&gt;CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '/u01/backup/test01/standby_backups/autobkpcontrolfile_%F';&lt;br /&gt;run {&lt;br /&gt;change archivelog all crosscheck;&lt;br /&gt;allocate channel rman_back_ch01 type disk;&lt;br /&gt;allocate channel rman_back_ch02 type disk;&lt;br /&gt;backup as compressed backupset incremental level 0 database &lt;br /&gt;format '/u01/backup/test01/standby_backups/sbybk_inc0_%s_%p' include current controlfile for standby;&lt;br /&gt;sql "alter system archive log current";&lt;br /&gt;backup as compressed backupset archivelog all format '/u01/backup/test01/standby_backups/archlog_%s_%p';&lt;br /&gt;release channel rman_back_ch01;&lt;br /&gt;release channel rman_back_ch02;&lt;br /&gt;}&lt;br /&gt;EOF&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;2.2 Prepare an Initialization Parameter File for the standby database&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;oracle@istanbul:~$ scp /usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora&lt;br /&gt;                         oracle@london:/usr/local/oracle/product/10.2.0.1/dbs/&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;On the standby box after you copy a pfile from the primary database default location edit like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;# DG Config PRIMARY ROLE initialization parameters&lt;br /&gt;*.db_unique_name=host_london&lt;br /&gt;*.db_domain='mediterranean'&lt;br /&gt;*.log_archive_config='DG_CONFIG=(host_istanbul,host_london)'&lt;br /&gt;*.log_archive_dest_1='LOCATION=/u01/oradata/test01/arch VALID_FOR=(ALL_LOGFILES,ALL_ROLES)&lt;br /&gt;DB_UNIQUE_NAME=host_london'&lt;br /&gt;*.log_archive_dest_2='SERVICE=TO_HOST_istanbul LGWR ASYNC VALID_FOR=(ONLINE_LOGFILES,PRIMARY_ROLE)&lt;br /&gt;DB_UNIQUE_NAME=host_istanbul'&lt;br /&gt;*.log_archive_dest_state_1=ENABLE&lt;br /&gt;*.log_archive_dest_state_2=ENABLE&lt;br /&gt;*.log_archive_max_processes=4&lt;br /&gt;*.db_flashback_retention_target=4320&lt;br /&gt;*.undo_retention=3600&lt;br /&gt;#&lt;br /&gt;# DG Config STANDBY ROLE initialization parameters&lt;br /&gt;*.fal_server=host_istanbul&lt;br /&gt;*.fal_client=host_london&lt;br /&gt;*.standby_file_management=auto&lt;br /&gt;&lt;br /&gt;# Flashback&lt;br /&gt;*.db_recovery_file_dest=/u01/oradata/test01/fra&lt;br /&gt;*.db_recovery_file_dest_size=524288000&lt;br /&gt;#&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.3 Startup the standby database in NOMOUNT state and create it&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; startup pfile='/usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora' nomount;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Before you duplicate the database for standby with RMAN you have to configure connectivity between the 2 boxes with tnsnames.ora.&lt;br /&gt;&lt;br /&gt;On the Primary System your tnsnames.ora file should look like this:&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;TO_HOST_london =&lt;br /&gt;( DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = london)(PORT = 1521)))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVICE_NAME = test01))&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;TO_HOST_istanbul =&lt;br /&gt;( DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = istanbul)(PORT = 1521)))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVICE_NAME = test01))&lt;br /&gt;)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;On the Standby System your tnsnames.ora file should look like this:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;TO_HOST_istanbul =&lt;br /&gt;( DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = istanbul)(PORT = 1521)))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVICE_NAME = test01))&lt;br /&gt;)&lt;br /&gt;&lt;br /&gt;TO_HOST_london =&lt;br /&gt;( DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST =&lt;br /&gt;(ADDRESS = (PROTOCOL = TCP)(HOST = london)(PORT = 1521)))&lt;br /&gt;(CONNECT_DATA =&lt;br /&gt;(SERVICE_NAME = test01))&lt;br /&gt;)&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;This is so that the boxes can communicate with each other via those service names. Then you can duplicate the primary database on the standby box using RMAN like this&lt;br /&gt;&lt;br /&gt;Make sure orapwd is run on london as well&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;orapwd file=/usr/local/oracle/product/10.2.0.1/dbs/orapwtest01 password=kubi entries=2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Then connect to RMAN on the primary database and start the creation of the standby database via RMAN.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;oracle@istanbul$ rman target /&lt;br /&gt;RMAN&gt;&lt;br /&gt;connect auxiliary sys/kubi@to_host_london&lt;br /&gt;run&lt;br /&gt;{&lt;br /&gt;allocate auxiliary channel ch1 type disk;&lt;br /&gt;duplicate target database for standby dorecover nofilenamecheck;&lt;br /&gt;release channel ch1;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.4 Add the standby log files on the standby database&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you watch the backup in the alert.log file RMAN gives the recommendation of adding the standby log files anyway.&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo03.log' SIZE 52428800;&lt;br /&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo02.log' SIZE 52428800;&lt;br /&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo01.log' SIZE 52428800;&lt;br /&gt;ALTER DATABASE ADD STANDBY LOGFILE '/u01/oradata/test01/sbyredo04.log' SIZE 52428800;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.5 Create SPFILE for the standby database &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; create spfile from pfile='/usr/local/oracle/product/10.2.0.1/dbs/inittest01.ora';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.6 Bounce the standby database to pickup the changes and start with an spfile.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; startup force mount;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.7 Put the standby database in ARCHIVELOG mode.&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; alter database archivelog;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.8 Put the standby database inf FLASHBACK mode&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; alter database flashback on;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.9 Put the standby database in constant recovery mode receiving archived logs from the primary database&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;To start Redo Apply, issue the following statement:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SQL&gt; ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt; 3.&lt;a name="dgmgrl"&gt; Oracle Data Guard and Data Broker (DGMGRL) configuration&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3.1. On both Primary and Standby Database set the parameter DG_BROKER_START to TRUE &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SQL&gt; ALTER SYSTEM SET DG_BROKER_START=TRUE SCOPE=BOTH;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3.2. Add global_db_name parameters and other parameters to the listener.ora file on both primary and standby as follows, on Primary Database your listener.ora&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;SID_LIST_LISTENER =&lt;br /&gt;(SID_LIST =&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME = PLSExtProc)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;(PROGRAM = extproc)&lt;br /&gt;)&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME = test01)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;)&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME=pdb)&lt;br /&gt;(GLOBAL_DBNAME=host_istanbul_DGMGRL.mediterranean)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;LISTENER = (DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=istanbul)&lt;br /&gt;(PORT=1521))))&lt;br /&gt;SQLNET.EXPIRE_TIME=2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;on Standby Database your listener.ora&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;SID_LIST_LISTENER =&lt;br /&gt;(SID_LIST =&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME = PLSExtProc)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;(PROGRAM = extproc)&lt;br /&gt;)&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME = test01)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;)&lt;br /&gt;(SID_DESC =&lt;br /&gt;(SID_NAME=pdb)&lt;br /&gt;(GLOBAL_DBNAME=host_london_DGMGRL.mediterranean)&lt;br /&gt;(ORACLE_HOME = /usr/local/oracle/product/10.2.0.1)&lt;br /&gt;)&lt;br /&gt;)&lt;br /&gt;LISTENER = (DESCRIPTION =&lt;br /&gt;(ADDRESS_LIST=(ADDRESS=(PROTOCOL=tcp)(HOST=london)&lt;br /&gt;(PORT=1521))))&lt;br /&gt;SQLNET.EXPIRE_TIME=2&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3.3 Create the DGMGRL broker Configuration&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;$dgmgrl&lt;br /&gt;DGMGRL&gt; connect sys/kubi@to_host_istanbul;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; create configuration mediterranean_dg as primary database is host_istanbul connect identifier is to_host_istanbul;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; add database host_london as connect identifier is to_host_london maintained as physical;&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; enable configuration;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;b&gt;3.4. Enabling Fast-Start Failover and the Observer &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;DGMGRL&gt; EDIT DATABASE 'host_istanbul' SET PROPERTY 'LogXptMode'='SYNC';&lt;br /&gt;DGMGRL&gt; EDIT DATABASE 'host_london' SET PROPERTY 'LogXptMode'='SYNC';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3.5 Specify the FastStartFailoverTarget property&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;DGMGRL&gt; EDIT DATABASE 'host_istanbul' SET PROPERTY FastStartFailoverTarget='host_london';&lt;br /&gt;DGMGRL&gt; EDIT DATABASE 'host_london' SET PROPERTY FastStartFailoverTarget='host_istanbul';&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3.6. Upgrade the protection mode to MAXAVAILABILITY, if necessary.&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;DGMGRL&gt; EDIT CONFIGURATION SET PROTECTION MODE AS MAXAVAILABILITY;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3.7. Enable fast start failover&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;DGMGRL&gt; ENABLE FAST_START FAILOVER;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;3.8. Start the observer.&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;DGMGRL&gt; CONNECT sys/kubi@to_host_istanbul;&lt;br /&gt;DGMGRL&gt; START OBSERVER;&lt;br /&gt;Observer started&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;The above command will just hang, will not return you back to the prompt, this is how the observer is started, it is normal. Start anothter dgmgrl prompt for the rest of the operations.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3.8 Check the configuration so far&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;DGMGRL&gt; connect sys/kubi@to_host_istanbul&lt;br /&gt;Connected.&lt;br /&gt;DGMGRL&gt; show configuration;&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: mediterranean_dg&lt;br /&gt;Enabled: YES&lt;br /&gt;Protection Mode: MaxAvailability&lt;br /&gt;Fast-Start Failover: ENABLED&lt;br /&gt;Databases:&lt;br /&gt;host_istanbul - Primary database&lt;br /&gt;host_london - Physical standby database&lt;br /&gt;- Fast-Start Failover target&lt;br /&gt;&lt;br /&gt;Current status for "mediterranean_dg":&lt;br /&gt;SUCCESS&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Also see the verbose output where you can see how long it will take for a box to failover to the other.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;DGMGRL&gt; SHOW CONFIGURATION VERBOSE;&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: mediterranean_dg&lt;br /&gt;Enabled: YES&lt;br /&gt;Protection Mode: MaxAvailability&lt;br /&gt;Fast-Start Failover: ENABLED&lt;br /&gt;Databases:&lt;br /&gt;host_istanbul - Primary database&lt;br /&gt;host_london - Physical standby database&lt;br /&gt;- Fast-Start Failover target&lt;br /&gt;&lt;br /&gt;Fast-Start Failover&lt;br /&gt;Threshold: 30 seconds&lt;br /&gt;Observer: istanbul&lt;br /&gt;&lt;br /&gt;Current status for "mediterranean_dg":&lt;br /&gt;SUCCESS&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;b&gt;&lt;a name="failover"&gt;4. Do the failover&lt;/a&gt; &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Test by killing PMON of database instance test01 on the primary database box istanbul, this automatically will trigger a failover within 30 seconds to the standby database as configured. You can watch this exciting event happening by looking at the alert_tst01.log on both boxes simultaneously.Once you crashed test01 on host_istanbul, then on host_london go to dgmgrl and check out what it says.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;code&gt;&lt;br /&gt;oracle@london$ dgmgrl&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; connnect sys/kubi@to_host_london&lt;br /&gt;&lt;br /&gt;DGMGRL&gt; show configuration;&lt;br /&gt;&lt;br /&gt;Configuration&lt;br /&gt;Name: mediterranean_dg&lt;br /&gt;Enabled: YES&lt;br /&gt;Protection Mode: MaxAvailability&lt;br /&gt;Fast-Start Failover: ENABLED&lt;br /&gt;Databases:&lt;br /&gt;host_istanbul - Physical standby database (disabled)&lt;br /&gt;- Fast-Start Failover target&lt;br /&gt;host_london - Primary database&lt;br /&gt;&lt;br /&gt;Current status for "mediterranean_dg":&lt;br /&gt;Warning: ORA-16608: one or more databases have warnings&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;That is, host_istanbul database is down!&lt;br /&gt;&lt;br /&gt;Be careful, the database is down and NOT the box. As I am running observer on host_istanbul as well, if you unplug the box, probably nothing  nice will happen as the observer will be incapable of detecting anything. In a real life situation I suppose the observer runs on a 3rd piece of hardware. I haven't tested the 'unplugging' of the box, I don't know what it will do.  I just 'kill -9' the PMON backgroud process for the primary database instance test01.&lt;br /&gt;&lt;br /&gt;Anyway, your primary database now is host_london. You have failed over to it successfully in 30 seconds.&lt;br /&gt;&lt;br /&gt;If you followed the configuration steps above you will be able to &lt;span style="font-weight: bold;"&gt;REINSTATE&lt;/span&gt; a disabled standby database as you have flashback enabled and put it back in the High Availability environment after you mount it. This is what we will do next.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;5. &lt;a name="reinstate"&gt;Reinstate the failed primary database as a physical standby database after the failover&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Fast-Start failover is a very good configuration for High Availability (HA) as it requires no intervention from the DBA, almost, you wish!&lt;br /&gt;&lt;br /&gt;Say the primary database fails, say at 04:00 am, when you are sleeping, you get no phonecall from your boss, and the standby database becomes primary. Oleey! business continues. The next day when you realise what happened, you can  with Data Guard Observer and using flash back logs  reinstate the failed primary to be a standby to the new primary.&lt;br /&gt;&lt;br /&gt;Basically Data Guard 'rolls forward' the SCN of the old Primary to match that of the now new primary (ex Standby). That is what Flashback Database does and it is all about.  Moving the SCN to catch up with the primary.&lt;br /&gt;&lt;br /
