Tuesday, 29 April 2025

Oracle Database 11g Installation on Oracle Linux 7.7

Oracle Database 11g Installation on Oracle Linux 7.7

Step 1.

            Connect linux as root user

            Extract Java jdk to the any location I m Extractiong at  /home/admin/Downloads/DB_11g Linux/jdk

            By the following command

tar -xzvf "/home/admin/Downloads/DB_11g Linux/jdk/jdk-7u76-linux-x64.tar.gz" -C "/home/admin/Downloads/DB_11g Linux/jdk" and press enter

After extracting You will see the folder at that location

 

 

 

 

Now run the Command to move this extracted folder to the /opt Directory

sudo mv /home/admin/Downloads/jdk1.7.0_76 /opt/

Now run the Commands

export JAVA_HOME=/opt/jdk1.7.0_76

 

export PATH=$JAVA_HOME/bin:$PATH

 

after run that commands check the java version by following command

Java –version

Now You will see

 

Now add groups named as

oinstall

dba

 

groupadd oinstall

 

groupadd dba

 

now add a user with name as oracle and assign it to these groups

 

useradd –g  oinstall –G dba oracle

 

Now create the password for user oracle

 

Passwd oracle

Admin123

Admin123

 

 

Now assign Read Rights to home directory

Chown –R oracle:oinstall /home

Then  run the following commands as Root User

 

sudo yum-config-manager --enable ol7_MODRHCK/x86_64

sudo yum-config-manager --enable ol7_UEKR3/x86_64

sudo yum-config-manager --enable ol7_UEKR3_OFED20/x86_64

sudo yum-config-manager --enable ol7_UEKR4/x86_64

sudo yum-config-manager --enable ol7_UEKR4_OFED/x86_64

sudo yum-config-manager --enable ol7_UEKR4_archive/x86_64

sudo yum-config-manager --enable ol7_UEKR5/x86_64

sudo yum-config-manager --enable ol7_UEKR5_RDMA/x86_64

sudo yum-config-manager --enable ol7_UEKR5_archive/x86_64

sudo yum-config-manager --enable ol7_addons/x86_64

sudo yum-config-manager --enable ol7_kvm_utils/x86_64

sudo yum-config-manager --enable ol7_latest/x86_64

sudo yum-config-manager --enable ol7_latest_archive/x86_64

sudo yum-config-manager --enable ol7_optional_archive/x86_64

sudo yum-config-manager --enable ol7_optional_latest/x86_64

sudo yum-config-manager --enable ol7_security_validation/x86_64

sudo yum-config-manager --enable ol7_u0_base/x86_64

sudo yum-config-manager --enable ol7_u1_base/x86_64

sudo yum-config-manager --enable ol7_u2_base/x86_64

sudo yum-config-manager --enable ol7_u3_base/x86_64

sudo yum-config-manager --enable ol7_u4_base/x86_64

sudo yum-config-manager --enable ol7_u5_base/x86_64

sudo yum-config-manager --enable ol7_u6_base/x86_64

sudo yum-config-manager --enable ol7_u7_base/x86_64

 

Change root user to oracle by the following command

su oracle

then

[oracle@db11g ~]$ cd /home/admin/Downloads/db11g/database

Then

[oracle@db11g ~] ./runInstaller

 

Now we are on this dialog

 

Un check I wish … and press next

Then

 

 

 

 

 

 

 

 

 

 

 

 

 

Now Run This

export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_1

export PATH=$ORACLE_HOME/bin:$PATH

export ORACLE_SID=orcl

 

Then Stop and Disabled Firewall

sudo systemctl stop firewalld

sudo systemctl disable firewalld

Monday, 14 April 2025

