How web servers work with the Oracle database

I write this based on my personal experience when trying to make a connection to an Oracle database through php .. but it always appear error messages etc. ..

Assuming I use the appserver for windows

intrigued with this ,finally I'am try to find a solution in the following way

   
1. Download Oracle Instant Client in this link, if done extract the file search and select multiple files that oraociei10.dll, orannzsbb10.dll, oci.dll. Copy the file to c: \ windows \ system32 \
   
2. Change Registry NLS_LANG in a way go to Start -> Run -> Regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> ORACLE -> NLS_LANG, input or Delete Null value .. like the picture below

   
3. On his php_oci8.dll extension on a web server php.ini settings file, by Start -> Run -> php.ini, find and remove (;) to activate the file extension, such as the following picture:
 
   
4. Restart your web server
   
5. Then check php_info (); you, through the following picture you see the following description
 


ok you are ready to work with Oracle database ...^_^

    Codeigniter with oracle

    Now let me show how to make..CI connect with oracle database..
    there are some things we need to prepare

    •   make sure our web server already supports connections to Oracle databases by checking through browser.with create a some *.php file with the contents
    <?;
    phpinfo();
    ?>
     and you will see a description like in the picture below


    if the information is there then there is ready to work with Oracle database.or if not then you need to set up your web server settings .. see how web servers work with the Oracle database this link


    Connection Parameters

    Not all of the parameters in application/config/database.php are used as one might expect.  Namely, $db[‘default’][‘database’] isn’t used at all.  The value used for $db[‘default’][‘hostname’] depends on whether the Oracle client’s tnsnames.ora file exists and contains information about the database to be used.  If the file exists and is configured for the intended database, this parameter should be set to the symbolic name.  Otherwise, it should be set to a single string of the connection parameters that tnsmames.ora would normally contain.
    An example of connection parameters for the latter case:

    $db['default']['hostname''(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=dbhost.example.com)(PORT=1521))(CONNECT_DATA=(SID=dbsid)))';
    $db['default']['username''dbuser';
    $db['default']['password''dbpassword';
    $db['default']['database'''// not used by this Oracle driver
    $db['default']['dbdriver''oci8'


    In this case, the appropriate values need to be set for the HOST, PORT, and SID keywords in the hostname parameter.

    Different queries return the same results

    If you run two different queries in the same script you can run into the problem, that both queries return the same result.

    Example

    $this->load->database();
    $query1 $this->db->query("SELECT * FROM table1");
    $result1 $query1->result(); // Returns Value of table 1
    $query1->free_result();

    $query2 $this->db->query("SELECT * FROM table2");
    $result2 $query2->result(); // Also returns Value of table 1 

    Solution

    In file codeigniter/database/driver/oci8/oci8_driver.php you should change the lines

    function _set_stmt_id($sql)
        
    {
            
    if ( ! is_resource($this->stmt_id))
            
    {
                $this
    ->stmt_id ociparse($this->conn_id$this->_prep_query($sql));
            
    }
        } 
     
    to


    function _set_stmt_id($sql)
        
    {
            $this
    ->stmt_id ociparse($this->conn_id$this->_prep_query($sql));
        



    happy CI..^_^

      Konfik ketika membuat koneksi ke data source database baru

      Langsung aja..barang kali rekan-rekan menemukan masalah yang sama,yaitu ketika saya hendak membuat koneksi ke database melalui data source muncul error sebagai berikut:
      Could not load type 'Microsoft.VisualStudio.DataDesign.SyncDesigner.SyncFacade.SyncManager' from assembly Microsoft.VisualStudio.DataDesign.SyncDesigner.DslPackage, Version = 9.0.0.0, Culture=neutral, PublicKey Token=b03f5f7f11d50a3a
      Masalah ini dikarenakan..
      • Pesan kesalahan pertama adalah disebabkan karena instalasi tidak lengkap Service Pack 1 untuk Visual Studio 2008 yang dapat mengakibatkan ketidakcocokan antara versi file Microsoft.VSDesigner.dll dan Microsoft.VisualStudio.DataDesign.SyncDesigner.DslPackage.dll. Yang pertama adalah update ke Service Pack 1 versi dan yang terakhir akan memiliki versi RTM. Masalah ini lebih cenderung terjadi di lingkungan di mana Anda menginstal edisi yang berbeda dari sisi Visual Studio berdampingan dan anda meng-upgrade satu edisi dan bukan yang lain. Misalnya, Anda memiliki instalasi versi rilis Visual Studio Express dan Visual Studio Team Suite rilis edisi sisi diinstal oleh sisi dan kemudian anda hanya upgrade edisi ekspres untuk Service Pack 1 tapi tinggalkan edisi Tim di tingkat RTM, Anda akan mendapatkan yang pertama kesalahan dibahas dalam bagian gejala
      • Pesan kesalahan kedua terjadi ketika Microsoft Sinkronisasi Layanan untuk ADO.net tidak terpasang.
      Solusinya..
      • Untuk mengatasi pesan kesalahan pertama, menginstal Service Pack 1 untuk semua Visual Studio 2008 edisi pada sistem terpengaruh.
      download link.. Microsoft Visual Studio 2008 Service Pack 1 (Installer).iso format. artikel ini berdasar pengalaman saya pribadi..semoga bermanfaat ref. solusi http://support.microsoft.com/kb/2001115