oci

How to convert XML to OCI-Lob Object?

主宰稳场 提交于 2019-12-31 05:43:11
问题 I have a XML as below - <?xml version="1.0"?> <step number="9"> <s_name>test</s_name> <b_sel>123456</b_sel> <b_ind>7</b_ind> </step> I want this to be converted to OCI-Lob object as below - OCI-Lob Object ( [descriptor] => Resource id #130 ) I have looked for almost all the threads related to OCI-Lob in PHP but didn't get the information which I am looking for. Hope you understand my question. Any suggestions on this would be appreciated. Thank you. 回答1: To get OCI-Lob Object We do need

INSERT of 10 million queries under 10 minutes in Oracle?

浪子不回头ぞ 提交于 2019-12-30 01:58:07
问题 I am working on a file loader program. The purpose of this program is to take an input file, do some conversions on its data and then upload the data into the database of Oracle. The problem that I am facing is that I need to optimize the insertion of very large input data on Oracle. I am uploading data into the table, lets say ABC. I am using the OCI library provided by Oracle in my C++ Program. In specific, I am using OCI Connection Pool for multi-threading and loading into ORACLE. (http:/

Call to undefined function oci_connect, php_oci8_11g.dll , windows 10, php5.6.24

血红的双手。 提交于 2019-12-29 09:29:13
问题 I have a simple php script: <?php $DB = '//10.11.201.170:1521/XE'; $DB_USER = 'BIOTPL'; $DB_PASS = 'biotpl'; $DB_CHAR = 'AL32UTF8'; $conn = oci_connect($DB_USER, $DB_PASS, $DB, $DB_CHAR); if($conn) { echo "Successfully connected to Oracle.\n"; OCILogoff($c); //$statement = oci_parse($conn, 'select 1 from dual'); //oci_execute($statement); //$row = oci_fetch_array($statement, OCI_ASSOC+OCI_RETURN_NULLS); } else { $err = OCIError(); echo "Connection failed." . $err[text]; } ?> When I run it

Access a varray type defined inside a package using oci_new_collection

ぐ巨炮叔叔 提交于 2019-12-25 14:04:53
问题 Hello I am trying to pass in varrays from PHP to Oracle. I am using OCI8 and have earlier worked with varrays as arguments in stored procedures, and on compilation the types of those varrays are created. So while making collection instance on the PHP end, we can directly mention the collection name. Ex: $my_coll = oci_new_collection($c, 'MY_ARRAY'); where MY_ARRAY would be the varray type I had declared in the Oracle instance. create or replace type MY_ARRAY as varray(100) of varchar2(20); So

Issue in OCI/PHP using oci_num_rows

人盡茶涼 提交于 2019-12-25 02:47:22
问题 Why would the below show 0 results returned , when the exact same query via SQL returns 228? error_reporting(E_ALL); ini_set('display_errors', 1); include("connection.php"); if($conn){ $stid = oci_parse($conn, "SELECT COUNT(CustomerNo) FROM Customers"); oci_execute($stid); echo oci_num_rows($stid) . " rows returned.<br />\n"; oci_free_statement($stid); oci_close($conn); } 回答1: You have to fetch the results and then call oci_num_rows. As described on the PHP manual for oci_num-rows - Note:

Connecting to Oracle with olog() at specific hostname:port

穿精又带淫゛_ 提交于 2019-12-25 01:54:08
问题 The C-program I'm writing tries to connect to Oracle database with olog() : olog(&lda, (ub1 *)hda, dbparam_keys[DbUser].value, -1, dbparam_keys[DbPassword].value, -1, NULL, -1, (ub4)OCI_LM_DEF); This fails with ORA-12545, because I specify neither the server's hostname, nor the port number anywhere. I do not, because I do not know, how to do that... The "demos" bundled with the client seem to presume a valid tnsnames.ora -- is having that file mandatory for OCI API, or a can a client program,

PHP7.0-FPM with Docker : Unable to load dynamic library OCI8

丶灬走出姿态 提交于 2019-12-25 00:39:21
问题 I have created a Docker Image with PHP7.0-FPM and Apache 2.4. I have installed InstantClient 12.2 (basic + sdk) and I have installed oci8 like this : RUN echo "instantclient,/usr/lib/oracle/12.2/instantclient"| pecl install oci8 && \ echo "extension=oci8.so" > /etc/php/7.0/mods-available/oci8.ini && \ ln -s /etc/php/7.0/mods-available/oci8.ini /etc/php/7.0/fpm/conf.d/20-oci8.ini I don't know why, but I am getting this warning when I (re)start php7.0-fpm : # service php7.0-fpm restart *

Php.exe in CMD throws “Call to undefined function oci_connect()”

时光毁灭记忆、已成空白 提交于 2019-12-24 17:53:28
问题 I have XAMPP installed with PHP 5.2.6 in Windows XP. In my php.ini I have the next lines uncommented: extension=php_oracle.dll extension=php_oci8.dll I have a file with something like this: <?php $conn = oci_connect('hr', 'welcome', 'localhost/XE'); ?> But when I try call to php.exe through cmd to that file, the console always give me an error: Fatal Error: Call to undefined function oci_connect() In my localhost I have no problem with this. 回答1: Probably, you're not looking at the right php

Does Oracle OCI function OCIPasswordChange encrypt transmitted password

自作多情 提交于 2019-12-24 05:59:06
问题 I am working on an application that uses Oracle OCI to connect to the Oracle database server. The application allows the user to change their Oracle password and uses Alter User xxx Identified By to perform this. However, this transmits the user's new password in clear text over the network (we cannot use Oracle SSL to encrypt network traffic). I have found that Oracle recommends using the PASSWORD command in SQLPlus rather than ALTER USER, one reason being that the new password encrypted.

Does Oracle OCI function OCIPasswordChange encrypt transmitted password

僤鯓⒐⒋嵵緔 提交于 2019-12-24 05:59:02
问题 I am working on an application that uses Oracle OCI to connect to the Oracle database server. The application allows the user to change their Oracle password and uses Alter User xxx Identified By to perform this. However, this transmits the user's new password in clear text over the network (we cannot use Oracle SSL to encrypt network traffic). I have found that Oracle recommends using the PASSWORD command in SQLPlus rather than ALTER USER, one reason being that the new password encrypted.