750 likes | 771 Views
EnergySys and BP. Using Oracle XML DB and XQuery to Deliver the Commercial Management System for the World's Longest Oil Pipeline Martin Crane BP AzSPU HVR Operations Manager Peter Westwood EnergySys Technical Director. Introduction. Business context
E N D
EnergySys and BP Using Oracle XML DB and XQuery to Deliver the Commercial Management System for the World's Longest Oil Pipeline Martin Crane BP AzSPU HVR Operations Manager Peter Westwood EnergySys Technical Director
Introduction • Business context • A view of the business operation and the challenges facing BP in building and operating the world’s longest oil pipeline • Technical Solution • How we built the supporting IT system • Real world use of XML DB features and functions • Questions
Early Developments • 1996 Collection of majors and Government Oil Company agreed to develop the Chirag Field • One offshore platform • Expected production of 130,000 bbls/day • One “sized” pipeline to Black Sea Port • Flowing since 1998
New Pipeline Required • The current infrastructure was never going to support development – huge investment required • Decision taken to put in a new pipeline and bypass the Turkish straights • Access to Mediterranean deemed essential for marketing • Ambitious Pipeline route mapped from Baku thro’ Tbilisi to Ceyhan ( BTC) • Some said it could not be done
BTC Becomes A Reality • Enormous undertaking and huge investment cost • Politically unstable • No real transportation infrastructure • Huge changes in terrain • Huge amount of pipe required • >$3.7bn Capex BTC cost • $158m Opex (at peak throughput)
BTC and SCPC • Two pipelines at same time in same trench • One 42”Oil line and one 42”Gas line • Combined costs >$20 billion • Then the world’s largest construction project • Logistics a major problem given access
BTC and SCPC • Eight pump stations required • Using local workforce and companies where possible • Landscape returned to natural condition and original use • During winter unable to access high grounds • Oversized to allow third party access
BTC and SCPC • Customs requirements in three counties made life interesting • Following slides show the difficulties and the enormity of the task
3000 9000ft 2500 2000 1500 Ground Elevation (metres) 4000ft 1000 500 0 Ceyhan 1994 Km Baku 0 Km -500 2000 1800 1600 1400 1200 1000 800 600 400 200 0 Pipeline Elevation
BTC Commercial Requirements • Capacity sharing agreements • Throughput management and controls • Fuel Oil agreements • Value based volume allocation • Direct reading of Measurement data across three countries • Hydrocarbon Accounting processes • Customer reporting
BTC Commercial Requirements • Invoice generation for transportation tariff • Tax and customs documentation for each country • Fuel Oil agreements • Predicted oil quantity and quality • Shipping prioritisation • Shipping administration • Bills Of Lading generation
BTC Commercial Requirements • Secure Audit trails • All calculation done via Excel spreadsheets • XML • External Public website for posting and retrieving data to partners • Access external market data (Platts) • BP not done this before in one system
NER WER Measurement & Sampling Point Socar Measurement Point SANGACHAL Georgia Georgia ACG Turkey CTP CTP CTP PST1 PST3 PST4/PRS* IPST1/PRS IPSA1 IPSA2 IPSG1 SD PSA1 PSA2 PSG1 PSG2 PST2/PRS* ? ? ? ? ? ? CEYHAN 3 rd Parties SOCAR, North Caspian & Other 3rd Parties Future RELIEF TANK RELIEF TANK RELIEF TANK RELIEF TANK RELIEF TANK RELIEF TANK System Overview
Why EnergySys • Competitive Price • Highly skilled staff • Working Knowledge of tool set • Dynamic attitude to working the solution • Leading edge not Bleeding edge
Technical Solution • Project Architecture • Our use of XML DB • Methods of data organisation and access • Schema and Container use • XPath and XQuery • Data design considerations • Real world experiences
General Overview • User commences a workflow • The workflow loads template documents and completes them via rules • The system offers a REST style interface for the management of the documents • The interface is implemented through XQuery, XPath and Java • The Librarian is responsible for all aspects of the lifecycle of the XML documents in the system
Use of Oracle XML DB • EnergySys has been using XML DB since early 2004 • Stable since the 10gR1 beta release • Production environment is 10gR2 • Real world use in business applications • Central repository for all business data • XML DB has been completely stable
XML DB Key Features • Oracle core services with XML • Transaction management • Resource management • Backup • Data security • Oracle XML DB features • Data format handling, structured storage • Query support (SQL, XPath and XQuery) • Data validation
Application Examples • Oracle XML DB works well with the different profiles our application demand
Access to the Data • Resource Views • Container strategy • XML Schema Registration • Data validation and annotation for data control • Query Methods • XPath • XQuery • HTTP Servlet (serving via XPath parameters)
Resource View • Organises XML Data into containers • Can be utilised in XPath to restrict scope of the evaluation and improve performance • Is represented via the FTP and WebDAV interfaces to the database
Container View • Here the Resource view shows the structure via ftp • Strategy here is to segregate documents by type and then by month • Constrains the search to a few hundred documents in place of many thousands ‘/home/cosmos/Audit/2006-09/’, ‘DocumentRoot = Nomination’, month September 2006
XPath use of the containers • To query documents in a particular container we have: select extract(res, '[xpath]', '[ns]').getClobVal() nodes from resource_view where under_path(res, '[container]') = 1
Strengths of Containers • Constrain data in defined groups • Can greatly improve performance for XPath • Makes large collections of documents accessible • Makes the layout of data clear in the FTP and WebDAV views
Weaknesses of Containers • Container structure known to the queries • Must use RMAN to backup the metadata associated with the resource view • Other back up techniques will not reproduce the resource view when restored