Thirmal Invoice Print Apex

 DECLARE

    CURSOR c_sale_master IS

        SELECT 

            m.SALE_ID,

            TO_CHAR(m.SALE_DATE, 'DD-MON-YYYY') AS SALE_DATE,

            m.CUSTOMER_NAME

        FROM SALE_MASTER m

        WHERE m.SALE_ID = :P1_SALE_ID;


    CURSOR c_sale_detail IS

        SELECT 

            d.PRODUCT_NAME,

            d.QUANTITY,

            d.PRICE,

            d.AMOUNT

        FROM SALE_DETAIL d

        WHERE d.SALE_ID = :P1_SALE_ID;


    v_total   NUMBER := 0;

    v_net     NUMBER := 0;

    v_cash    NUMBER := 200; -- Example cash received

    v_balance NUMBER := 0;

    v_sr      NUMBER := 1;

BEGIN

    HTP.P('<html><head><style>

        body { font-family: monospace; font-size: 12px; }

        .center { text-align: center; }

        .bold { font-weight: bold; }

        .invoice-box {

            max-width: 300px;

            margin: auto;

            border: 1px solid #000;

            padding: 10px;

        }

        table { width: 100%; border-collapse: collapse; margin-top: 10px; }

        th, td {

            border: 1px solid #000;

            padding: 4px;

            text-align: left;

        }

        .no-border td {

            border: none;

            padding: 2px 4px;

        }

        .summary td {

            font-weight: bold;

        }

        .thankyou {

            margin-top: 20px;

            text-align: center;

            font-size: 13px;

            font-weight: bold;

        }

    </style></head><body>');


    HTP.P('<div class="invoice-box">');

    HTP.P('<div class="center bold">ABC & CO.</div>');

    HTP.P('<div class="center">Example Road Test Street</div>');

    HTP.P('<div class="center">Ph: 123456789</div>');


    -- Master Info

    FOR m IN c_sale_master LOOP

        HTP.P('<table class="no-border" style="margin-top: 10px;">');

        HTP.P('<tr><td><strong>Bill No.:</strong></td><td>' || m.SALE_ID || '</td></tr>');

        HTP.P('<tr><td><strong>Customer:</strong></td><td>' || m.CUSTOMER_NAME || '</td></tr>');

        HTP.P('<tr><td><strong>Date:</strong></td><td>' || m.SALE_DATE || '</td></tr>');

        HTP.P('</table>');

    END LOOP;


    -- Detail Header

    HTP.P('<table>');

    HTP.P('<tr>

            <th>Sr #</th>

            <th>Description</th>

            <th>Qty</th>

            <th>Rate</th>

            <th>Amount</th>

           </tr>');


    -- Detail Rows

    FOR d IN c_sale_detail LOOP

        HTP.P('<tr>

                <td>' || v_sr || '</td>

                <td>' || d.PRODUCT_NAME || '</td>

                <td>' || d.QUANTITY || '</td>

                <td>' || d.PRICE || '</td>

                <td>' || d.AMOUNT || '</td>

              </tr>');

        v_total := v_total + d.AMOUNT;

        v_sr := v_sr + 1;

    END LOOP;


    HTP.P('</table>');


    -- Summary

    v_net := v_total - 100; -- assuming fixed discount

    v_balance := v_net - v_cash;


    HTP.P('<table class="summary" style="margin-top: 10px;">');

    HTP.P('<tr><td>Total Bill</td><td>' || v_total || '</td></tr>');

    HTP.P('<tr><td>Discount</td><td>100</td></tr>');

    HTP.P('<tr><td>Net Bill</td><td>' || v_net || '</td></tr>');

    HTP.P('<tr><td>Cash Receive</td><td>' || v_cash || '</td></tr>');

    HTP.P('<tr><td>COC</td><td>' || v_balance || '</td></tr>');

    HTP.P('</table>');


    -- Thank You Note

    HTP.P('<div class="thankyou">*** Thank You! Visit Again! ***</div>');

    HTP.P('</div>'); -- close invoice box

    HTP.P('</body></html>');

END;


Check Internet Connectivity on Local System

if (!navigator.onLine) {     showOfflineAlert(); } else {     // Set a strict 3-second network timeout threshold     const controller = new ...