oracle

Oracle Xml Generate node null Help

Hi; My Procedures SELECT dbms_xmlgen.getxml('select * from '||i_tablename) into xml_data from dual; doc := DBMS_XMLDOM.NewDOMDocument(xml_data); DBMS_XMLDOM.WRITETOFILE(doc, 'XML_DIR/'||v_tablename); My Table ID Name SAL HIREDATE DEPTNO E_MAIL 1 xyz 23 01-JAN-00 2 [email protected] 2 - - - 23 - - - - - - - - - - [email protected] xml out...

image upload problem

I am writting the code to upload file on oracle as BLOB but while saving that file its giving me the exception java.sql.SQLException: ORA-01460: unimplemented or unreasonable following are the functions to convert my blob type to byteArray private byte[] convertToByteArray(Blob fromBlob) { ByteArrayOutputStream baos = new ByteArr...

crontab oracle problem in linux

I created an app which is need to run in linux started by crontab. An error happened when it tried to connect oracle database: it returned SQLO_INVALID_DB_HANDLE. But if started it manually everything is okay. I bet there are no path-related mistakes here, because everything goes well except the connection to the Oracle database. O...

How to rename an Oracle procedure

Is there a way to rename an oracle procedure, without having to drop and recreate the procedure? ...

Why am I seeing invalid URLs with Oracle ADF?

I'm working on a project where we use ADF for partial page rendering. The JARs we're using are: adf-faces-impl-10_1_3_0_4.jar adf-faces-api-10_1_3_0_4.jar So far I've determined that the af:document tag in the page generates a number of JavaScript includes but sometimes these are generated incorrectly. For example, we see these which...

Starting oc4j and oracle using rc start script

I am having a problem with a couple of my linux boot scripts, specifically the ones that start up my Oracle 10g database and my oc4j container. I have used chkconfig to tell Linux to start the database before the container, however, it seems that the container starts before the database which oc4j does not like at all. I can get to my a...

How do you get PL/SQL to parse XML attributes instead of XML elements in Oracle?

Please see PL/SQL snippets below: create table t23 ( field01 number, field02 number, field03 char(1) ); Example Snippet #1 declare x varchar2(2000) := ' <ArrayOfRecords> <Record> <Field01>130</Field01> <Field02>1700</Field02> <Field03>C</Field03> </Record> <Record> <Field01>131</Field01> <Field02>1701</Field02> <...

T-SQL: How can you create a table with SELECT?

In oracle, you can issue: create table foo as select * from bar; What is the equivalent T-SQL statement? ...

Hibernate Computed Criteria Order

I have an Oracle XMLType column that stores the various language specific strings. I need to construct a Hibernate criteria that orders on this column. In order to do this, I need to extract the value with an Oracle function. This criteria is generated automatically by code I have written but I cannot, for the life of me, figure out how ...

Bad performance with OracleDataReader

I'm experiencing some terrible performance with reading data off the OracleDataReader object compared to MS SQL Server. It is almost 10 times slower, which is unacceptable. Below is some sample test code that both tests use. What's the most optimum way to read data from OracleDataReader, is there a better way than shown below? I'm h...

Is SCJP still there?

I want to take the SCJP. But now Oracle has taken over Sun. So is SCJP stopped? Or it is continuing? ...

About SCWCD exam clarification

Hi I am appearing for SCWCD exam in couple of days but as SUN is acquired by Oracle does it affect the exams of SUN like SCJP, SCWCD. Is it same worth of like earlier or does Oracle change it. Thans... ...

displaying results vertically in oracle

I'm enamored with mysql's \G feature which I find very useful when SELECTing from tables with many columns. Is there a similar feature in oracle which displays each column on its own line? How do people normally deal with this issue? ...

oracle in the real world

I've recently started using oracle after a few years of using mysql. I was immediately struck by how verbose oracle is compared to mysql. Four-word queries (like SHOW INDEX IN < table> ) become four-line queries in oracle. My question is: how do real oracle DBAs interact with oracle efficiently. There must be some way to alias commonly...

Oracle Transparent Data Encryption undecrypted access

Can I set up an Oracle Database in a way that all of the following statements are true a) certain columns, potentially all columns are encrypted, so that direct file access to the database file wouldn't allow an attacker to retrieve any records b) the encrypted columns are transparently decrypted for authorized user, where authorizatio...

Executing a dynamic sql statement into a SYS_REFCURSOR

Hi all, is it possible to execute a dynamic piece of sql within plsql and return the results into a sys_refcursor? I have pasted my attempt soo far, but dosnt seam to be working, this is the error im getting throught my java app ORA-01006: bind variable does not exist ORA-06512: at "LIVEFIS.ERC_REPORT_PK", line 116 ORA-06512...

oci_bind_by_name buggy with TO_DATE SQL function

Hi all, I have a strange issue today related to the oci_bind_by_name function I use in PHP. Let me give you a showcase. Here is a table with simple dates: create table test(col1 date); insert into test values(to_date('01/01/2009','DD/MM/YYYY')); insert into test values(to_date('01/01/2019','DD/MM/YYYY')); insert into test values(to_d...

Rails - Special Characters converting to ??? when saving

Just trying to handle special characters into a string field on my model. When it saves to my Oracle database which is set to AL32UTF8 it is converting them to ??? Tiny-mce is hooked up on one of the other fields and I was able to configure it to convert a backwards apostrophe for instance to &lsquo; Just need to decode / convert m...

Configuring implicit typing rules for Oracle

Is it possible to configure the implicit typing rule in Oracle Server (at least version 10g) ? If not a link to the documentation of the rules and how Oracle parameters impact the rules would be great. For exemple when executing this query : SELECT '' AS A FROM DUAL Oracle will report that column A has VARCHAR(0) type on Oracle 10g a...

Errors in database migration scripts

The following databases exist for each internally and independently developed software (web-based or client-server) application for a company: Development (D1 and D2) Integration Staging Testing Production The Production environment is shared between applications. Migrating applications requires: Run a script that changes the Prod...