Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Start interrogating PGPS well test database wit...

Avatar for AlfonsoRReyes AlfonsoRReyes
December 05, 2018
25

Start interrogating PGPS well test database with SQL_151202

Avatar for AlfonsoRReyes

AlfonsoRReyes

December 05, 2018
Tweet

Transcript

  1. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Start interrogating the production well test database with SQL
  2. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL 2 What do you need to run SQL scripts? 1. Verify you have SQL Client installed 2. Verify your SQL Client runs 3. Verify that your SQL Client communicates with the PGPS database 4. Verify your scripts run and get data from PGPS
  3. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Verify that your SQL Client is installed This is how you know you have SQL installed If you don’t have it, ask ICT to install it for you
  4. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Verify your SQL Client runs Double-click on “SQL Developer” A screen like this should show up
  5. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Verify communication with the PGPS database It is possible when you start the first time your SQL Client you won’t have a connection to PGPS Right-click on “Connection” and click on “New Connection” Enter data in this screen as shown below: • Username : PTDATA_PDMS • Password : ptdata_user1 • Hostname: pww.oracle.ep.petronas.com.my • Port: 1521 • Service name: pgpsprod Test and Save Your are done!
  6. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Run your first SQL script Your first script will show you the names of the fields that are available in PGPS Click on the “SQL” icon on the menu bar and select “PGPS” This is your script window. Type your script here: SELECT DISTINCT(op_sub_area_code) FROM rv_pwel_result ORDER BY op_sub_area_code Enter this script in your script window: Hit the play button
  7. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Viewing your results This is your output window. You will get your results here
  8. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Explanation of the first script SELECT DISTINCT(op_sub_area_code) FROM rv_pwel_result ORDER BY op_sub_area_code This is for the field table Sort alphabetically by field
  9. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Explanation of your second SQL script SELECT code, max(production_day) FROM rv_pwel_result WHERE code like 'TMBG%' GROUP by code ORDER by code Will show the well name Latest date of the test Code for the field Example: Find the date of the latest well test in all strings in Tembungo table script
  10. Alfonso R. Reyes (Production Enhancement and Surveillance) Well and Network

    Modeling PET 2015 Rev. 0.925 Start interrogating the PGPS well test database with SQL Codes for other fields in PGPS ABU ANDG ANSI ASMP BAKU BARM KNWT KUMA LAHO LEDG LTGW LUKN RESK SIWA SMDK SMRG SMRK SOTG SPAT BEKK BETY BOKR BRNA BRNB BYAN D18 D21 D35 DULG DYNG ERBW F9 FBAM J4 KEPG KNAG KNRT MLON MLOR PC4 PNAR PTRI PULI TGGI TING TMBG TMNA TNGB TUKA ZUHE