oci

Oracle, PDO_OCI vs OCI8

我怕爱的太早我们不能终老 提交于 2019-12-18 04:43:12
问题 The company I work for currently uses some basic functions to abstract the OCI libraries as a means for DB connectivity. We're considering switching to PHP's PDO object, but from some quick searches, it looks like the Oracle driver is a bit less mature than the other PDO drivers. I would appreciate some pro/cons for PDO/oci8 from anyone who has used it in a production environment. Thanks! 回答1: It seems to me that Oracle is not interested in developing a driver for PDO it's developing it's own

can not load oci8 -> Fatal error: Call to undefined function oci_connect()

夙愿已清 提交于 2019-12-17 20:27:14
问题 I want to connect to my oracle database, but i have a problem with function oci_connect. i have tried to uncomment this: extension=php_oci8.dll but, still have an error : Fatal error: Call to undefined function oci_connect() in C:\xampp\htdocs\testing\db.php on line 71 But, when i check in phpinfo(), oci8 still not loaded and i can not connect to my oracle database. i already restart my apache. How i fix this problem ? Canyou help me? Thank you.. 回答1: In php.ini ensure that you enable the

bulk insert using OCI

£可爱£侵袭症+ 提交于 2019-12-14 03:49:28
问题 I am currently inserting records one-by-one into a table from C++ code using OCI. The data is in a hashmap of structs, I iterate over the elements of the map, binding the attributes of the struct to the columns of a record in the table (e.g. define insert query use OCIBindByname( ) for all the columns of record iterate over map assign bind variables as attributes of the struct OCIStmtExecute end This is pretty slow, so I'd like to speed up by doing a bulk insert. What is a good way to do this

ora-01406 Error when fetching values using OCI

我只是一个虾纸丫 提交于 2019-12-13 00:49:15
问题 This occurs when fetching values which have a max length of 50, to a buffer which could only hold 30 chars. I've already looked up the error and found a possible solution, which is to expand the size of the buffer which the value is bound to. The problem is, this occurs only in some of our systems and not in others. Does the Oracle version have anything to do with this? If so, what is the version in which this error has been changed? The Oracle versions we use are 10.2.0.1 and 10.2.0.3 回答1:

PHP OCI8 extensions not working with PHP 7 64 bit

一曲冷凌霜 提交于 2019-12-12 17:04:35
问题 I have installed APACHE 2.4 x64 and PHP7 x64 and download PHP OCI 64bit libraries but the problem is that whenever I run PHP script from cli it says PHP Startup: Unable to load dynamic library 'E:\software\server\php-7.0.11-Win32-VC14-x64\ext\php_oci8_11g.dll' - %1 is not a valid Win32 application Also when I invoke the webapplication from URL it says Call to undefined function oci_pconnect() The OCI extension I downloaded are also 64bit. Here is the link: http://windows.php.net/downloads

Setting OS User with Oracle Call Interface (OCI)

北战南征 提交于 2019-12-12 04:42:52
问题 I'm trying to change the OS User that is passed to Oracle during database connection set up in golang oracle oci-8 driver. This is in a similar way to setting the v$session.osuser in the Java JDBC drivers. I'm trying to modify mattn's go-oci8 oracle driver so I can change the os user value on the fly. I've tried adding conn.attrs.Set("os_user", "test_os_user") in the open method. I've trawled through the oci docs and I think I might need to set OCI_ATTR_CLIENT_IDENTIFIER but I can work out if

Oracle instant client status

六眼飞鱼酱① 提交于 2019-12-12 04:24:46
问题 I saw some presentations about a very promising product "Oracle Instant Client". Could you tell me what is the status of this product? Is it really used? How is the support from Oracle? It seems to be kind of equivalent to the thin driver for Java. Is it really something as simple as unzip, modify 1 or 2 environment variables and run your client application? http://www.oracle.com/technetwork/database/features/instant-client/index-100365.html http://www.dbatoolz.com/t/installing-oracle

Filling a string buffer when using Ocilib

无人久伴 提交于 2019-12-11 23:29:19
问题 I'm using Ocilib to perform a bulk insert on a Oracle database but I'm having some trouble while filling a string buffer. The documentation says: For string/RAW arrays, the input array MUST BE a contiguous block of data and not an array of pointers. So to bind an array of 10 elements for a varchar2(30) column, binded variable must be a like array[10][31] And a sample proceeds to fill a buffer like this: ... char tab_str[1000][21]; ... OCI_BindArrayOfStrings(st, ":s", (char*) tab_str, 20, 0);

PHP-OCI Call Stored Procedure with parameters

僤鯓⒐⒋嵵緔 提交于 2019-12-11 22:53:33
问题 Stored Procedure: parentchildhrs number(7,0); childhours number(7,0); begin COMBINED_HOURS(122,parentchildhrs,childhours); end; The above when executed via Oracle SQL Developer outputs the correct expected value which are hours. Output below CHILD HOURS 50 parent task id 122 parentchild HOURS 100 Now when I call with PHP-OCI, it outputs nothing. $taskID = 122; $parent_hours = ''; $child_hours = ''; $procedure = "BEGIN TASK_COMBINED_CHILD_HRS(:task_id, :parent_child_hours, :child_hours); END;"

How to connect from php to Oracle DB 12c?

≯℡__Kan透↙ 提交于 2019-12-11 15:46:12
问题 I am using XAMPP v3.2.2 and I am trying to connect from PHP to Oracle database 12c. I have already commented out the extension php_oci8_12c.dll in php.ini, restarted Apache, and installed Oracle instantclient_12_2 32bit. However, I am getting this error: Fatal error: Uncaught Error: Call to undefined function oci_connect() 回答1: Follow instructions for XAMPP v3.2.2 and Oracle database 12c config. Download instantclient_12_2 and unzip to c:\instantclient_12_2 (make sure your xamp and