<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Voragun Supawong on Medium]]></title>
        <description><![CDATA[Stories by Voragun Supawong on Medium]]></description>
        <link>https://medium.com/@voraguns?source=rss-5aec77812b18------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*1jgKGaNSHGVQ8wv5tBaekA.png</url>
            <title>Stories by Voragun Supawong on Medium</title>
            <link>https://medium.com/@voraguns?source=rss-5aec77812b18------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 10:22:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@voraguns/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Oracle database มีโครงสร้างยังไงบ้าง?]]></title>
            <link>https://medium.com/@voraguns/oracle-database-%E0%B8%A1%E0%B8%B5%E0%B9%82%E0%B8%84%E0%B8%A3%E0%B8%87%E0%B8%AA%E0%B8%A3%E0%B9%89%E0%B8%B2%E0%B8%87%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-211dd4f14054?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/211dd4f14054</guid>
            <category><![CDATA[oracle-architecture]]></category>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[oracle]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[oracle-database]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Thu, 22 May 2025 08:16:20 GMT</pubDate>
            <atom:updated>2025-05-22T08:17:10.386Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lzAQgnnf1tX-aAbu.jpg" /></figure><h3>Oracle database มีโครงสร้างยังไงบ้าง? (“What’s inside of Oracle database architecture) | คู่มือ Oracle DBA ฉบับ Masterpiece volume I</h3><p>สวัสดีคับ บทความนี้จะมาเล่าถึงโครงสร้างของ Oracle database ว่ามีโครงสร้างอะไรบ้างที่ควรรู้ เพื่อให้มีความคุ้นเคยกับการใช้ Oracle database สำหรับเราๆเองที่ทำงานในตำแหน่ง Database Administrator ที่ใช้งาน Product ของ Oracle</p><p>จุดประสงค์หลักๆของบทความนี้เลยคือ เพื่อที่จะถ่ายทอดความรู้เกี่ยวกับโครงสร้าง Oracle database คับ เริ่มกันเลย</p><p><strong>Oracle Server</strong> มี 2 ส่วนใหญ่ๆคือ Oracle instance กับ Oracle database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*LWYQ038WiH1pQxmW.jpg" /><figcaption>ภาพประกอบจาก <a href="https://www.youtube.com/watch?v=2ow4_D5VLnE">YouTube - Difference between Oracle instance and Oracle database</a></figcaption></figure><p><strong>Oracle database</strong> จะประไปด้วย file ต่างๆ มี data file, control file, redo log file, archive redo log file, parameter file และ password file</p><p>แต่ละไฟล์คืออะไร? เอาไว้ใช้ทำอะไรบ้าง?</p><ul><li><strong>Data file</strong> ใช้เก็บข้อมูลทั่วไปที่ใช้งาน</li><li><strong>Control file</strong> ใช้สำหรับเก็บข้อมูล system performance</li><li><strong>Redo log กับ Archive redo log</strong> ใช้สำหรับ recovery ให้กรณีที่ hardware เสียหรือ software เสีย</li><li><strong>Parameter file</strong> ใช้สำหรับเก็บ parameter โดยเอาไว้เรียกใช้งานตอน startup database</li><li><strong>Password file</strong> ใช้สำหรับเก็บข้อมูล user และ password ของคนที่มีสิทธิ startup และ shutdown Database ได้</li><li><strong>Alert log file</strong> ใช้สำหรับเก็บ error ที่เกิดขึ้นใน Oracle database</li><li><strong>Trace log file</strong> ใช้สำหรับเก็บข้อมูล activity ที่มีผลกระทบกับ database เช่น start listener</li></ul><p><strong>Oracle instance</strong> จะประกอบไปด้วย<strong> กลุ่มของ background process</strong> และ <strong>กลุ่มของ memory structure</strong></p><blockquote><strong>1 Oracle instance</strong> กลุ่มของ background process / memory structure สามารถ access ได้เพียง <strong>1 Oracle database</strong></blockquote><h3>User and Server Process</h3><p><strong>User process</strong> กับ <strong>Server process</strong> คือ process ที่ใช้สำหรับจัดการ execution ตอน run คำสั่ง SQL</p><p>แล้วความหมายของ <strong>User process</strong> และ <strong>Server process</strong> แตกต่างกันไหมหรือยังไงบ้าง?</p><p><strong>User process</strong> หมายถึงโปรแกรมที่ request เพื่อทำอะไรซักอย่างกับ Oracle Server ยกตัวอย่างให้เห็นภาพ เช่น database user ต้องการที่จะ select เพื่อดูข้อมูลจาก Oracle database</p><blockquote>* Note: User process ไม่สามารถสั่งทำงานแบบโดยตรงได้เลยไปที่ Oracle database</blockquote><p>ยกตัวอย่างให้เห็นภาพ อย่างแรกสิ่งที่เกิดขึ้น คิดอย่างเป็น step เลยคือ</p><ol><li>database user หรือเรียกว่า client นั้นจะต้องมีการสร้าง connection โดยการ request ซึ่งการ request นั้นอาจจะมาจากใช้งานโปรแกรม SQL Developer หรือ SQL*Plus (หน้าจอดำๆ หน้า command line)</li><li>หลังจากมีการสร้าง connection โดยการ request แล้วจะเกิด user process ขึ้นมานั้นเอง</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/618/0*GYSk4eVXXrK9LYrP" /><figcaption>ภาพประกอบจาก <a href="https://anuragpandeydba.wordpress.com/2017/12/21/connecting-to-an-oracle-instance-user-process-server-process/">Connecting to an Oracle Instance (User Process &amp; Server Process) — ORACLE DATABASE PROBLEM AND SOLUTIONS</a></figcaption></figure><p><strong>Server process</strong> หมายถึงโปรแกรมที่สามารถ interact ได้โดยตรงหรือทำอะไรก็ได้กับ Oracle database ได้แบบตรงๆเลย</p><p>ถ้า Environment ของ Oracle database เป็นแบบ Shared server ตัว Server process จะทำหน้าที่จัดการควบคุม user process สำหรับหลายๆ user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/342/0*df8shzY4BW1Sb_PE.gif" /><figcaption>ภาพจาก <a href="https://docs.oracle.com/cd/B28359_01/server.111/b28310/manproc001.htm#ADMIN11166">About Dedicated and Shared Server Processes</a></figcaption></figure><p>ส่วน Dedicated server ตัว Server process จะทำหน้าที่จัดการควบคุม user process สำหรับ 1 user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/487/0*VPYNQ3H4Ct_C68IR.gif" /><figcaption>ภาพจาก <a href="https://docs.oracle.com/cd/B28359_01/server.111/b28310/manproc001.htm#ADMIN11166">About Dedicated and Shared Server Processes</a></figcaption></figure><h3>Connecting to an Oracle Instance — Creating a session</h3><p>ยกตัวอย่าง user อยาก connect เข้ามาที่ Oracle database ผ่าน SQL*Plus เพื่อ run คำสั่ง SQL ตอนที่สร้าง connection ระหว่าง User process ไปที่ Oracle server นั้น<br>User process จะสั่งเรียกใช้งานผ่าน Server process ก่อนที่จะไปถึง Oracle server</p><p>โดย user process นั้นเกิดขึ้นที่ฝั่งคอมตัวเอง <br>Server process เกิดขึ้นที่ฝั่ง server<br>จากนั้น run คำสั่ง SQL โดย system user</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*eAXCnNC7t0Ap1F2z" /><figcaption>ภาพจาก <a href="https://anuragpandeydba.wordpress.com/2017/12/21/connecting-to-an-oracle-instance-user-process-server-process/">Connecting to an Oracle Instance (User Process &amp; Server Process) — ORACLE DATABASE PROBLEM AND SOLUTIONS</a></figcaption></figure><p>ตอนที่ user connect เข้าไป Oracle server จะเกิดสิ่งที่เรียกว่า session</p><p>Session เกิดขึ้นเมื่อ Oracle server validate แล้วว่ามี user connection</p><p>Session จบลงเมื่อ logout แล้วหรือว่า network เสีย / คอมเสีย session ขาด</p><p>User 1 คนสามารถสร้าง connection หลายๆครั้งได้ เช่น connect ผ่าน SQL plus นับ 1 session / connect ผ่าน SQL developer อีก 1 session ซึ่ง DBA สามารถกำหนดจำนวน session ที่ connect เข้ามาที่ database ได้</p><h3>Physical Structure — Database Files</h3><p>ใน Oracle database จะประกอบไปด้วยหลายๆ Physical file ซึ่งไฟล์ที่ว่านี้มีอะไรบ้าง?</p><ul><li>Data file ใช้เก็บข้อมูลทั่วไปที่ใช้งาน</li><li>Control file ใช้สำหรับเก็บข้อมูล system performance</li><li>Redo log กับ Archive redo log ใช้สำหรับ recovery ให้กรณีที่ hardware เสียหรือ software เสีย</li><li>Parameter file ใช้สำหรับเก็บ parameter โดยเอาไว้เรียกใช้งานตอน startup database</li><li>Password file ใช้สำหรับเก็บข้อมูล user และ password ของคนที่มีสิทธิ startup และ shutdown Database ได้</li><li>Alert log file ใช้สำหรับเก็บ error</li><li>Trace log file ใช้สำหรับเก็บข้อมูล activity ที่มีผลกระทบกับ database เช่น start listener</li></ul><p>ซึ่ง Parameter file นั้นก็มี 2 แบบ</p><ol><li>init.ora (หรือว่า PFILE) ใช้สำหรับเก็บ static parameter</li><li>spfile.ora ใช้สำหรับเก็บ dynamic parameter</li></ol><ul><li>Archive redo log file คือตัว copy อีกทีจาก redo log ใช้สำหรับ recovery database และไฟล์นี้จะเกิดขึ้นในกรณีที่ Database เรากําหนด mode เป็น ARCHIVELOG Mode</li></ul><h3>Memory Management and Memory Structures</h3><p>หัวข้อนี้จะเป็นเรื่องเกี่ยวกับการจัดการเรื่อง Memory ใน Oracle database ซึ่งจะ base on parameter ที่อยู่ในไฟล์ “<strong>init.ora</strong>”</p><p>Memory Management มีทั้งหมด 3 แบบ</p><ol><li>Automatic memory management ตัว Oracle จัดการ memory ในส่วน SGA และ PGA ให้เอง</li><li>Automatic shared memory management ตัวเราเองตั้งค่า setup memory ในส่วน SGA ได้ แต่ PGA ให้ตัว Oracle จัดการเอง</li><li>Manual Memory management ตัวเรา setup memory ในส่วนของ SGA และ PGA เอง</li></ol><blockquote>ถ้าสร้าง database โดยเรียกใช้ DBCA แล้วเลื่อก basic install option โดย default จะเป็นแบบ <strong>Automatic memory management</strong></blockquote><h3>Memory Structures</h3><p>มีอยู่ 3 ส่วนหลักๆ คือ</p><ol><li>System Global Area (SGA) allocate ตอน Oracle instance startup</li><li>Program Global Area (PGA) allocate ตอน Server process startup</li><li>User Global Area (UGA) allocate ตอน user connect แล้ว create session</li></ol><h4>System Global Area (SGA) คืออะไร?</h4><p>คือ memory ที่เก็บข้อมูล database process และ user ทั้งของ database โดย size ของ SGA สามารถกำหนดได้ที่ parameter <strong>SGA_MAX_SIZE</strong> และขนาดของ SGA จะ allocate ตอน Oracle instance startup โดยอิงจาก parameter file</p><p>ภายใน SGA จะประกอบไปด้วย Buffer cache / Redo log buffer / Java pool / Stream pool / Shared pool แล้วใน shared pool มี Library cache กับ Data Dictionary cache / Large pool</p><blockquote>อยากดูว่าใช้ SGA เท่าไหร่ ใช้คำสั่ง SQL — -&gt; SHOW SGA โดยต้อง connect เป็น SYSDBA</blockquote><p>SGA มีแยกเป็น 2 แบบ</p><ol><li>Static SGA เมื่อเปลี่ยน parameter แล้วต้อง restart database ถึงจะเห็นผล โดยค่าจะเปลี่ยนในไฟล์ “<strong>init.ora</strong>”</li><li>Dynamic SGA เปลี่ยนปุ้บ เห็นผลปั้บ</li></ol><h4>Parameter หลักๆที่เปลี่ยนแล้ว จะมีผลกับ memory SGA</h4><ul><li><strong>SGA_MAX_SIZE </strong>ใช้กำหนด limit memory ในส่วนของ SGA ถ้าค่าของ SGA_MAX_SIZE ใน parameter file น้อยกว่าผลรวมของ memory ที่มีอยู่จริง เมื่อ start instance ตัว database จะไม่สนใจค่า SGA_MAX_SIZE เพื่อให้สามารถใช้ memory ที่มีอยู่ให้ดีที่สุด</li><li><strong>DB_CACHE_SIZE </strong>ใช้กำหนดขนาด database buffer cache ซึ่งแต่ละ OS จะมีค่าขนาด default ไม่เหมือนกัน<br>ถ้า LINUX/UNIX ค่า default จะเป็น 48 MB<br>ถ้า Windows ค่า default จะเป็น 52 MB</li><li><strong>LOG_BUFFER </strong>ใช้กำหนดขนาดการจองพื้นที่ของ Redo log buffer</li><li><strong>SHARED_POOL_SIZE </strong>ใช้กำหนดขนาดการจองพื้นที่ของ Shared SQL และ PL/SQL โดย default จะเป็นค่า 16 MB<br>ถ้า OS เป็นแบบ 64 bit โดย default จะเป็นค่า 64 MB</li><li><strong>LARGE_POOL_SIZE </strong>ใช้กำหนดขนาดการจองพื้นที่ของ Large pool ถ้าในไฟล์ init.ora ตัว parameter <strong>PARALLEL_AUTOMATIC_TUNING = TRUE</strong> โดย default ตัว database จะคำนวณให้เองโดย auto</li><li><strong>JAVA_POOL_SIZE </strong>ใช้กำหนดขนาดการจองพื้นที่ของ Java pool</li></ul><p>ขนาดของ SGA (System Global Area) ไม่สามารถเกินค่าพารามิเตอร์ SGA_MAX_SIZE ลบด้วยผลรวมของขนาดพารามิเตอร์เพิ่มเติม ได้แก่ DB_CACHE_SIZE, LOG_BUFFER, SHARED_POOL_SIZE, LARGE_POOL_SIZE, และ JAVA_POOL_SIZE</p><p>Memory ที่จองใน SGA ในแต่ละส่วน จะเรียกกันเป็นหน่วยว่า Granule ซึ่งขนาดของ Granule จะขึ้นอยู่กับขนาดรวมของ SGA<br>- ถ้า SGA มีขนาดรวมต่ำกว่า 1 GB แต่ละ granule จะมีขนาด 4 MB<br>- ถ้า SGA มีขนาดรวมมากกว่า 1 GB แต่ละ granule จะมีขนาด 16 MB</p><h3>Program Global Area (PGA) คืออะไร?</h3><p>คือ memory ที่เป็นแบบ Nonshared เอาไว้ใช้สำหรับ Oracle process ซึ่ง PGA เกิดขึ้นเมื่อ Oracle process start<br>1 PGA จะมีอยู่ในแต่ละ 1 Server process และแต่ละ background process จะเก็บ data และ control ข้อมูลสำหรับ 1 Server process หรือ 1 Background process</p><p>PGA จะจองพื้นที่เมื่อ process ถูก create และ memory ถูกจองโดย OS <br>เมื่อ process ถูก terminate พื้นที่ที่ allocate ไว้ก็จะคืนให้กับ OS</p><p>ภายใน PGA จะประกอบไปด้วย Session Memory, SQL Work area และ Private SQL Area</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/0*Di4yGMxmKb82VzaT.jpg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/0*u8OvSjQEDdQHBpr-.jpg" /></figure><ul><li>Session memory เก็บข้อมูล session นั่นๆ</li><li>SQL Work Area allocate ตอนที่มีการ sort ข้อมูล เช่น ORDER BY / Bitmap merge</li><li>Private SQL Area เก็บข้อมูลตอนที่ Compile คำสั่ง SQL</li></ul><p>ถ้า Server เป็นแบบ Dedicated ตัว Private SQL Area จะเก็บใน PGA<br>ถ้า Server เป็นแบบ Shared ตัว Private SQL Area จะเก็บใน SGA</p><blockquote>ตั้งแต่ Oracle 9i เป็นต้นไปและใหม่กว่านั้น Size ของ SQL Work Area <br>สามารถ set parameter ได้ที่ WORKAREA_SIZE_POLICY = AUTO และ<br>PGA_AGGREGATE_TARGET = n (n คือตัวเลขที่จะตั้ง หน่วยเป็น byte)</blockquote><h3>Automatic Shared Memory Management</h3><p>DBA สามารถกำหนดขนาดของ Memory ในส่วนของ SGA ได้ในแต่ละ component โดยแก้ค่า Parameter ได้ เช่น SHARED_POOL_SIZE, DB_CACHE_SIZE, JAVA_POOL_SIZE, และ LARGE_POOL_SIZE และสามารถตั้งค่าขนาดโดยรวมของ SGA เองได้ โดยกำหนดที่ Parameter SGA_TARGET</p><p>การกำหนดค่า Parameter SGA_TARGET จะมีผลกระทบในส่วนต่างๆ ของ Memory ตามนี้</p><ul><li>Fixed SGA</li><li>Log buffer</li><li>Shared pool</li><li>Java pool</li><li>Buffer cache</li><li>Stream pool</li></ul><p>ถ้า Parameter SGA_TARGET ถูก set ไว้มากกว่า SGA_MAX_SIZE ตัว database จะอ่านค่า SGA_MAX_SIZE เป็นค่าเดียวกันกับ SGA_TARGET</p><p>เมื่อ setup ค่า Parameter SGA_TARGET ใน Oracle database version 11g จะมีผลกระทบกับ memory ในส่วนของ</p><ul><li>Shared pool (พื้นที่สำหรับ SQL และ PL/SQL execution)</li><li>Java pool (พื้นที่สำหรับ Java execution state)</li><li>Large pool (พื้นที่สำหรับ memory ที่ใช้พื้นที่เยอะๆ เช่น RMAN backup buffer)</li><li>Buffer cache (พื้นที่สำหรับ memory ที่เก็บผล copy ของ data block จากการถูก select ข้อมูลใน data file)</li></ul><p>สามารถดูว่า Oracle database มีการจองพื้นที่ใน memory แต่ละส่วนไปเท่าไหร่ โดย select ที่ V$SGAINFO หรือ V$SGA_DYNAMIC_COMPONENTS</p><h4>Shared pool คืออะไร?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*v7Q212OVHhvjV8JL.jpg" /></figure><p>เป็น memory ที่เป็นส่วนกลางสำหรับหลายๆ user เก็บ cache คำสั่ง SQL ที่ผ่านการ compile มาแล้ว เวลา user run คำสั่ง SQL ตัว Oracle database จะ access มาที่ Shared pool</p><p>สามารถเปลี่ยนแปลงขนาดของ Shared pool ได้โดย setup ที่ Parameter SHARED_POOL_SIZE โดย default ถ้าเป็นแบบ 32-bit ค่า default จะเป็น 8 MB <br>ถ้าเป็นแบบ 64-bit ค่า default จะเป็น 64 MB</p><h4>Library cache คืออะไร?</h4><p>คือ memory ที่จะถูก allocate เมื่อคำสั่ง SQL มีการ compile มาแล้ว ซึ่งจะเก็บคำสั่ง SQL หรือ PL/SQL มีการเรียกใช้งานบ่อย</p><p>ถ้าขนาดของ Library cache เล็กเกิน ภายใน Library cache จะมีการ purge คำสั่ง SQL ที่เก็บไว้ออก เพื่อให้มีพื้นที่รองรับคำสั่งต่อๆไป โดยจะเลือก purge คำสั่ง SQL ที่เก่าสุดที่เก็บไว้ออก</p><p>ภายใน Library cache จะมี 2 ส่วนย่อยอีก คือ Shared SQL Area และ Private SQL Area</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/666/0*LeBFnzfdnGr6XGie.gif" /></figure><h4>Data Dictionary cache คืออะไร?</h4><p>คือ memory ที่เก็บ cache ข้อมูล data dictionary เช่น ผลจากการ select v$database</p><h4>Server Result cache คืออะไร?</h4><p>คือ memory ที่เก็บผลลัพธ์จากการ run คำสั่ง SQL หรือ PL/SQL ที่เคยทำไปแล้ว</p><h4>Buffer cache คืออะไร?</h4><p>คือ Memory ที่เก็บผล copy ของ data block ที่ถูกอ่านข้อมูลใน data file</p><h4>Redo log buffer คืออะไร?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/0*dwYNymmUG78LQssA.jpg" /></figure><p>คือ Memory ที่เก็บ image ของการเปลี่ยนแปลงที่เกิดขึ้นกับ database block</p><p>ยกตัวอย่างเช่น ภายใน table จะประกอบไปด้วย row แล้ว column<br>ถ้า table นั้นมีการเลี่ยนแปลงของ column ตัว block image นั้นจะถูกเก็บไว้ใน memory<br>ยกตัวอย่างคำสั่งเช่น INSERT, UPDATE, DELETE, CREATE, ALTER, หรือ DROP</p><p>Process LGWR จะเขียน redo ตามลำดับลงบน disk ในขณะที่ Process DBWn จะเขียน data block ลงลบ disk ซึ่ง image ของการเปลี่ยนแปลงที่เกิดขึ้นกับ database block จะถูกเก็บใน Redo log file</p><h4>Large pool คืออะไร?</h4><p>คือ Memory ที่ใช้สำหรับการจัดการ memory ขนานใหญ่สำหรับการทำงานเฉพาะ เช่น RMAN process</p><h4>Java pool คืออะไร?</h4><p>คือ Memory ที่ใช้ในส่วน Oracle JVM ซึ่งสามารถกำหนดขนาดได้ โดย setup ที่ Parameter JAVA_POOL_SIZE</p><h4>Stream pool คืออะไร?</h4><p>คือ Memory ที่เก็บข้อมูลและ control การส่งข้อมูลระหว่าง database</p><h3>Process</h3><p>Process มีทั้งหมด 3 ประเภท</p><ol><li>User process → เกิดขึ้นเมื่อ database user request เพื่อ connect ไปที่ Oracle server</li><li>Server process → เกิดขึ้นเมื่อมี User process connect ไปที่ Oracle instance</li><li>Background process → เกิดขึ้นเมื่อ start Oracle instance</li></ol><h3>Client process</h3><p>Client process คือ process ที่เกิดขึ้นเมื่อ user ต้องการเข้าถึง database</p><p>ยกตัวอย่าง<br>เมื่อ run คำสั่ง SQL Plus หรือ SQL developer โปรแกรมไรงี้ ตัว OS จะสร้าง Client process กับโปรแกรมนั้นๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/0*2uVWgeLoysugqbeh.jpg" /></figure><h3>Server process</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*mcP3rbiCaLXCkVOJ.jpg" /></figure><p>Server process คือ process ที่เกินขึ้นใน Oracle database เมื่อมี request จาก Client process เพื่อ connect เข้ามาที่ database</p><p>ยกตัวอย่าง<br>เมื่อ user เปิดโปรแกรมที่ connect กับ database เช่น SQL Plus หรือ SQL developer ตัว OS จะสร้าง client process และ server process เพื่อทำงานร่วมกัน</p><h3>Background process</h3><p>Background process คือ process ที่เกิดขึ้นเมื่อ start Oracle instance ซึ่งจะมีหลายๆ process</p><h4>PMON (Process monitor)</h4><p>คือ process ที่มีหน้าที่ตรวจสอบ หรือ monitor ปัญหาที่เกิดขึ้นจาก process อื่นๆ และมีหน้าที่ clear buffer cache และคืน resource เมื่อเจอว่ามี process ใด process นึง failed เช่นคืนพื้นที่ memory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/507/0*9-TOPz3T1QIbGhI_.gif" /></figure><h4>SMON (System monitor)</h4><p>คือ process ที่มีหน้าที่ restore database และจัดการพื้นที่ใน database และทำความสะอาด clear temp segment ที่ไม่ได้ใช้งานแล้ว</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/0*o5lnsSB5G8Tk3EtT.gif" /></figure><p>ถ้าอยู่ดีๆ Oracle instance เกิด failed ขึ้นมา ข้อมูลที่อยู่ใน memory ไม่ได้ถูกเขียนไว้ใน disk SMON จะทำหน้าที่ recovery instance เมื่อ database startup ขึ้นมาอีกที โดยมี step ตามนี้<br>- เมื่อเกิด system failed ข้อมูลบางส่วนที่ถูกบันทึกใน redo log file อาจจะยังไม่ได้ถูกเขียนใน data file โดย Process DBWn<br>- SMON จะทำการอ่าน redo log file แล้วนำไปใช้กับ data block ใน data file จากนั้นจะ recovery ข้อมูลได้เฉพาะกับ transaction ที่ commit แล้ว เท่านั้น เพราะว่า transaction นั้นถูก record ไว้ใน redo log file แล้ว ก่อนที่จะ system failed<br>- หลังจากที่ SMON recovery เสร็จ database จะเปิดให้ใช้งานตามปกติ<br>- transaction ที่ยังไม่ commit จะถูก rollback กลับมา</p><h4>Database Writer (DBWn)</h4><p>คือ process ที่ทำหน้าที่เขียนข้อมูลที่ถูกแก้ไขจาก buffer cache ลงใน data file และจัดการ checkpoint process</p><p>เป้าหมายหลักๆของ DBWn คือทำให้ system performance ดีขึ้นโดยเขียน cache จาก buffer cache ไปที่ data file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/546/0*qFEDJJdQVSSDu91X.gif" /></figure><p>DBWn เกิดขึ้นเมื่อ Tablespace offline / Table DROP หรือ TRUNCATE / Tablespace BEGIN BACKUP</p><h4>Checkpoint (CKPT)</h4><p>คือ process ที่ทำหน้าที่บันทึกสถานะของข้อมูลและ update control file</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/536/0*CMyWI2BEhGCHJ7gR.gif" /></figure><p>จบแล้วในส่วนของ Background process แต่ละตัว</p><p>เป็นยังไงบ้างครับทุกคนที่ได้อ่าน อาจจะมึนๆงงๆหน่อย เนื่องจากเราไม่เคยได้ยินหรือรู้เรื่องราวพวกนี้มาก่อน อย่าเพิ่งตกใจกันไป เพราะตัวผมเองนั้นโดนเริ่มแรก ก็รู้สึกแบบเดียวกัน ต้องใช้เวลาทำความเข้าใจสักหน่อยเนอะ แล้วเดี๋ยวจะเข้าใจในเนื้อหามากขึ้นเอง</p><p>สุดท้ายนี้หวังว่าทุกคนที่ได้อ่านบทความนี้จะได้ความรู้เพิ่มไปไม่มากก็น้อย โชคดีที่ได้อ่านบทความนี้คับ 💖</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=211dd4f14054" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Oracle database ติดตั้งยังไง? | Oracle Database EP.2]]></title>
            <link>https://medium.com/@voraguns/how-to-install-oracle-database-on-linux-oracle-database-%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%A2%E0%B8%B1%E0%B8%87%E0%B9%84%E0%B8%87-oracle-database-ep-2-09f77fe5f6b8?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/09f77fe5f6b8</guid>
            <category><![CDATA[oracle-database]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[information-technology]]></category>
            <category><![CDATA[database-administration]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Fri, 16 Aug 2024 07:55:16 GMT</pubDate>
            <atom:updated>2024-08-16T08:13:08.420Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zrmqqtSu9i_leKWL.jpg" /></figure><p><a href="https://medium.com/@voraguns/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-database-administrator-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-oracle-database-ep-1-781bedcd5794">มาเป็น Database Administrator กันเถอะ | Oracle Database EP.1</a></p><p>มี database ของตัวเองแล้วรึยังงง ติดตั้ง database เป็นแล้วรึยังเอ่ยยยย สร้าง database เป็นแล้วรึยางงง</p><p>มาแล้วกับบทความที่ทุกคนนั้นลอยคอ เอ้ยยย รอคอ เอ้ยยยย รอค่อย เอ้ยย ถูกแล้ว 😂</p><p>บทความนี้จะเริ่มสอนวิธีการ install และ create database กันแล้ว แต่ก่อนอื่นต้องรู้จักก่อนว่า DBMS คืออะไร</p><p><strong>Database Management System (DBMS)<br></strong>คือโปรแกรม หรือ software ที่ใช้ควบคุม storage และเรียกใช้ข้อมูล ซึ่ง DBMS ประกอบได้ด้วย<br>- Kernel code เป็นส่วนที่จัดการ memory และ storage สำหรับ DBMS<br>- Repository ของ database (Repository มักถูกเรียกเป็นคำว่า data dictionary)<br>- ภาษา Query เป็นภาษาที่เอาไว้เรียกใช้งาน access ข้อมูล</p><p><strong>Relational Database<br></strong>ถูกสร้างขึ้นในปี 1970 โดย Edgar F. Codd ซึ่งตอนนั้นทำงานให้บริษัท IBM ในชณะนั้นยังเป็นเพียงการตีพิมพ์บทความเพื่อนำเสนอวิธีการใช้งาน Relational database ทำให้เป็นจุดเปลี่ยนสำคัญที่ทำให้คนสนใจ จนในปี 1983 IBM ได้เปิดตัว Relation database ในตระกูล DB2 อย่างเป็นทางการ<br>กล่าวคือเป็น database ที่มีความสัมพันธ์ที่มีการเก็บข้อมูลในรูปแบบของตาราง (table) เหมือนกับเป็นแฟ้มข้อมูล โดยในแต่ละตารางจะเก็บข้อมูลไว้เป็นแถว (Row) และแต่ละแถวจะประกอบไปด้วยคอลัมน์ (Column) มี primary key และ foreign key ตัวอย่างเช่น Microsoft SQL, Oracle Database, IBM DB2</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/211/0*f7nUeEwfA1g0LUnl.jpg" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FEdgar_F._Codd&amp;psig=AOvVaw0H_2v8dUzH9INClmnaVkwy&amp;ust=1721362769405000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBQQjhxqFwoTCPDf3ZXer4cDFQAAAAAdAAAAABAE">Edgar F. Codd — Wikipedia</a></figcaption></figure><p><strong>Non-relational Database<br></strong>เป็นคำที่ถูกคิดค้นขึ้นมาในช่วงกลางทศวรรษ 1990 เนื่องจากในยุคนั้นเพิ่งมีการใช้งาน internet ที่หลากหลายขึ้น ทำให้การใช้งาน Relational database เริ่มไม่ตอบโจทย์ ทำให้มีการตคิดค้น Non-relational หรือที่เรียกว่า NoSQL ขึ้นมา เพื่อให้สามารถแปลข้อมูลที่มีความหลากหลายมากขึ้น รวมไปถึงหลีกเลี่ยงความวุ่นวายของการใช้งาน Relation database ซึ่งยังมีการเพิ่มความยืดหยุ่นที่มากขึ้น</p><p>ตัวย่อ NoSQL ถุกใช้งานครั้งแรกในปี 1998 โดย Carlo Strozzi ซึ่งแพร่หลายมากขึ้นในปี 2015 เนื่องจากในปีเดียวกัน มีการทำ Big Data มากขึ้น องค์กรชั้นนำต่างๆในขณะนั้นเช่น Facebook, Twitter, LinkedIn และ Google เริ่มมีการปรับใช้ NoSQL เพราะว่าตอบโจทย์ในเรื่องความเร็ว ความยืดหยุ่นและเหมาะกับองค์กรขนาดใหญ่ที่ต้องการประมวลผลข้อมูลพวกรูปภาพ วีดีโอ เสียงจำนวนมาก</p><p>กล่าวคือเป็น database ทั่วไป ที่ไม้่ใช่ Relation database แต่เป็น Unstructure ของ Database แบบ SQL ไม่ได้อยู่ในรปแบบของตาราง หรือมีความเชื่อมโยมกันโดยตรง เช่นข้อมูลที่เป็นรูปภาพ วีดีโอ หรือเสียง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*UXzOAVifUS8YEX_d" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fwww.linkedin.com%2Fpub%2Fdir%2FCarlo%2FStrozzi&amp;psig=AOvVaw0XnWuZ4cfM5Wb3oXdPDwrG&amp;ust=1721373830876000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBQQjhxqFwoTCJjLy7WHsIcDFQAAAAAdAAAAABAE">“Carlo Strozzi” profiles | LinkedIn</a></figcaption></figure><h3>Let’s prepare the coolest practice lab for DBAs!!!!</h3><p>สำหรับระบบปฎิบัติการณ์ที่เราจะใช้กันคือ Oracle Linux version 8.9 และซอฟแวร์ที่จะใช้ติดตั้ง database คือ Oracle Database 19c (19.3) for Linux x86–64<br>ให้ทุกคนโปรแกรมตามนี้ครับ</p><ol><li>Oracle Virtual Box <a href="https://www.oracle.com/virtualization/technologies/vm/downloads/virtualbox-downloads.html">Click here</a></li><li>Oracle Linux version 8.9 <a href="https://yum.oracle.com/ISOS/OracleLinux/OL8/u9/x86_64/OracleLinux-R8-U9-x86_64-dvd.iso">Click here</a></li><li>Oracle Database 19c (19.3) for Linux x86–64 <a href="https://www.oracle.com/th/database/technologies/oracle19c-linux-downloads.html#license-lightbox">Click here</a></li></ol><p>🚨<strong>Fact:</strong> Operating System ที่จะใช้สำหรับติดตั้งแต่ละ Oracle Database version นั้นจะมีวิธีการติดตั้งที่ไม่เหมือนกัน หรือแตกต่างกันไป กรุณาอ่าน Guide ควบคู่กันไปด้วยครับ</p><blockquote>*สำหรับคนที่ใช้คอมพิวเตอร์ระบบปฎิบัติการณ์ MacOS ก็สามารถทำตามบทความนี้ได้นะครับ*</blockquote><p>หลังจากที่ติดตั้งโปรแกรม Oracle Virtual box เสร็จแล้วและ download software ทั้งหมดแล้ว ให้รวบรวมเอาไว้ใน folder เดียวกัน</p><h3>🚩Goal</h3><p>1️⃣ Create Virtual machine with Operating system Oracle Linux version 8.9 with 2 CPUs RAM 4 GB and Storage 50 GB<br>2️⃣ Installing Oracle database 19c software<br>3️⃣ Creating database</p><h3><strong>Create Virtual Machine</strong></h3><p>เปิดโปรแกรม Oracle Virtual Box ขึ้นมา บางคนจะเป็นภาษาไทย ให้ไปที่ tab “ไฟล์” -&gt; “ตั้งค่าความพึงพอใจ…” -&gt; “ภาษา” -&gt; เลือกเป็น “English” -&gt; กด “ตกลง”</p><p>จากนั้นปิดโปรแกรมแล้วเปิดใหม่</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f0Jta6WdwUsgWZ182LPnBQ.png" /></figure><p>คลิ้กปุ่ม “New” และตั้งค่าตามนี้ จากนั้นกด “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*yz9lEYwdEtb_jtEl_HgkbA.png" /><figcaption>Name of Virtual Machine and Operating System</figcaption></figure><p>สำหรับ Base Memory (RAM) จะ set ที่ 4 GB (1024*4 = 4096) และใช้ 2 CPUs จากนั้นกด “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*NuRe7r2DR7na34_4NhIbPw.png" /></figure><p>สำหรับขนาด Hard disk กำหนดให้ 50 GB จากนั้นกด “Next”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*Z9zQsHYEYOu0Z-BbR_UTag.png" /></figure><p>ตรวจสอบความถูกต้องให้เรียบร้อย จากนั้นกด “Finish”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/707/1*wJVlrjksB2KDFnP5DYQEwQ.png" /></figure><p>เท่านี้เป็นอันเสร็จสิ้น</p><h3>🚩Checkpoint</h3><p>✅ Create Virtual machine with Operating system Oracle Linux version 8.9 with 2 CPUs RAM 4 GB and Storage 50 GB<br>2️⃣ Installing Oracle database 19c software version Single instance database</p><h3>Installing Oracle database 19c software</h3><p>หลังจากที่สร้าง Virtual machine เสร็จแล้ว จะได้หน้าตาแบบนี้ ให้เลือกเครื่องที่เราสร้าง จากนั้นคลิ้กที่ปุ่ม Start สีเขียว ➡️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HxX_EN-D7QGjdfLygH_VLQ.png" /></figure><p>หน้า Pop-up คลิ้กที่ drop-down menu แล้วเลือกไฟล์ .iso ที่เราโหลดมาเก็บไว้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*8hRJSvbxFDozfY4k9R-OSA.png" /><figcaption>Click on “Other…”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/886/1*z9hYDSQYuSTDyqDIzsfA6A.png" /><figcaption>Select file “OracleLinux-R8-U9-x86_64-dvd.iso”</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*IE7R31OsO9eO9wag4wxEbQ.png" /><figcaption>Click on “Mount and Retry Boot”</figcaption></figure><p>Click ที่หน้าจอหนึ่งที จะขึ้น Pop-up ให้เลือก “Capture”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*i-I81xfkEyKmUfPWT0Xm8Q.png" /><figcaption>Click on “Capture”</figcaption></figure><blockquote>Note: เวลาจะออกมาเลือกของนอกหหน้าจอ Virtual machine ให้กดปุ่ม Ctrl ขวา หนึ่งที จะได้ mouse กลับมาเลือกข้างนอก</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/639/1*VjLnKPy8n0CCbLcYaiGuig.png" /><figcaption>Select “Install Oracle Linux 8.9.0” and then enter</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kuh8WOXcwsJCvZjX-eBXtQ.png" /><figcaption>รอ</figcaption></figure><p>เลือกภาษา “English” จากนั้นกด “Continue”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K6qNg_PZ5gy57ZRxL41n-w.png" /></figure><p>ไปที่ Section “Localization” -&gt; “Time &amp; Date”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ig8col2Ir3sVleKasaUdpg.png" /></figure><p>Region: &lt;เลือก Asia&gt; City: &lt;เลือก Bangkok&gt; จากนั้นกด “Done”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i9ZMOMT3BnPt9lXPiTzPKQ.png" /></figure><p>ไปที่ Section “System” -&gt; “Installation Destination” -&gt; เลือก Disk ให้เป็นตามรูปแล้วกด Done</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vp1KfSIWVbt6IewpBOVrNw.png" /></figure><p>ไปที่ Section “User Settings” -&gt; “Root Password” -&gt; ตั้งเป็น oracle -&gt; กด Done</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZpITx6Lshr8eoTLV9sRSJw.png" /></figure><p>ไปที่ Section “User Settings” -&gt; “User Creation” -&gt;Full name และ Password ตั้งเป็น oracle -&gt; กด Done</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gEwWivRtLXkgpZ71Tn4SXQ.png" /></figure><p>จะได้หน้าสรุปตามรูปนี้ จากนั้นคลิ้กปุ่มสีฟ้า “Begin Installation” แล้วรอ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Psx9NLNdWULbhgByNgvYXw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Sil1s_jt8Q3jN4r_EbIq9w.png" /></figure><p>หลังจากขึ้น Complete ให้คลิ้ก “Reboot System”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9foH1sjDIcwvqWmwj6WAlQ.png" /></figure><p>กดไปที่ License Information</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*91fF2Ao-KMsotEJLhvB0lQ.png" /></figure><p>กดติ้กถูก “I accept the license agreement.” แล้ว “Done”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*QTT1RLZop2aXoAI27YHNrw.png" /></figure><p>กด “Finish Configuration”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*_Djw6b6lJevTxGGrIMzI0Q.png" /></figure><p>จากนั้นก็รอ แล้วจะขึ้นหน้าแบบนี้ เป็นอันใช้งานใช้การได้แล้วครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*jI5u80JqvQjYOpnpRsc3NQ.png" /></figure><p>กดเข้าไปที่ user oracle แล้วใส่ password -&gt; oracle จากนั้น enter แล้วจะขึ้นหน้าจอแบบนี้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*frYoq-IqovADsn-lVBsLXw.png" /><figcaption>Welcome to desktop</figcaption></figure><h4>เข้าสู่ Step 2️⃣ Installing Oracle database 19c software</h4><p>ก่อนที่จะเริ่มการ install Oracle database 19c software เราต้อง mount folder จากคอมพิวเตอร์เรา (Local machine) เข้ากับ Virtual machine ที่เราสร้างขึ้น</p><h3>2️⃣.1️⃣ How to mount folder from local machine to virtual machine?</h3><p>ไปที่ tab “Devices” -&gt; Shared Folders -&gt; Shared Folders Settings…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ktHxoqrpgtUekl7AMQXgbA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/623/1*U4hjlTfG7F0nM_n_NAH3Hw.png" /></figure><p>กดไปที่รูป icon “folder+”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/294/1*X8g8XtyVhdMdTx5WXCaSHw.png" /></figure><p>ไปที่ Folder Path section จากนั้น click on dropdown list -&gt; Other…</p><p>จากนั้นเลือก folder ที่โหลดตัว oracle database 19c software ไว้ อย่างของผู้เขียนบทความ เก็บไว้ที่ C:/Users/xxxxxxx/Documents/Lab-oracle</p><p>สำหรับ Mount point section ให้ใส่ /software แล้วติ้กถูก checkbox ตามนี้ จากนั้น click on “OK”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*SHEw_ZLyA_N7lVSZk6HaBQ.png" /></figure><p>click on “OK” อีกรอบ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*GuzlDK6Kk09NSZ1Q97XpYA.png" /><figcaption>Summary of Shared Folders</figcaption></figure><p>กดที่ “Activities” บนหัวมุมซ้ายสุด จากนั้นกดเปิด Terminal</p><p>พิมพ์ command เข้าไปที่ Path “/” จากนั้น list ออกมาทั้งหมด</p><pre>cd /     -----&gt; Go to directory &quot;/&quot;<br>ll       -----&gt; list all items in directory</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*y0pV-PQtglKbAsb0cI-I3Q.png" /></figure><p>จะเห็นได้ว่ายังไม่มี /software มา</p><p>ไปที่ tab Devices -&gt; Insert Guest Additions CD images…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5d-LQMqbod3wSnyYwKpIuw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*a1TUmvwODG3wjYaNKojU3Q.png" /></figure><p>กด Run</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KwZBg6PiZsb8aUztudVWQA.png" /></figure><p>ใส่ Password -&gt; oracle แล้ว enter จากนั้นรอ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/817/1*XMaQiuhrbGqeoeAyg1WTNA.png" /></figure><p>กดปิดหน้า “VirtualBox Guest Additions installation”</p><p>จากนั้น list ทั้งหมดออกมาอีกรอบ</p><pre>ll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*3oZEUkyu8g0bnrYFEHEl_A.png" /></figure><p>จะเห็นได้ว่ามี folder “software” มาแล้ว ให้ลองเข้าไป</p><pre>cd software</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/859/1*dxUeffEJ7Tihg6rmicd0cg.png" /></figure><p>จะเห็นได้ว่าเข้าไม่ได้ เพราะสิทธิ์ไม่ถึง</p><p>อธิบายความหมายแต่ละตัว เป็นอย่างนี้คับ</p><pre>drwxrwx---.   1 root vboxsf     0 Jul 10 13:40 software<br>     &#39;            &#39;     &#39;<br>     &#39;            &#39;     &#39;----&gt; group<br>     &#39;            &#39;----------&gt; user<br>     V<br> Permission<br>     </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/660/0*jysTLBBIEb0fT-6L.png" /><figcaption>Credit: <a href="https://medium.com/@techbytebykiru/understanding-linux-file-permissions-a-comprehensive-guide-b5f3df1b0c5a">Understanding Linux File Permissions: A Comprehensive Guide</a></figcaption></figure><p>ใช้คำสั่งเปลี่ยน user เป็น root ใส่ password -&gt; oracle จากนั้น enter แล้วเข้า path “/software” จากนั้น list ออกมาทั้งหมด</p><pre>su - root          -----&gt; change user to root<br>cd /software       -----&gt; Go to directory &quot;/software&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*cMDWYAlEqoikb0pizZJ-HQ.png" /></figure><p>✅How to mount folder from local machine to virtual machine?</p><p>เริ่มกันเลยครับ ไปที่เว็บ <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/server-hardware-checklist-for-oracle-database-installation.html#GUID-D311E770-9444-45D0-A122-6491D1B66B8A">Server Hardware Checklist for Oracle Database Installation</a></p><h3>Server Hardware Checklist for Oracle Database Installation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yw10Gd_3fQ1NPA31hwEhsA.png" /></figure><p>Runlevel: 3 or 5 อันนี้หมายถึง state หรือ mode ของ Linux <br>3 หมายถึง without GUI ไม่มีหน้าตา มีแต่ terminal<br>5 หมายถึง มีหน้า GUI<br>ดังนั้น requirement นี้เราผ่านครับ เพราะมี GUI</p><p>Server Display Cards: อันนี้ตั้งค่าหน้าจอ จะเท่าไหร่ก็ได้ ของผมตั้งไว้ที่ 1024 x 768 (4:3) ดังนั้นผ่านคับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8URLIA3UmHP6n4CCzMu-qA.png" /></figure><p>Minimum network connectivity: อันนี้ต่อ Wi-Fi อยู่ ดังนั้นผ่านคับ<br>Minimum RAM: RAM เราสร้างไว้ 4GB (4096 MB) ดังนั้น Minimum RAM ผ่านคับ</p><h3>Operating System Checklist for Oracle Database Installation on Linux</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CifcfxGBiTS7thKe28qdRA.png" /></figure><p>หัวข้อนี้เขาบอก requirement สำหรับแต่ละ Operation system ว่า Oracle database 19c รองรับ OS อะไรบ้าง อย่างของเราคือ Linux version 8.9</p><pre>cat /etc/oracle-release    ----&gt; check Operation system</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*_MFu_Rr3fbO114V5xWdXmQ.png" /></figure><h3>Server Configuration Checklist for Oracle Database Installation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zx9lcPVTIylWmOw2BWUmdA.png" /></figure><p>Disk space allocated to the /tmp directory: ของเรามี 46GB</p><pre>df -h /tmp    ---&gt; check disk space for &quot;/tmp&quot; directory</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/1*s7mjlx4fb-l0mfGtO-t_qQ.png" /></figure><p>Swap space allocation relative to RAM (Oracle Database): ของเรามี 3.9GB<br>และ Memory มี 3.5GB</p><pre>grep SwapTotal /proc/meminfo  ----&gt; check swap space<br><br>grep MemTotal /proc/meminfo   ----&gt; check memory space</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*02U0E_6-m7lsBX7SC5Deng.png" /></figure><p>Check the amount of free RAM and disk swap space and system architecture</p><pre>free        --------&gt; check free RAM and disk space<br>uname -a    --------&gt; check system architecture</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gW3nPQ7rVOQuf_hsDEf0Tw.png" /></figure><p>เปลี่ยน user เป็น root โดยใส่ password oracle จากนั้นสร้าง Group and user และ list group</p><pre>Group and users<br>   &#39;<br>   &#39;------ cat /etc/group<br><br>      &lt;if it don&#39;t have group &quot;oinstall, dba&quot;. it need to add group &gt;<br>                                &#39;<br>        &#39;---------- groupadd -g 1001 oinstall<br>        &#39;<br>        &#39;---------- groupadd -g 1002 dba<br>        &#39;<br>        &#39;---------- cat /etc/group<br>        <br>[*] check owner and user<br>     &#39;<br>     &#39;---------------------- grep &quot;oinstall&quot; /etc/group<br>     &#39;<br>     &#39;---------------------- grep &quot;dba&quot; /etc/group<br>     &#39;<br>     &#39;---------------------- id oracle<br>                                &#39;<br>                                &#39;----- Expected result<br>                                &#39;<br>                                &#39;--------- uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba), <br>                                           54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54327(asmdba),54330(racdba)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-AGbesWiOnsX5_ofGRj96A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YrM5ttfsyrmKnC5a0-rVSg.png" /></figure><p>Add user “oracle” to group “oinstall” and “dba” จากนั้นเปลี่ยน user เป็น oracle และ list id ออกมา</p><pre>usermod -a -G oinstall,dba oracle<br>su oracle<br>id</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0681Y3p6HktO5aWFyRbySw.png" /></figure><p>Create folder with “root” user</p><p>/u01/app/oracle/product/19.3.0/db_home1</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JJCuVqGpxEugY7zllNFAqw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aw7GuwV_KDCqhp1VcanJBg.png" /></figure><p>Set environment ใน .bash_profile โดยให้มีตามนี้</p><pre>Variable name            Value<br>=============            =========================================<br>ORACLE_HOME              /u01/app/oracle/product/19.3.0/db_home1<br>ORACLE_BASE              /u01/app<br>ORACLE_SID               test<br>PATH                     $ORACLE_HOME/bin:$PATH</pre><pre>vi .bash_profile<br>กด i จากนั้นเพิ่มบรรทัดสุดท้ายตามนี้<br>export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_home1<br>export ORACLE_BASE=/u01/app<br>export ORACLE_SID=test<br>export PATH=$ORACLE_HOME/bin:$PATH<br>กด esc แล้ว :wq! จากนั้น enter<br>cd<br>. .bash_profile<br>cat .bash_profile</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QI4EN5dLp4QdMXsejPmc2Q.png" /></figure><p>ทดลอง echo แต่ละตัวแปร</p><pre>echo $ORACLE_HOME<br>echo $ORACLE_BASE<br>echo $ORACLE_SID<br>echo $PATH</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KbTYQvzl9PNkcqyjxKublg.png" /></figure><p>Go to “/software” directory and then unzip file “LINUX.X64_193000_db_home.zip” to directory “/u01/app/oracle/product/19.3.0/db_home1” or $ORACLE_HOME</p><pre>cd /software <br>ll <br>unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME</pre><p>Go to “/u01/app/oracle/product/19.3.0/db_home1” or $ORACLE_HOME directory and change owner of “/u01/app/oracle/product/19.3.0/db_home1” directory to user “oracle” and group “oinstall”</p><pre>cd $ORACLE_HOME<br>ll<br>chown -R oracle:oinstall /u01<br>ll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k5UWOdyF6fV7AdrB6s_Z7w.png" /></figure><p>Run oracle database software installer</p><pre>./runInstaller</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qpDJMJTMyP4jy6ypfZn1eg.png" /></figure><p>จากนี้ไปจะเป็นการอธิบายวิธีแก้ error เป็นภาษาอังกฤษนะคับ</p><p>We must fix it. So, the solution is creating local repository and run it. And then try to run Oracle database 19c installation software again.</p><p><a href="https://support.oracle.com/knowledge/Oracle%20Linux%20and%20Virtualization/2749262_1.html">Oracle Linux: How to Setup a Local Repository Using an Oracle Linux 8 ISO Image ?</a></p><p>Step 1: Go to “/mnt” directory and create “cdrom” folder and run this command</p><pre>cd /mnt<br>mkdir cdrom<br>mount /dev/sr0 /mnt/cdrom</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*RgY9cpozsatgMV784mPSGw.png" /></figure><p>Go back to outside and select tab “Devices” -&gt; Optical Drives -&gt; Choose a disk file… -&gt; choose “OracleLinux-R8-U9-x86_64-dvd.iso”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*6AGcQIL-ckr1bk8P6cpVoA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/853/1*OtAxSJJU8Pkz9uxjA8v-DQ.png" /></figure><p>Make sure that oprtical drives “OracleLinux-R8-U9-x86_64-dvd.iso” have inserted already.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*IKxU3cBRJZ9WIFZ87rCWfA.png" /></figure><p>After insert a disk, it will have some pop-up in your virtual machine windows. I haven’t capture. 😭</p><p>Enter to “/mnt/cdrom” directory and run this command</p><pre>cd /mnt/cdrom<br>mount | grep cdrom<br>ll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*SEWDriY2X5-cdB6ffEid7A.png" /></figure><p>From the Oracle support website</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wezLe6bX1Jkj3HIVHEZIUA.png" /></figure><p>Go to directory “/etc/yum.repos.d” and create file name “test.repo”.</p><pre>cd /etc/yum.repos.d/<br>ll<br>mv oracle-linux-ol8.repo oracle-linux.ol8.bak<br>mv uek-ol8.repo uek-ol8.bak<br>mv virt-ol8.repo virt-ol8.bak<br>ll<br>touch test.repo    -----&gt; create file name &quot;test.repo&quot;<br>ll</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*GeCoJEi_iLvpppYFHn08qw.png" /></figure><p>Check the version of Operating System and then edit the file “test.repo”</p><pre>cat /etc/oracle-release<br>vi test.repo<br>=====================================<br>[Press i to INSERT]<br>[OL8]<br>name=Oracle Linux 8.9 x86_64<br>baseurl=file:///mnt/cdrom/AppStream/<br>gpgcheck=0<br>enabled=1<br><br>[OL8_v2]<br>name=Oracle Linux 8.9 x86_64_Base<br>baseurl=file:///mnt/cdrom/BaseOS/<br>gpgcheck=0<br>enabled=1<br><br>[Pree esc]<br>:wq![Enter]<br>=====================================<br>cat test.repo</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*uTGynTyXdXu6K7_NaIPjCQ.png" /></figure><p>Run this command</p><pre>dnf list</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*rUc823nLdrzAeTyGfDFW-w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*kRliJPtyVai13FwBoP7o9w.png" /></figure><p>Go to directory “/u01/app/oracle/product/19.3.0/db_home1” or $ORACLE_HOME and run Oracle database 19c installation software</p><pre>su oracle<br>cd $ORACLE_HOME<br>cd<br>vi .bash_profile<br>==================================<br>[Press i to INSERT]<br>export ORACLE_HOME=/u01/app/oracle/product/19.3.0/db_home1<br>export ORACLE_BASE=/u01/app<br>export ORACLE_SID=test<br>export PATH=$ORACLE_HOME/bin:$PATH<br>set -o vi<br><br>[Press esc]<br>:wq![Enter]<br>==================================<br>. .bash_profile<br>cd $ORACLE_HOME<br>pwd<br>./runInstaller    -----&gt; run Oracle database installation software</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*fpmQJUQU5ZkEcNgRG5z7nw.png" /></figure><p>To solve this issue. We need to run the preinstall. Please download a file from this link and put it in to local folder that we have mount from local machine to virtual machine</p><p><a href="https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm">https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fDd40BVzRXKJdChvHww7ag.png" /></figure><p>Switch to user “root” and then go to path “/software”.</p><pre>su root<br>cd /software<br>ll<br>dnf -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*7EDjoY2EJ2e6bInJWOW6bg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*JNyzPbHmYlfM8iWU5GoaXw.png" /></figure><p>Change user to “oracle” and go to directory “/u01/app/oracle/product/19.3.0/db_home1” or $ORACLE_HOME. And then run Oracle database 19c installation software</p><pre>su oracle<br>cd $ORACLE_HOME<br>./runInstaller</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/959/1*WC24wEHT0X5uGmTHeOBS5A.png" /><figcaption>Haiyaa!!! It works.</figcaption></figure><p>Click on “No” and then run this command</p><pre>export CV_ASSUME_DISTID=OL8<br>echo $CV_ASSUME_DISTID</pre><p>Run Oracle Database 19c installation software again</p><pre>./runInstaller</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*9mFdxGToUtYnT5o8bakvxQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*Zmg6romLahnu0lywcaxAug.png" /><figcaption>OK. I did it!! 🚀</figcaption></figure><p>Select “Setup Software Only”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/796/1*XxzzDWeeT7FA--xIWlwgmg.png" /></figure><p>Select “Single instance database installation”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*rCW2uK0ytph8rl5uAepAQA.png" /></figure><p>Select “Enterprise Edition”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*v8CinS03dnRa4p1awUCMyw.png" /></figure><p>Click on “Next &gt;”</p><blockquote>Noted: Make sure that path Oracle base is “/u01/app”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*ITIxII6geARJ_aCBrIiSnw.png" /></figure><p>Click on “Next &gt;”</p><blockquote>Noted: Make sure that path Inventory Directory is set correctly “/u01/oraInventory” and oracleInventory Group Name is set to “oinstall”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*WCpN2jrBWSoFai7P2uvOqA.png" /></figure><p>Click on “Next &gt;”</p><blockquote>Noted: Make sure that section “Database Operator (OSOPER) group (Optional)” is set to “oper”</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Y7FgiP7KikSnW0RRP_VpBw.png" /></figure><p>Click on “Next &gt;”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*j1KdElN4B6uWaCWZfZrw3A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*sV7eFkZA1aeli4kFuaS0Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*viJ3_AdrNKidgXcLxxWLxw.png" /></figure><p>Click on “Fix &amp; Check Again”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*M5qoIIa1uVkLp0TWuAc-Fg.png" /></figure><p>Go back to terminal and open new tab. change user to “root” and then run the fixup script by copy from them.</p><pre>su root<br>/tmp/InstallActions2024-08-16_10-32-47AM/CVU_19.0.0.0_oracle/runfixup.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/1*jKwjMaRjrDNPD2Ax0a-y2Q.png" /></figure><p>Go back to Oracle database 19c Installer software window and then click on “OK”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*M5qoIIa1uVkLp0TWuAc-Fg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*HIJ8ldEsS5sjdM4YsmlOWQ.png" /></figure><p>As you can see. Package “compat-libcap1–1.10” is missing. So, I go to search in google. How to solve “oracle database 19c package compat-libcap1–1.10 warning”. link is below</p><p><a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/rnrdm/linux-platform-issues.html#GUID-69942B7A-B662-48DC-8FC1-DFC56A3719D6">Issues Affecting Linux for Oracle Database 19c</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L-Eo1QyIS8zC0bsrPM-DQA.png" /></figure><p>From the document, This package issue can Ignore. So, go back to Oracle database 19c Installer software window and then click on checkbox “Ignore All” and then “Next &gt;”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Y9-u5gYbCMheJPekZ9q_sw.png" /></figure><p>Click on “Yes”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*ZSbbLVLF3yl2fU1ZfWucZA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/797/1*9I55TNDydbGEwE5JwPfNFA.png" /></figure><p>Click on “Install” and then wait it until finish</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*44FMdEwnCipZMamcpsQKyg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Qb12dyzZoUN5u8NYulev7Q.png" /></figure><p>Go back to terminal. open the new tab and then run this command</p><pre>/u01/oraInventory/orainstRoot.sh<br>/u01/app/oracle/product/19.3.0/db_home1/root.sh</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*lGuexxXOkLjreidTehZgYg.png" /></figure><p>Go back to Oracle database 19c Installer software window and then click on “OK” and “Close”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/1*PzhNlkX7Iua42V7ztGhIFw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*_QXB2fxHVgZZzneXEACngg.png" /><figcaption>Hooray!!! Congratulation. You have been 1st step of Oracle database administrator 🥇</figcaption></figure><p>Try to connect the database</p><pre>sqlplus / as sysdba</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/961/1*44_HAV49UT4jurPB3H9nMw.png" /></figure><p>End of the lab 🏆</p><p>เสร็จแล้วครับกับการติดตั้ง Oracle database 19c บนระบบ Oracle Linux version 8.9 จะเห็นได้ว่าค่อนข้างซับซ้อนในช่วงแรก ต้องอาศัยชั่วโมงในการฝึกฝนติดตั้ง Oracle database</p><p>ในบางช่วงนั้นก็อาศัยการ search วิธีการแก้ error ใน google บ้าง ก็เป็นเรื่องปกติครับ ดังนั้นถ้าฝึกทำบ่อยๆ จะเก่งขึ้นแน่นอน</p><p>บทความต่อไปจะเป็นการสอนวิธีการสร้าง database ขอให้ทุกๆคนเตรียมรอได้เลยครับ 😁</p><p>Resources:<br><a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/ladbi/index.html">Oracle Database Database Installation Guide, 19c for Linux</a><br><a href="https://oracle-base.com/articles/19c/oracle-db-19c-installation-on-oracle-linux-8">ORACLE-BASE — Oracle Database 19c Installation On Oracle Linux 8 (OL8)</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=09f77fe5f6b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[มาเป็น Database Administrator กันเถอะ | Oracle Database EP.1]]></title>
            <link>https://medium.com/@voraguns/%E0%B8%A1%E0%B8%B2%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-database-administrator-%E0%B8%81%E0%B8%B1%E0%B8%99%E0%B9%80%E0%B8%96%E0%B8%AD%E0%B8%B0-oracle-database-ep-1-781bedcd5794?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/781bedcd5794</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[database-administration]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Wed, 17 Jul 2024 07:55:32 GMT</pubDate>
            <atom:updated>2024-07-19T04:19:47.474Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*6jejiIxhasbxOEem.jpeg" /></figure><ul><li><a href="https://medium.com/@voraguns/database-administrator-%E0%B8%97%E0%B8%B3%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B8%A1%E0%B9%88-%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%81%E0%B8%A5%E0%B9%88%E0%B8%AD%E0%B8%87-a89f2cbebf27">Database Administrator ทำอะไรบ้าง? | ฉบับมือใหม่ แกะกล่อง</a></li><li><a href="https://medium.com/@voraguns/%E0%B8%AD%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-database-administrator-%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B9%80%E0%B8%84%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-oracle-database-d36ead4b2c17">อยากเป็น Database Administrator ใช้เครื่องมืออะไรบ้าง? | Oracle database EP.0</a></li></ul><p>สวัสดีครับทุกคน ต่อจากบทความที่แล้ว ความนี้ผมจะมาเริ่มลงลึกเนื้อหาเกี่ยวกับ Oracle Database Administrator กันแล้ว ก่อนอื่นขอทบทวนกันสักเล็กน้อยว่างานของ DBA นั้นว่าต้องเข้าใจ และมีความรู้อะไรก่อนบ้าง ก่อนเริ่มต้น</p><ul><li><strong>Getting Started with Database Administration</strong><br>ก่อนเริ่มต้น ควรเข้าใจพื้นฐาน database concept ก่อน อย่างเช่น ชนิดของ database user, database security และสิทธิ์ โดยเรียกใช้คำสั่งภาษา SQL ใช้งานกับ database และสร้าง password file</li><li><strong>Creating and Configuring an Oracle Database</strong><br>หลังจากวางแผนที่จะสร้าง database เสร็จ เราจะสร้างโดยใช้โปรแกรมที่มีลักษณะเป็น GUI (Graphic User interface)หรือคำสั่ง SQL</li><li><strong>Starting Up and Shutting Down</strong><br>เมื่อเรา Startup database ขึ้นมาแล้ว เราสร้าง instance ของ database และรู้สถานะของ database ต้องสามารถปิด Oracle database ที่ทำงานอยู่ในปัจจุบันได้ ซึ่ง instance สามารถปิดและยกเลิกการเชื่อมต่อ database ได้</li><li><strong>Configuring Automatic Restart of an Oracle Database</strong><br>ตั้งค่า Oracle database โดยให้ Restart ขึ้นมาเองโดยอัตโนมัติเมื่อ database เกิดขัดข้อง โดย config แต่ละ Oracle components ทั้ง Hardware และ Software</li><li><strong>Managing Processes</strong><br>Oracle Database มีprocess หลายอย่าง ซึ่งทำให้หลายๆ User และ Application เชื่อมต่อกับ instance database เดียวพร้อมกันได้</li><li><strong>Managing Memory</strong><br>การบริหารจัดการ memory นั้น เกี่ยว ข้องกับการรักษาขนาดที่เหมาะสมที่สุดสำหรับโครงสร้าง memory ของ database ตามความต้องการในการเปลี่ยนแปลง database</li><li><strong>Managing Users and Securing the Database</strong><br>ต้องมีการกำหนดนโยบายความปลอดภัยให้กับทุก database</li><li><strong>Monitoring the Database</strong><br>เป็นเรื่องสำคัญที่เราจะต้องมีติดตามสถานะการของ database อยู่เป็นประจำ เผื่อเกิดระบบ database ขัดข้อง แถมจะทำให้เรามีความเข้าใจที่ดีขึ้นเกี่ยวกับการทำงานของ database ที่เป็นปกติ</li><li><strong>Diagnosing and Resolving Problems<br></strong>Oracle Database มีโปรแกรมที่ช่วยวิเคราะห์และวินิฉัย error ของโปรแกรมสำหรับรวบรวมข้อมูล เพื่อแก้ไขปัญหา ซึ่งข้อมูลที่ว่ามี ประกอบไปด้วย trace file, dumps file และ core file และมีข้อมูลชนิดใหม่ที่ให้ลูกค้า และ Oracle Support สามารถ identify, investiเate, trace และแก้ปัญหาได้อย่างรวดเร็วและมีประสิทธิภาพ</li><li><strong>Types of Oracle Database Users</strong><br>ใน database จะมีการแบ่งแย่กชนิดของ Users และ roles ซึ่งมีหน้าที่แตกต่างกันไป ถ้าองค์กรขนาดเล็ก อาจจะมี DBA เพียง 1 คนที่เป็นคนดูแลสำหรับ application developers และ users แต่ถ้าองค์กรขนาดใหญ่ อาจจะพบว่าจำเป็นต้องแบ่งหน้าที่ของ DBA ให้หลายๆคน และแต่ละหน้าที่ที่เขา specialize</li><li><strong>Tasks of Database Administrator</strong><br>ต้องทำงานแต่ละ tasks ที่ได้รับมอบหมายได้ เพื่อ design, implement และบำรุงรักษา Database</li><li><strong>SQL Statements</strong><br>ต้องสามารถใช้คำสั่งภาษา SQL ได้ในการใช้งาน Oracle database</li><li><strong>Identifying Your Oracle Database Software Release</strong><br>รู้วิธีสังเกต หรือติดตาม version ของ Oracle Database Software ที่เป็นอันใหม่ล่าสุด</li><li><strong>About Database Administrator Security and Privileges</strong><br>ตรวตสอบให้มั่นใจว่าการเข้าถึง account ของ Database Administrator มีการควบคุมอย่างเข้มงวด</li><li><strong>Database Administrator Authentication</strong><br>ในฐานะที่เราเป็น DBA เราจะมีการ shutdown หรือ startup database เพราะ DBA ควรเป็นคนที่ทำหรือ perform task นี้เท่านั้น ฉะนั้น user name ต้องมีการ require secure authentication</li><li><strong>Creating and Maintaining a Database Password File</strong><br>เราสามารถสร้าง file database password โดยใช้ password file creation utility, ORAPWD. ในบาง Operating system เราสามารถสร้างไฟล์นี้ได้ในส่วนที่เป็น standard installation</li><li><strong>Data Utilities<br></strong>Oracle utilities เป็นเครื่องมือที่ให้เราสามารถ maintain ข้อมูลที่อยู่ใน Oracle database ได้</li></ul><h3>Types of Oracle Database Users</h3><ol><li><strong>Database Administrators</strong><br>ในแต่ละ Database บังคับว่าควรมี Database administrator อย่างน้อย 1 คน ซึ่ง Oracle database นั้นอาจจะมีขนาดใหญ่และสามารถมี user หลายคน ดังนั้น ในบางหน้าที่ที่ DBA ได้รับ ไม่ใช่งานที่สามรถทำได้คนเดียวเสมอไป แต่เป็นงานของ <strong><em>กลุ่มส่วนงาน DBAs</em></strong> ที่มีหน้าที่ร่วมกันรับผิดชอบ</li><li><strong>Security Officers</strong><br>ในบางองค์กร จะมีการแต่งตั้งเจ้าหน้า security officers 1 คนหรือมากกว่านั้น โดนมีหน้าที่ enrolls users, ควบคุมและติดตาม user ที่ access เข้ามาใน database และมีหน้า maintain system security</li><li><strong>Network Administrators</strong><br>ในบางองค์กรอาจจะมี 1 คนหรือมากกว่านั้น ซึ่งมีหน้าที่บริหารจัดการ Oracle networking products เช่น Oracle Net Services</li><li><strong>Application Developers</strong><br>มีหน้าที่ออกแบบและ implement database applications</li><li><strong>Application Administrators</strong><br>องค์กรใช้ Oracle Database นั้น จะมีการแต่งตั้ง Application Admin 1 คนหรือมากกว่านั้น เพื่อให้บริหารจัดการ application ซึ่งแต่ละ application จะมี Admin ที่ประจำ application เป็นของตัวเอง</li><li><strong>Database Users</strong><br>มีหน้าที่ใช้ database ผ่าน application หรือ utilities</li></ol><h4>เจาะลึกหน้าที่แต่ละ Type ของ User</h4><ol><li><strong>Database Administrators</strong><br>มีหน้าที่ละความรับผิดชอบดังต่อไปนี้<br>- ติดตั้งและ upgrade Oracle Database server และ application tools<br>- จองพื้นที่จัดเก็บ system และวางแผนสำหรับหรับอนาคตที่ระบบ database นั้นต้องการใน requirement<br>- สร้าง primary database storage structures (tablespace) หลังจากที่ application developers มีการออกแบบ design application<br>- สร้าง primary objects (tables, views, indexes) หลังจากที่ application developers มีการออกแบบ design application<br>- ปรับแต่งโครงสร้าง database ตามความจำเป็น ตามข้อมูลที่ได้รับจาก application developers<br>- ลงทะเบียน users และบำรุงรักษา system security<br>- ตรวจสอบหรือรับรองว่ามีการใช้งาน Oracle database ตามข้อตกลงของ Oracle license agreements<br>- ควบคุมและติดตาม user ที่ access ที่เข้ามาใช้งานใน database<br>- ตรวจสอบและเพิ่มประสิทธิภาพการทำงานของ database<br>- วางแผนสำหรับ backup และ recovery ของข้อมูล database<br>- Backing up และ restoring database<br>- ติดต่อ Oracle สำหรับ technical support</li><li><strong>Security Officers<br></strong>ในบางองค์กร จะมีการแต่งตั้งเจ้าหน้า security officers 1 คนหรือมากกว่านั้น โดนมีหน้าที่ enrolls users, ควบคุมและติดตาม user ที่ access เข้ามาใน database และมีหน้า maintain system security<br>ในฐานะที่เราเป็น DBA อาจจะไม่ได้รับผิดชอบในส่วนนี้ เว้นแต่ในองค์กรมีการแย่งตำแหน่ง security officer<br>สามารถศึกษาข้อมูลเพิ่มเติมเกี่ยวกับหน้าที่ของ security officers ได้ที่ <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/dbseg/index.html">Oracle Database Security Guide</a></li><li><strong>Network Administrators</strong><br>ในบางองค์กรอาจจะมี 1 คนหรือมากกว่านั้น ซึ่งมีหน้าที่บริหารจัดการ Oracle networking products เช่น Oracle Net Services<br>สามารถศึกษาข้อมูลเพิ่มเติมเกี่ยวกับหน้าที่ของ Network Administrators ได้ที่ <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/netag/index.html">Oracle Database Net Services Administrator’s Guide</a></li><li><strong>Application Developers</strong><br>มีหน้าที่ออกแบบและ implement database applications โดยมีหน้ารับผิดชอบดังต่อไปนี้<br>- ออกแบบและพัฒนา database application<br>- ออกแบบโครงสร้าง database สำหรับ application<br>- ประเมิน storage requirements สำหรับ application<br>- ระบุการแก้ไขโครงสร้างของ database สำหรับ application<br>- สื่อสารข้อมูลทั้งหมดที่กล่าวไปทั้งหมด ให้กับ DBA<br>- ปรับแต่ง application ระหว่างการพัฒนา<br>- สร้างมาตรการรักษาความปลอดถัยสำหรับ application ระหว่างการพัฒนา<br>Application developers สามารถ perform บางงานร่วมกันกับ DBAs ได้ สามารถศึกษาเกี่ยวกับ application development tasks ได้ที่ <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/adfns/index.html">Oracle Database Development Guide</a></li><li><strong>Application Administrators</strong><br>องค์กรใช้ Oracle Database นั้น จะมีการแต่งตั้ง Application Admin 1 คนหรือมากกว่านั้น เพื่อให้บริหารจัดการ application ซึ่งแต่ละ application จะมี Admin ที่ประจำ application เป็นของตัวเอง</li><li><strong>Database Users</strong><br>มีหน้าที่ใช้ database ผ่าน application หรือ utilities<br>โดยทั่วไปมีหน้าที่ดังต่อไปนี้<br>- ปรับแต่ง, ลบข้อมูลที่ได้รับตามคำสั่ง<br>- Generate report จากข้อมูล</li></ol><p>🙋ว่าแต่ว่า Tasks ของ Database Administrator มีอะไรบ้างหล่ะ?</p><h3><strong>Tasks of a Database Administrator </strong>🌟</h3><p>Task 1: Evaluate the Database Server Hardware<br>ประเมินว่า Oracle database และ applications นั้นใช้ resource เท่าไหร่</p><p>Task 2: Install the Oracle Database Software<br>ในฐานะที่เป็น database administrator เรามีหน้าที่ install โปรแกรม Oracle Database server และ front-end tools และ database application ที่สามารถ access เข้าใช้งาน database ได้</p><p>Task 3: Plan the Database<br>ในฐานะที่เป็น database administrator เราต้องวางแผนโครงสร้าง logical storage ของ database, ภาพรวมการออกแบบ database และแผนวิธีการ backup database</p><p>Task 4: Create and Open the Database<br>หลังจากออกแบบ database เสร็จแล้ว ต้องสามารถสร้าง database และเปืดใช้งานได้</p><p>Task 5: Back Up the Database<br>หลังจากสร้างโครงสร้าง database เสร็จแล้ว ต้องมีการ backup database ตามแผน strategy</p><p>Task 6: Enroll System Users<br>หลังจากที่ backup โครงสร้าง database ต้องมีการ enroll user ของ database ให้สอดคล้องกับ Oracle license agreement และให้สิทธิ์กับ roles แต่ละ users</p><p>Task 7: Implement the Database Design<br>หลังจากสร้างและ start database ได้แล้ว enroll system user แล้ว ก็ implement ตามแผนโครงส้ราง logical database โดยสร้าง tablespace ที่จำเป็น หลังจากนั้นต่อมาก็สร้าง database objects</p><p>Task 8: Back Up the Fully Functional Database<br>เมื่อ database implement ครบทั้งหมดกระบวนการแล้ว เราควรมีการ backup ทุกครั้งที่มีการเปลี่ยนแปลงของโครงสร้าง database</p><p>Task 9: Tune Database Performance<br>การเพิ่มประสิทธิภาพการใช้งานของ database คือหนึ่งในหน้าที่ที่ DBA ต้องทำ ซึ่ง Oracle database มี feature resource management ที่ช่วยให้เราสามารถควบคุมการ allocate ของ resource ได้หลากหลาย user groups</p><p>Task 10: Download and Install Release Updates and Release Update Revisions<br>หลังจากที่ install database แล้ว ต้อง download และ install ให้ Oracle software เป็น version ที่ล่าสุด</p><p>Task 11: Roll Out to Additional Hosts<br>หลังจากที่ติดตั้ว Oracle database แล้ว มีการ config, tuned, patch และ test แล้ว ต้องมีการทำให้กับเครื่องอื่นๆด้วย</p><p>เป็นยังไงกันบ้างครับ จากเนื้อหาข้างบน จะเห็นได้ว่ามีการลง detail ในส่วนต่างๆมากขึ้น เพื่อให้ทุกคนนั้นเข้าใจเกี่ยว database administrator ว่า task นั้นมีอะไรบ้างที่ต้องทำในงาน และนี้คือพื้นฐานเบื้องต้นของ DBA ในบทความต่อๆไป จะมีเนื้อหาเชิงเทคนิคเพิ่มมากขึ้นแน่นนอน ถ้าสนใจเนื้อหาเกี่ยวกับ DBA ฝากติดตามต่อไปด้วยนะครับ มีเพิ่มแน่นอน!!!! 👻🔥✨</p><p>Resource : <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/admin/database-administrators-guide.pdf">Database Administrator’s Guide (oracle.com)</a></p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//docs.oracle.com/en/database/oracle/oracle-database/19/admin/database-administrators-guide.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe3c103d5149ed8b111551f0d5931618/href">https://medium.com/media/fe3c103d5149ed8b111551f0d5931618/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=781bedcd5794" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Administrator ใช้โปรแกรมอะไรบ้าง? | Oracle database EP.0]]></title>
            <link>https://medium.com/@voraguns/%E0%B8%AD%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B9%80%E0%B8%9B%E0%B9%87%E0%B8%99-database-administrator-%E0%B9%83%E0%B8%8A%E0%B9%89%E0%B9%80%E0%B8%84%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-oracle-database-d36ead4b2c17?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/d36ead4b2c17</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[database-administration]]></category>
            <category><![CDATA[dba]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Tue, 16 Jul 2024 03:38:37 GMT</pubDate>
            <atom:updated>2024-07-19T04:18:28.873Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/0*UVQfs2PqxqXP9ACg.jpg" /></figure><p><a href="https://medium.com/@voraguns/database-administrator-%E0%B8%97%E0%B8%B3%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B8%A1%E0%B9%88-%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%81%E0%B8%A5%E0%B9%88%E0%B8%AD%E0%B8%87-a89f2cbebf27">Database Administrator ทำอะไรบ้าง? | ฉบับมือใหม่ แกะกล่อง</a></p><p>ต่อจากบทความที่แล้ว เรามาทำความรู้จักกับเครื่องมือที่ใช้งานเวลาติดตั้ง oracle database กันต่อ ว่ามีอะไรบ้าง แล้วแต่ละเครื่องมือเอาไว้ใช้ทำอะไร</p><h4>Tools for Administering the Database</h4><p><strong>Oracle Universal Installer (OUI)</strong><br>คือเครื่องมือที่ใช้สำหรับ install Oracle software และ options ต่างๆ ซึ่งสามารถติดตั้ง database ได้โดยใช้ Oracle Database Configuration Assistant เพื่อติดตั้ง database</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*FtmxTbisTNnOWNJDaBx25g.png" /><figcaption>ตัวอย่างหน้าตา <strong>Oracle Universal Installer (OUI)</strong></figcaption></figure><p><strong>Oracle Database Configuration Assistant (DBCA)<br></strong>คือเครื่องมือที่ใช้สร้าง database จาก template ซึ่งมีมาให้โดยสำเร็จรูปจาก Oracle หรือเราสามารถสร้างเองได้ โดย config เอง</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/806/0*uAvaNUPO53Dbfs1J.png" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdocs.oracle.com%2Fen%2Fdatabase%2Foracle%2Foracle-database%2Ftutorial-create-advanced-container-db%2Findex.html%3Fopt-release-19c&amp;psig=AOvVaw2AFCqei39K0OPGOGViuoAm&amp;ust=1721187047747000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBEQjRxqFwoTCPizx8jPqocDFQAAAAAdAAAAABAW">Create a Container Database Using DBCA (Advanced Mode)</a></figcaption></figure><p><strong>Database Upgrade Assistant (DBUA)</strong><br>คือเครื่องมือที่ใช้ upgrade database ให้เป็น version ล่าสุดหรือ version ที่ต้องการ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/0*1mrzcqOKn9StNDBx.png" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdocs.oracle.com%2Fen%2Fdatabase%2Foracle%2Foracle-database%2F19%2Fupgrd%2Fupgrading-oracle-database-upgrade-assistant-dbua.html&amp;psig=AOvVaw0YrT5glK1SexxsHhzAiPnv&amp;ust=1721187152447000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBEQjRxqFwoTCPCHjPjPqocDFQAAAAAdAAAAABAE">Upgrading with Oracle Database Upgrade Assistant (DBUA)</a></figcaption></figure><p><strong>Net Configuration Assistant</strong><br>คือเครื่องมือที่ใช้ตั้งค่า config listener และ naming method ซึ่งเป็นส่วนที่สำคัญใน Oracle database network</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*Sm4kxhgmdGEUU4GD.png" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdocs.oracle.com%2Fcd%2FE65398_03%2Fotn%2Fpdf%2Finstall%2Fhtml_edmsv%2Foutput%2Fchapter_9.htm&amp;psig=AOvVaw0nrqbUs0gFt5-E6TDS637A&amp;ust=1721187212444000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBEQjRxqFwoTCKCqy5XQqocDFQAAAAAdAAAAABAQ">Post-Installation Modifications for the Oracle Database</a></figcaption></figure><p><strong>Oracle Enterprise Manager Database Express (EM Express)</strong><br>คือเครื่องมือหลักที่ใช้บริหารจัดการ database ซึ่งเป็น Web-based interface คือใช้งานบนเว็บ หลังจากที่เรา install Oracle database software, สร้างหรืออัพเกรด, ตั้งค่า config network เราสามารถใช้ EM Express บริหารจัดการ database ได้เลย</p><p>Oracle แยก license สำหรับการใช้งาน Oracle Enterprise Manager management packs, management plug-ins และ products อื่นๆ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*0ex2FFWQ6-kr-eYS.gif" /><figcaption>รูปภาพจาก<a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdocs.oracle.com%2Fcd%2FE63000_01%2FEMCON%2Foverview.htm&amp;psig=AOvVaw2kD8kkbdyJ4MYtBo2loKmh&amp;ust=1721186928284000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CAMQjB1qFwoTCID3yI3PqocDFQAAAAAdAAAAABAE"> Overview of Oracle Enterprise Manager Cloud Control 13c</a></figcaption></figure><p><strong>SQL Developer</strong><br>คือเครื่องมือที่ใช้ access Oracle database ซึ่ง support ภาษา SQL และ PL/SQL สามารถใช้หา database objects ได้ โดย run SQL statements และ SQL scripts และแก้ไขหรือ debug PL/SQL statement</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/883/0*nHooQ1z7ZHPY_L6q.gif" /><figcaption>รูปภาพจาก <a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fdocs.oracle.com%2Fen%2Fdatabase%2Foracle%2Fsql-developer%2F18.3%2Frptug%2Fsql-developer-concepts-usage.html&amp;psig=AOvVaw3couni3IQZ5OzQrrDJbTmT&amp;ust=1721187278438000&amp;source=images&amp;cd=vfe&amp;opi=89978449&amp;ved=0CBEQjRxqFwoTCPjzu7TQqocDFQAAAAAdAAAAABAE">SQL Developer Concepts and Usage</a></figcaption></figure><p>เป็นยังไงกันบ้างครับ เบื้องต้นก่อนที่เราจะเป็น DBA หรือ Database Administrator ได้ต้องรู้จักเครื่องมือเหล่านี้ก่อน สำหรับบทความต่อไป จะเป็นวิธีการ Installing Oracle database และสร้าง database ยังไงโปรดติดตามและ follow สำหรับบทความต่อไปด้วยนะครับ 🔥❤️</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d36ead4b2c17" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Administrator ทำอะไรบ้าง? | ฉบับมือใหม่ แกะกล่อง]]></title>
            <link>https://medium.com/@voraguns/database-administrator-%E0%B8%97%E0%B8%B3%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3%E0%B8%9A%E0%B9%89%E0%B8%B2%E0%B8%87-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B8%A1%E0%B9%88-%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%81%E0%B8%A5%E0%B9%88%E0%B8%AD%E0%B8%87-a89f2cbebf27?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/a89f2cbebf27</guid>
            <category><![CDATA[dba]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[database-administration]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Fri, 12 Jul 2024 09:01:37 GMT</pubDate>
            <atom:updated>2024-07-12T09:01:37.131Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*rJE-ZmxnQoLfAyyNo7qvXA.png" /></figure><p>สวัสดีครับทุกคน หลายคนที่เพิ่งเรียนจบมาใหม่ หรือต้องการย้ายสายงาน คงกำลังจะมองหางานที่เกี่ยวกับ data หนึ่งนั้นก็คือ “Database Administrator” นั่นเอง</p><p>จะว่าไป Database Administrator เขามีหน้าที่อะไรบ้างหล่ะ?</p><p>อ้างอิงจากหนังสือ Oracle 2 Day DBA เขาเขียนไว้ตามนี้ครับ</p><p>1.ติดตั้งโปรแกรม<br>2. สร้าง database<br>3. อัพเกรด database และ software ให้เป็น version ล่าสุด<br>4. Starting and shutting down ตัว server database<br>5. บริหารจัดการ user และ security<br>6. บริหารจัดการ database objects เช่น tables, indexes และ views<br>7. สำรอง database และ recovery ระบบ เมื่อจำเป็น<br>8. ติดตามสถานะเครื่อง database และทำการป้องกันหรือแก้ไข ในกรณีต่างๆ เมื่อจำเป็น<br>9. ตรวจสอบและปรับแต่งประสิทธิภาพ database<br>10. วิเคราะห์และ report เมื่อเกิด error ใน database ที่ไม่สามารถแก้ไขได้ ให้ทีม support</p><p>หลักๆ จะมีหน้าที่ตามนี้ครับ ถ้าเป็น database ของยี่ห้ออื่นอย่าง MongoDB, Postgres DB, Redis, Maria DB, MySQL, Microsoft SQL ก็จะมีหน้าที่คล้ายๆแบบนี้เหมือนกัน</p><p>แล้วความรู้พื้นฐานที่ควรมี ต้องเตรียมตัวยังบ้าง</p><ul><li>Basic knowledge of Linux Command line</li><li>Basic knowledge of SQL, PQ/SQL</li></ul><p>ถ้ายังไม่มีความรู้ แนะนำให้เรียนที่คอร์สเรียนนี้ได้เลยครับ</p><ul><li><a href="https://medium.com/@voraguns/linux-command-%E0%B8%99%E0%B8%B5%E0%B9%89%E0%B8%AB%E0%B8%A5%E0%B9%88%E0%B8%B0%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%A5%E0%B8%B1%E0%B8%9A%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%9C%E0%B8%A1-67485e118605">Linux Command นี้หล่ะความลับของผม</a></li><li><a href="https://medium.com/@voraguns/bourne-shell-bourne-again-shell-core-shell-%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%99%E0%B8%B5%E0%B9%89%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%B7%E0%B8%9A-c52249f9327d">Bourne shell, Bourne again shell , Core shell เรื่องนี้ต้องสืบ</a></li><li><a href="https://bootcamp.datarockie.com/p/sql-cc">SQL Crash Course</a></li><li><a href="https://medium.com/@voraguns/mysql-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B8%A1%E0%B8%B7%E0%B8%AD%E0%B9%83%E0%B8%AB%E0%B8%A1%E0%B9%88%E0%B9%81%E0%B8%81%E0%B8%B0%E0%B8%81%E0%B8%A5%E0%B9%88%E0%B8%AD%E0%B8%87-4a7bb8a27335">MySQL คืออะไร มาดูกันครับ ✨</a></li></ul><p>เป็นยังไงกันบ้างครับ อันนี้จะเป็นแบบคราวๆโดยพื้นฐานสำหรับสายงาน Database Administrator นั้นเอง สำหรับเนื้อหาเชิงเทคนิค จะเขียนในบทความถัดไป ยังไงฝากติดตามด้วยนะครับ</p><p>Resource : <a href="https://docs.oracle.com/en/database/oracle/oracle-database/19/admqs/2-day-dba.pdf">2 Day DBA (oracle.com)</a></p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//docs.oracle.com/en/database/oracle/oracle-database/19/admqs/2-day-dba.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/106bb86e7f7ecb6ad36e438b65b54c4a/href">https://medium.com/media/106bb86e7f7ecb6ad36e438b65b54c4a/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a89f2cbebf27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bourne shell, Bourne again shell , Core shell เรื่องนี้ต้องสืบ]]></title>
            <link>https://medium.com/@voraguns/bourne-shell-bourne-again-shell-core-shell-%E0%B9%80%E0%B8%A3%E0%B8%B7%E0%B9%88%E0%B8%AD%E0%B8%87%E0%B8%99%E0%B8%B5%E0%B9%89%E0%B8%95%E0%B9%89%E0%B8%AD%E0%B8%87%E0%B8%AA%E0%B8%B7%E0%B8%9A-c52249f9327d?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/c52249f9327d</guid>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[it]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[shell-script]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Mon, 06 May 2024 11:50:52 GMT</pubDate>
            <atom:updated>2024-06-11T03:57:54.854Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A0brMJX6jKdaa91frHchOg.png" /></figure><h3>Bourne shell, Bourne again shell , Korn shell ต่างกันยังไง? เรื่องนี้ต้องสืบ</h3><p>สวัสดีครับทุกคน มีใครเคยได้ยินบ้างไหมครับว่า “Bourne shell / Bourne again shell / Korn shell” คืออะไร? มันต่างกันไหม คำศัพท์ที่เราพูดกันนี้ ผมขอเรียกว่า Jargon</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*0rqQT7F2v-AefRtfJ9UEqw.jpeg" /></figure><p>Jargon (จาก๊อน) คืออะไร?</p><p>คือศัพท์เทคนิคหรือศัพท์เฉพาะทางที่ต้องรู้ เช่น ถ้าในวงการคนทำหนัง จะมีสิ่งที่เรียกว่า “Deadcat” เขาหมายถึงตัวก้อนข้นที่กรองเสียงบนไมโครโฟน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*7oDLD8HiMZQVRlDf.jpg" /><figcaption>นี้คือ Deadcat</figcaption></figure><p>Bourn shell / Bourne Again shell / Korn shell ต่างกันยังไง?</p><p>ก่อนจะรู้จักทั้ง 3 คำนี้ ต้องรู้จักคำนี้ก่อน “Unix shell คืออะไร?”</p><p>Unix shell คือ Program หนึ่งที่ทำหน้าที่แปลงคำสั่งของผู้ใช้ แล้วไปสั่ง Operating System อีกที</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/371/0*DS-ReCeion0cMNab" /><figcaption>ตัวอย่าง Program shell ที่ build-in มาให้อยู่แล้วกับ Ubuntu</figcaption></figure><p>Unix shell ตัวแรกคือ Program ชื่อ sh หรือ /bin/sh</p><p>แต่ต่อมามีการสร้าง C shell ขึ้นมาให้คล้ายกับภาษา C ซึ่งคนสร้างชื่อ Stephen Bourne เลยตั้งชื่อตามคนสร้างว่า “Bourne shell”</p><p>ส่วน BASH ย่อมาจาก Bourne Again shell ใช้ลิขสิทธิ์ของ GNU</p><p>GNU คืออะไร?</p><p>GNU คือชื่อโครงการพัฒนาระบบปฎิบัติการ เกิดขึ้นปี 1984 คนเริ่มโครงการชื่อ Richard Matthew Stallman เขามีเป้าหมายคือ จะพัฒนาระบบปฎิบัติการให้เป็น software ที่เสรี ใครๆก็เอาไปแก้ไข ปรับปรุง พัฒนาให้ดีขึ้นได้ ที่สำคัญคือฟรี ไม่เสียค่าลิขสิทธิ์</p><p>อ่านเพิ่มเติมเกี่ยวกับ GNU ได้ที่นี้ <a href="https://th.wikipedia.org/wiki/%E0%B8%81%E0%B8%99%E0%B8%B9">Click here</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/412/1*ymsw8lrL3KrIFG0vutktpQ.jpeg" /><figcaption><a href="https://th.wikipedia.org/wiki/%E0%B8%A3%E0%B8%B4%E0%B8%8A%E0%B8%B2%E0%B8%A3%E0%B9%8C%E0%B8%94_%E0%B8%AA%E0%B8%95%E0%B8%AD%E0%B8%A5%E0%B8%A5%E0%B9%8C%E0%B9%81%E0%B8%A1%E0%B8%99">Richard Matthew Stallman</a></figcaption></figure><p>Korn shell คืออะไร?</p><p>Korn shell เกิดขึ้นปี 1980 ถูกสร้างโดย David Korn ที่ Bell lab โดย korn shell สร้างมาจากต้นแบบของ Bourne shell และ C shell ทำงานใน function ของ Bourne shell ได้ทุกอย่าง โดยคนสร้างรวมเอาข้อดีของ Bourne shell และ C shell เข้าด้วยกัน</p><p>และนี้ก็คือทั้งหมดของเนื้อหาสำหรับบทความนี้ครับทุกคน เป็นยังไงกันบ้าง ทั้งนี้หากเพื่อนๆอยากรู้เพิ่มเติม สามารถอ่านได้จากลิ้งค์นี้เลยครับ</p><iframe src="https://drive.google.com/viewerng/viewer?url=https%3A//ftp.psu.ac.th/pub/howto/bash-howto/Shell%2520Script.pdf&amp;embedded=true" width="600" height="780" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b83df8b9dcfefff903ff1639ad36add/href">https://medium.com/media/2b83df8b9dcfefff903ff1639ad36add/href</a></iframe><ul><li><a href="https://en.wikipedia.org/wiki/KornShell">KornShell - Wikipedia</a></li><li><a href="https://th.wikipedia.org/wiki/%E0%B8%9A%E0%B8%AD%E0%B8%A3%E0%B9%8C%E0%B8%99%E0%B9%80%E0%B8%8A%E0%B8%A5%E0%B8%A5%E0%B9%8C">บอร์นเชลล์ - วิกิพีเดีย</a></li><li><a href="https://th.wikipedia.org/wiki/%E0%B9%81%E0%B8%9A%E0%B8%8A">แบช - วิกิพีเดีย</a></li><li><a href="https://medium.com/@voraguns/linux-command-%E0%B8%99%E0%B8%B5%E0%B9%89%E0%B8%AB%E0%B8%A5%E0%B9%88%E0%B8%B0%E0%B8%84%E0%B8%A7%E0%B8%B2%E0%B8%A1%E0%B8%A5%E0%B8%B1%E0%B8%9A%E0%B8%82%E0%B8%AD%E0%B8%87%E0%B8%9C%E0%B8%A1-67485e118605">Linux Command นี้หล่ะความลับของผม</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c52249f9327d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Two pointers คืออะไร? ฉบับเข้าหัว 300%]]></title>
            <link>https://medium.com/@voraguns/two-pointers-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%89%E0%B8%9A%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%82%E0%B9%89%E0%B8%B2%E0%B8%AB%E0%B8%B1%E0%B8%A7-300-9ef9d27a5c1f?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ef9d27a5c1f</guid>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[two-pointers]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Mon, 08 Apr 2024 02:02:47 GMT</pubDate>
            <atom:updated>2024-04-08T02:02:47.669Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3o1R0UK8waABIIfkutBmtw.png" /></figure><p>สวัสดีครับ คนที่เจอบทความนี้ คุณคือผู้โชคดีที่สุด เพราะวันนี้คุณจะไม่เคยเจอบทความเนื้อหาที่ไหนมาก่อนว่า “Two pointers คืออะไร?” โดยก่อนจะอธิบายเรื่อง two pointers นั้น อยากให้รู้ก่อนว่าในโลกของ programming นั้นมีสิ่งที่เรียกว่า “Data structure and algorithm”</p><p>Data structure and algorithm คืออะไร?</p><p>ถ้าอธิบายแบบง่ายๆเลยคือคอมพิวเตอร์ในยุคสมัยก่อน ต้องมี Memory ที่เอาไว้จัดเก็บข้อมูล อาจจะเป็น Hard disk หรือ RAM ก็ได้ ซึ่งมันมีราคาแพง จึงมีการคิดค้นวิธีการในการจัดเก็บข้อมูลให้มีประสิทธิ์ภาพ นั้นคือ Data structure</p><p>Algorithm คือวิธีการแก้ไขปัญหา ที่มีลำดับขั้นตอนการทำงาน เช่นการหาเส้นทางจากจุด A ไปจุด D โดยใช้เวลาน้อยที่สุด</p><p>Two pointers เกิดมาจากคนที่ชื่อว่า Tony Hoare เป็นคำที่เขาเลือกใช้ในการทำ partition เพื่อสลับข้อมูลใน quick sort ตอนเป็น Visiting students ที่ Moscow State University ในปี1959 เพื่อเรียงคําศัพท์ในภาษา Russia แต่ว่าตอนนั้นยังเขียนไม่ได้ เพราะภาษา Autocode ที่ใช้ ไม่สามารถเขียนแบบ Recursion ได้</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/220/0*ym_056N_2SIQqd26.jpg" /><figcaption><a href="https://en.wikipedia.org/wiki/Tony_Hoare">Tony Hoare</a></figcaption></figure><p>ต่อมา พอกลับไปทำงานอังกฤษ เขาได้รับงานให้เขียน Shell Sort แต่เขา บอกกับหัวหน้าว่า เขามี Algorithm ท่ีดีกว่านั้น หัวหน้าไม่เชื่อเลยต้องท้าพนันกัน สุดท้ายเขาชนะพนันได้ด้วยการเขียนภาษา ALGOL แบบ Recursion และ เรียก Algorithm ใหม่ที่ชื่อว่า Quick Sort และถูกจัดให้อยู่ในกลุ่ม Algorithm แบบ Divide &amp; Conquer</p><p>Two pointers เป็นหนึ่งใน Algorithm วิธีการคือจะมีนิ้วซ้าย กับนิ้วขวา ชี้ที่ตำแหน่งของช่อง แล้วค่อยๆขับเข้าหากัน</p><p>ตัวอย่างการใช้ two pointers ในการแก้ปัญหา</p><p>ให้ Array ที่มีจำนวนเต็มมา แล้วเขียน Function เพื่อ Rotate ตัวเลขคู่ทั้งหมด เช่น</p><p>มีข้อมูล 3 8 6 4 5 8 2 1 ผลลัพธ์ที่ได้คือ 3 2 8 6 5 4 8 1</p><p>ไอเดียคือ วนลูปก่อนเลย จากนั้นสร้างตัวแปรเก็บไว้ชั่วคราวก่อน ต่อไปคือ สร้างตัวแปรเก็บนิ้วซ้าย กับนิ้วขวา ถ้าตัวซ้ายไม่ใช่เลขคู่ ก็ขยับไปทางขวา ถ้าตัวขวาไม่ใช่เลขคู่ ก็ขยับเข้าทางซ้าย ถ้าตัวซ้ายกับตัวขวาเป็นเลขคู่ก็สลับตำแหน่งกัน</p><pre>// Java version 21 เป็นต้นไป จะเขียน main function คล้ายภาษา C<br><br>void main() {<br>    int[] a = {3, 8, 6, 4, 5, 8, 2, 1};<br>    process(a);<br>    for(int i = 0; i &lt; a.length; i++) {<br>        System.out.print(a[i] + &quot; &quot;);<br>    }<br>    System.out.println();<br>}<br><br>void process(int[] a) {<br>    int left = 0;<br>    int right = a.length - 1;<br>    while (left &lt; right) {<br>        boolean leftOk = a[left] % 2 == 0;<br>        boolean rightOk = a[right] % 2 == 0;<br>        if (leftOk == true &amp;&amp; rightOk == true) { <br>            int temp = a[left];<br>            a[left] = a[right];<br>            a[right] = temp;<br>            left++;<br>            right--;<br>        }<br>        if (leftOk == false &amp;&amp; rightOk == true) { left++; }<br>        if (leftOk == true &amp;&amp; rightOk == false) { right++; }<br>        if (leftOk == false &amp;&amp; rightOk == false) { left++; right--; }<br>    }<br>}</pre><p>เป็นยังไงกันบ้างครับ หวังว่าจะเข้าใจในเบื้องต้นว่า two pointers คืออะไร และมีวิธีการยังไง อาจจะเข้าใจหรือไม่เข้าใจ ไม่มากก็น้อย เพราะมันยากมาก ยากที่สุด ยากแบบโอ้ม่ายก้อด สุดท้ายนี้ถ้าชอบ ฝากติดตามผลงานต่อๆไปด้วยนะครับ ขอบคุณที่อ่านจนจบครับ</p><p>เรียนรู้เพิ่มเติมได้ที่นี้เลย</p><p><a href="https://www.geeksforgeeks.org/two-pointers-technique/">Two Pointers Technique - GeeksforGeeks</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FVEPCm3BCtik%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DVEPCm3BCtik&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FVEPCm3BCtik%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/20358cf50feedfb67c21612e08913593/href">https://medium.com/media/20358cf50feedfb67c21612e08913593/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9ef9d27a5c1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[[Microsoft Event] Level Up with GitHub Codespaces and Copilot: Thailand มาอัพเกรดสกิล Github กัน]]></title>
            <link>https://medium.com/@voraguns/microsoft-event-level-up-with-github-codespaces-and-copilot-thailand-%E0%B8%A1%E0%B8%B2%E0%B8%AD%E0%B8%B1%E0%B8%9E%E0%B9%80%E0%B8%81%E0%B8%A3%E0%B8%94%E0%B8%AA%E0%B8%81%E0%B8%B4%E0%B8%A5-github-%E0%B8%81%E0%B8%B1%E0%B8%99-a7afd0d5fcbe?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/a7afd0d5fcbe</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[microsoft]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Sat, 03 Jun 2023 13:17:33 GMT</pubDate>
            <atom:updated>2023-06-03T13:17:33.481Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FcOhyy8K9JtOzLigAWxtBw.jpeg" /></figure><p>สวัสดีครับ blog นี้ที่เราเขียน คืออยากจะมา review และจดโน๊ตไว้ว่าในงาน event นี้เราได้เรียนรู้อะไรบ้าง ซึ่งในบทความนี้จะแนะนำ Github Codespace and Copilot กันครับ ⭐</p><h3><strong>Github คืออะไร?</strong></h3><p>Github เป็น platform สำหรับ Collab ด้วยกันระหว่าง developer ซึ่งจะหลายโปรเจ็คเยอะมาก ที่เป็น Open-source ให้ใช้งานฟรี ซึ่งหลายคนอาจจะกังวลเรื่องของ Security แต่จะบอกเลยว่า ระบบนั้นดีมาก อยู่ในระดับ Enterprise-grade เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*POe6M8NOoiIdJvAtPL0fyw.png" /></figure><p>ต่อมาเรื่องของ ecosystem จากรูป slide มีหลาย project เยอะมากที่เป็น open source ซึ่งที่ดังๆเลยนั้นคือ spring boot</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hdLaMqSfQ8LhEKEMAn1jgw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UnfMz3Slp5at1pJbmEizMw.png" /><figcaption>Github spring-boot project link : <a href="https://github.com/spring-projects/spring-boot">Click here</a></figcaption></figure><p>ในงาน event มี keynote ด้วยเกี่ยวกับ Project เป็น showcase ด้วยว่าเขาใช้ Github Copilot อะไรยังไงบ้าง</p><h4><strong>Github Copilot คืออะไร?</strong></h4><p>มันคือ AI ที่สามารถช่วยเขียน code ให้เราได้ อารมณ์เหมือน Chat-GPT เลย แบบถ้าเราอยากจะให้ช่วยเขียน environment DockerFile ก็ทำได้เหมือนกันนะ อย่างดีอะ 555555</p><p>⭐ เพิ่มเติมคือ เป็น features ใน Github ครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QvbQb68uBBIR70HuO7TarQ.png" /><figcaption>Github Copilot : <a href="https://github.com/features/copilot">Click here</a></figcaption></figure><p>Github Copilot มี Extensions ใน Visual Studio Code ด้วยนะ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bmL1lqIpd8F10QcsjgLtDg.png" /></figure><h4>Github Copilot ใช้ฟรีไหม?</h4><p>นี้เลย ในเว็บมีบอกราคาแต่ละ plan แต่ถ้าสมมติว่าเราศึกษาอยู่ในมหาวิทยาลัยอยู่สามารถใช้ Github Student Developer Pack แล้วใช้งานได้ฟรีเลยครับ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H96ZTPTdIzzC0nbCZkI1mg.png" /><figcaption>ป้ายราคา Github Copilot ในเว็บ</figcaption></figure><p>สำหรับน้องๆนักศึกษา เข้าที่เว็บนี้ได้เลยค้าบ ใช้อีเมลมหาวิทยาลัยในการสมัครนะ</p><p>ตัวอย่างอีเมลที่ใช้สมัคร : xxxxxx@mail.kmutt.ac.th</p><p>Link : <a href="https://education.github.com/students">https://education.github.com/students</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v-PbSqRhvNkpxjwlBsiQWw.png" /><figcaption>Github for education</figcaption></figure><h4>Github Codespace คืออะไร?</h4><p>คือ Virtual Machine ของ VS Code ที่เราสามารถเขียน Code ได้บน Web browser โดยปกติแล้ว เวลาเราเขียน Code จะต้องมีการ Compile program เผื่อ Run code และดู result ซึ่งบน Github Codespace เราสามารถเขียน terminal ใช้คำสั่ง command line ได้เลย</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sWvfUKlYxEUv4bx2YUAUQw.png" /></figure><p>อยากทำ workshop ลองเล่นดู ไปที่นี้ได้เลยค้าบ</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GVNRLrZUghSt03vuCKn4GQ.png" /><figcaption>link project : <a href="https://gh.io/petspotr">Click here</a></figcaption></figure><p>จะบอกว่าใครมา event มีของแจกด้วยละ นี้คือ examples</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/540/1*dOoQM9K7oJOuA7_TLtoz_A.jpeg" /></figure><p>แล้วเจอกันในงานรอบต่อๆไปนะค้าบทุกคน ไปละ ฟิ้วววว~~~~~</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7afd0d5fcbe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MVC Web Application Framework คืออะไร? ก็เธอมันน่ารักเกินต้านขนาดนี้]]></title>
            <link>https://medium.com/@voraguns/mvc-web-application-framework-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B8%81%E0%B9%87%E0%B9%80%E0%B8%98%E0%B8%AD%E0%B8%A1%E0%B8%B1%E0%B8%99%E0%B8%99%E0%B9%88%E0%B8%B2%E0%B8%A3%E0%B8%B1%E0%B8%81%E0%B9%80%E0%B8%81%E0%B8%B4%E0%B8%99%E0%B8%95%E0%B9%89%E0%B8%B2%E0%B8%99%E0%B8%82%E0%B8%99%E0%B8%B2%E0%B8%94%E0%B8%99%E0%B8%B5%E0%B9%89-fb7562f8602d?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/fb7562f8602d</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Fri, 26 May 2023 09:21:52 GMT</pubDate>
            <atom:updated>2023-05-26T09:38:53.645Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Z6N5WUVqhBOYIKoG8rqSgg.png" /></figure><p>สวัสดีครับ เมื่อไม่กี่วันที่ผ่านมา ตรงกับวันเกิดผมพอดี แล้วช่วงนี้ก็กำลังศึกษาเรื่อง “MVC Web Application Framework” อยู่ด้วยว่ามันเป็นยังไง</p><p>โดยทั่วไปแล้ว ถ้าถามคนทั่วไปว่า “MVC Web Application Framework คืออะไร?” เขาก็จะตอบว่า Model-View-Controller ซึ่งก็ไม่ได้ผิดอะไร แต่มันไม่ค่อยรู้เรื่อง มาดูกันว่าอธิบายยังไง เวอชั่นผู้เชี่ยวชาญมือหนึ่ง</p><p><strong>MVC Web Application Framework คืออะไรอะน้อง?</strong></p><p>คืออย่างงี้คับพี่ ก่อนหน้าที่จะมี MVC Application Framework <br>เขาจะทำ Web โดยเน้นที่ File เป็นหลัก เช่น index.html / login.jsp / payment.jsp</p><p>แต่พอมี MVC Web Application Framework แล้ว<br>จะเขียน Program ธรรมดา เพื่อไป block การทำงานทั้งหมดเอาไว้<br>แล้วดูว่า จะเรียกใช้งาน Function ไหนดี</p><p>ประโยชน์ของ MVC Web Application Framework แทบจะไม่มี<br>หรือมีเพียงอย่างเดียวเลยคือ <strong>Unit testing</strong></p><p>ปล. Unit testing คือการทดสอบแต่ละฟังก์ชั่นย่อยๆ</p><p><strong>ละมันยังไงอะ?</strong></p><p>คือ MVC Web Application Framework เกิดขึ้นมาในปี 2003</p><p>จะเขียน Program ธรรมดา เพื่อ Block การทำงานทั้งหมดเอาไว้ (Intercept)<br> และดูว่าจะเรียกใช้งาน Function ไหน</p><p>กำเนินที่ Spring MVC แต่ไม่ได้รับความนิยม<br>เพราะมีคำถามเกิดขึ้นมากมาย เช่น สร้างมาทำไม Doctor<br>มันจะมีปัญหา Bottleneck รึป่าว<br>วิธีเดิมก็ดีอยู่แล้ว<br>ซึ่ง Doctor ขี้เกียจตอบ</p><p>จากนั้น มีชายคนหนึ่งชื่อ David H Hansson หรือ <a href="http://dhh.dk/">dhh.dk</a><br>ได้สร้าง Framework ที่ชื่อว่า Rails<br>ทำงานเหมือน Spring MVC แต่เป็นภาษา Ruby<br>ปัญหา Bottleneck หรือปัญหาทั้งหลายแหล่<br>คนไม่สนใจ ไม่รู้ทำไมเหมือนกัน</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0V3zNSIe_DAC60FWfrdglA.jpeg" /><figcaption>รูปคุณ <a href="https://dhh.dk/">David H Hansson</a></figcaption></figure><p>ตัวอย่างชื่อ MVC Web Application Framework แต่ละภาษา</p><pre>Language                    MVC Web Application Framework<br>Java                                Springg MVC<br>Ruby                                   Rails<br>Python                                 Django<br>PHP                             Laravel / CodeIgniter</pre><p>Concept ของ David Hasson มีอยู่ 2 อย่าง<br>1. DRY — Don’t Repeat Yourself อย่าทำอะไรซ้ำเดิมๆ<br>2. Convention over Configuration</p><p><strong>Convevntion over Configuration คืออะไร?</strong></p><p>กฎหมายประเทศไทย มาตรา 5 วรรคที่ 2<br>ถ้าไม่มีบทบัญญัติที่ประกาศไว้ ให้ทำตามประเพณีที่ทำต่อกันมา</p><p>มันคือหลักการที่ใช้สร้าง Maven Project</p><p>ตัวอย่าง Project และ Code</p><pre>java-mvc-webapplication<br>&#39;-- pom.xml<br>    &#39;-- code<br>    &#39;  &#39;-- app<br>    &#39;      &#39;-- Start.java<br>    &#39;      &#39;-- Common.java<br>    &#39;      &#39;-- BranchController.java<br>    &#39;-- test<br>    &#39;  &#39;-- app<br>    &#39;     &#39;-- Test.java<br>    &#39;-- web<br>        &#39;-- public<br>        &#39;  &#39;-- index.html<br>        &#39;-- templates<br>            &#39;-- sample.html<br>            &#39;-- test.html</pre><p>File : pom.xml</p><pre>&lt;project&gt;<br>    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;<br>    &lt;groupId&gt;com.iamvoragun&lt;/groupId&gt;<br>    &lt;artifactId&gt;java-mvc-webapplication&lt;/artifactId&gt;<br>    &lt;version&gt;beta&lt;/version&gt;<br>    <br>    &lt;properties&gt;<br>        &lt;maven.compiler.source&gt;20&lt;/maven.compiler.source&gt;<br>        &lt;maven.compiler.target&gt;20&lt;/maven.compiler.target&gt;<br>    &lt;/properties&gt;<br>    <br>    &lt;build&gt;<br>        &lt;sourceDirectory&gt;code&lt;/sourceDirectory&gt;<br>        &lt;testSourceDirectory&gt;test&lt;/testSourceDirectory&gt;<br>        &lt;resources&gt;<br>            &lt;resource&gt;<br>                &lt;directory&gt;web&lt;/directory&gt;<br>            &lt;/resource&gt;<br>        &lt;/resources&gt;<br>    &lt;/build&gt;<br>    <br>    &lt;dependencies&gt;<br>        &lt;dependency&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-starter-webflux&lt;/artifactId&gt;<br>            &lt;version&gt;RELEASE&lt;/version&gt;<br>        &lt;/dependency&gt;<br>        <br>        &lt;dependency&gt;<br>            &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;<br>            &lt;artifactId&gt;spring-boot-starter-freemarker&lt;/artifactId&gt;<br>            &lt;version&gt;RELEASE&lt;/version&gt;<br>        &lt;/dependency&gt;<br>    &lt;/dependencies&gt;<br>&lt;/project&gt;</pre><p>File : java-mvc-webapplication/code/app/Start.java</p><pre>package app;<br><br>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br>import org.springframework.context.ApplicationContext;<br>import org.springframework.stereotype.Indexed;<br>import org.springframework.stereotype.Service;<br><br>class Start {<br>    public static void main(String[] args) {<br>        ApplicationContext context;<br>        context = SpringApplication.run(Setup.class);<br>    }<br>}<br><br>@SpringBootApplication<br>class Setup {<br>    <br>}</pre><p>File : java-mvc-webapplication/code/app/Common.java</p><pre>package app;<br><br>import org.springframework.stereotype.Controller;<br>import org.springframework.ui.Model;<br>import org.springframework.web.bind.annotation.RequestMapping;<br><br>@Controller<br>class Common {<br>    <br>    @RequestMapping(&quot;/&quot;)<br>    String m1() {<br>        return &quot;sample&quot;;<br>    }<br>    <br>    @RequestMapping(&quot;/staff&quot;)<br>    String m2(Model m) {<br>        m.addAttribute(&quot;location&quot;, &quot;Bangkok&quot;);<br>        String[] data = { &quot;David B&quot;, &quot;Michael O&quot;, &quot;Frank L&quot;, &quot;David J&quot; };<br>        m.addAttribute(&quot;staff&quot;, data);<br>        return &quot;test&quot;;<br>    }<br>}</pre><p>File : java-mvc-webapplication/code/app/BranchController.java</p><pre>package app;<br><br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.stereotype.Repository;<br>import org.springframework.web.bind.annotation.RequestMapping;<br>import org.springframework.web.bind.annotation.RestController;<br><br>@RestController<br>class BranchController {<br>       <br>    @Autowired<br>    BranchConnector storage;<br>    //BranchConnector b = context.getBean(BranchConnector.class);<br>    <br>    @RequestMapping(&quot;/api/list-branch&quot;)<br>    BranchDetail[] m1() {<br>        return storage.getAll();<br>    }<br>    <br>}<br><br>class BranchDetail {<br>    public String name;<br>    public double area;<br>}<br><br>@Repository<br>class BranchConnector {<br>    <br>    BranchDetail[] data;<br>    <br>    BranchConnector() {<br>        data = new BranchDetail[3];<br>        data[0] = new BranchDetail();<br>        data[0].name = &quot;New York&quot;;<br>        data[0].area = 180.0;<br>        <br>        data[1] = new BranchDetail();<br>        data[1].name = &quot;London&quot;;<br>        data[1].area = 150.0;<br>        <br>        data[2] = new BranchDetail();<br>        data[2].name = &quot;Atlanta&quot;;<br>        data[2].area = 200.0;<br>    }<br>    <br>    BranchDetail[] getAll() {<br>        return data;<br>    }<br>}</pre><p>File : web/templates/sample.html</p><pre>&lt;button&gt;Love&lt;/button&gt;</pre><p>File : web/templates/test.html</p><pre>Welcome to ${location}<br>&lt;#list staff as x&gt;<br>    &lt;br&gt;${x}<br>&lt;/#list&gt;</pre><p>File : web/application.properties</p><pre>server.port = 25000<br>spring.freemarker.suffix = .html</pre><p>ตัวอย่างผลลัพธ์</p><ul><li><a href="http://localhost:25000/">http://localhost:25000/</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IJ6dbNN65TOnDxcwB2Chrw.png" /><figcaption>ตัวอย่าง Web Application</figcaption></figure><ul><li><a href="http://localhost:25000/staff">http://localhost:25000/staff</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lgHe_ghCqagWD17FOxFwGA.png" /><figcaption>ตัวอย่าง Web Application</figcaption></figure><ul><li><a href="http://localhost:25000/api/list-branch">http://localhost:25000/api/list-branch</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hZZ4CXTVe5QuqliSM-6p_w.png" /><figcaption>ตัวอย่าง Web Service</figcaption></figure><p>เป็นยังไงกันบ้างครับ นี้เป็นเพียงตัวอย่าง ถ้าอยากศึกษาเพิ่มเติม ไปที่นี้ได้เลยครับ</p><ul><li><a href="https://spring.io/guides/gs/serving-web-content/">Getting Started | Serving Web Content with Spring MVC</a></li><li><a href="https://spring.io/quickstart">Quickstart</a></li><li><a href="https://spring.io/guides">Guides</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fb7562f8602d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dependency Injection คืออะไร? ไม่ยากหรอก จริงจริ๊งงงงง]]></title>
            <link>https://medium.com/@voraguns/dependency-injection-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3-%E0%B9%84%E0%B8%A1%E0%B9%88%E0%B8%A2%E0%B8%B2%E0%B8%81%E0%B8%AB%E0%B8%A3%E0%B8%AD%E0%B8%81-%E0%B8%88%E0%B8%A3%E0%B8%B4%E0%B8%87%E0%B8%88%E0%B8%A3%E0%B8%B4%E0%B9%8A%E0%B8%87%E0%B8%87%E0%B8%87%E0%B8%87%E0%B8%87-f4249d0ca1bc?source=rss-5aec77812b18------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4249d0ca1bc</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Voragun Supawong]]></dc:creator>
            <pubDate>Thu, 04 May 2023 15:04:32 GMT</pubDate>
            <atom:updated>2023-05-04T15:04:32.154Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*E5wpKUZuQiqRmQNeS2BG0g.png" /></figure><p>สวัสดีครับทุกท่าน ตอนที่พวกเรานั้นทำงานเขียนโปรแกรมนั้น อาจจะเคยได้ยินคำว่า “Dependency injection” ว่าแต่ว่ามันคืออะไร? ผมก็เลยไปหาข้อมูลมา ทีนี้ถ้าจะเขียนโดยละเอียดเนี่ย แล้วอธิบาย บอกเลยว่ามันยากกกก ในบทความนี้ผมอยากอธิบายในฉบับเข้าใจแบบง่ายๆและรู้เรื่อง ว่าเป็นยังไง คืออะไร? งั้นมาเริ่มกันเลออ</p><h3>Dependency Injection คืออะไร?</h3><p>บางคนเรียกว่า Wiring แปลว่า เอาสายไฟต่อกันเป็นวงจร<br>บางคนเรียกว่า Welding แปลว่า เชื่อมเหล็กหรือโลหะเข้าด้วยกัน</p><p>Dependency Injection คือการ Setup Address ของ Instance ที่จะเห็นได้ชัดคือ เมื่อเราใช้ Spring Bean แล้วต้องการระบุ Address ของตัวที่เราต้องการ</p><p>ใน Spring มี Annotation หลายตัวที่ทำ Dependency Injection ได้<br>แต่ตัวที่ใช้มากที่สุดคือ @Autowired @Qualifier</p><p>ปล. Spring Beans คือตัวที่เอาไว้จัดการ instance (คนสร้างเขาอยากหลีกเลี่ยงการใช้คำว่า Object)</p><p><strong>ตัวอย่าง Code</strong></p><pre>package web;<br><br>import org.springframework.beans.factory.annotation.Autowired;<br>import org.springframework.beans.factory.annotation.Qualifier;<br>import org.springframework.boot.SpringApplication;<br>import org.springframework.boot.autoconfigure.SpringBootApplication;<br>import org.springframework.context.ApplicationContext;<br>import org.springframework.context.annotation.AnnotationConfigApplicationContext;<br>import org.springframework.context.annotation.Bean;<br>import org.springframework.context.annotation.Configuration;<br>import org.springframework.stereotype.Component;<br>import org.springframework.web.bind.annotation.RequestMapping;<br>import org.springframework.web.bind.annotation.RestController;<br><br>class Start {<br>    public static void main(String[] args) {<br>        ApplicationContext context;<br>        context = SpringApplication.run(Setup.class);<br>        Brand b = context.getBean(Brand.class);<br>        System.out.println(b.name);<br>        //SpringApplication.exit(context);<br>    }<br>}<br>@SpringBootApplication<br>class Setup {  <br>    @Bean(&quot;team1&quot;) StaffReader createT1() {<br>        StaffReader r = new StaffReader();<br>        r.list = new String[] { &quot;Bill&quot;, &quot;James&quot;, &quot;Jeff&quot; };<br>        return r;<br>    }<br>    @Bean(&quot;team2&quot;) StaffReader createT2() {<br>        StaffReader r= new StaffReader();<br>        r.list = new String[] { &quot;Anna&quot;, &quot;Stephanie&quot;, &quot;Jan&quot; };<br>        return r;<br>    }<br>}<br><br>@RestController<br>class StaffService {  <br>    @Autowired @Qualifier(&quot;team1&quot;) StaffReader r1; // Dependency injection<br>    @RequestMapping(&quot;/staff-team1&quot;)<br>    String[] show() {<br>        return r1.list;<br>    }<br>}<br><br>class StaffReader {<br>    String[] list;<br>}<br><br>@Component<br>class Brand {<br>    String name = &quot;iCoffee&quot;;<br>    int year = 2018;<br>}</pre><p><strong>ตัวอย่างผลลัพธ์</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HE-ot9HpX3dP2zQkvkv8nQ.png" /><figcaption>ผลลัพธ์ที่ได้</figcaption></figure><p><strong>ความหมายแต่ละ @(Annotation)</strong></p><pre>@Bean         ใช้เพื่อสร้าง Beans<br>@Autowired    ใช้เพื่ออ้างอิง Beans<br>@Qualifier    ใช้เมื่อต้องการระบุ Address หรือชื่อของ Beans<br>@Component    ใช้กับ Class เพื่อสร้าง Bean  <br>@SpringBootApplication  ใช้เพื่อบอกว่านี้คือ SpringBoot<br>@RestController นิยมใช้กับ Web Service จะทํา Web Application <br>                ก็ได้แต่ใช้ทํา Web Service จะง่ายกว่า<br>@RequestMapping  Handle request</pre><p>เป็นยังไงกันบ้างครับ อันนี้จะเป็นตัวอย่างที่แสดงการใช้งาน ถ้าชอบ กด Follow ได้เลยนะครับ จะมีบทความต่อๆไปให้อ่านกันครับ</p><p>ถ้าอยากเรียนรู้เพิ่มเติมแบบละเอียดยิ้บ ไปที่นี้เลย</p><ul><li><a href="https://spring.io/">Home</a></li><li><a href="https://spring.academy/courses/spring-boot">Spring Boot - Spring Academy</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f4249d0ca1bc" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>