oracle10g

Can you help me write a procedure in Oracle to spool data from a table to a CSV file?

I am writing a procedure to create a CSV file with the data in an Oracle table. I used "spool filename;" but an error is coming. Can I use spool in PL/SQL? ...

Encoding issue in Java

I have a CSV file that contains both ASCII & Unicode characters. say "ÅÔÉA". I am not sure abt the encoding format of this file, but when I open it in Notepad, it shows "ANSI" as its encoding standard. I fetch these contents of CSV in UTF-8 encoded format. fr = new InputStreamReader(new FileInputStream(fileName),"UTF-8"); but when I ...

What is the difference between converting to hex on the client end and using rawtohex?

I have a table that's created like this: CREATE TABLE bin_test (id INTEGER PRIMARY KEY, b BLOB) Using Python and cx_Oracle, if I do this: value = "\xff\x00\xff\x00" #The string represented in hex by ff00ff00 self.connection.execute("INSERT INTO bin_test (b) VALUES (rawtohex(?))", (value,)) self.connection.exec...

Relation between Oracle session and connection pool

Let me explain the set up first. We have an oracle server running on a 2GB RAM machine. The Db instance has the init parameter "sessions" set to 160. We have the application deployed on Websphere 6.1. The connection pool settings is Min 50 and Max 150. When we run Load test on 40 Users (concurrent, using jMeter), everything goes fine....

Oracle: Does a 10g oracle client work with an 11g server?

This is the reciprocal to this question. Currently, I am trying to use the instant client for Mac, version 10.2. There's no 11g version for Mac, as of now, based on this page(you have to click into each link to find out the actual version for each platform...lame). I tried connecting to our Oracle 11g server, and it just hangs there for...

ODP.net Oracle Decimal Number precision problem when filling a dataset. Exception: Arithmetic operation resulted in an overflow

I am working in c# .net 2 (Visual Studio 2005 SP1) attempting to fill a dataset with the results from a select * from table from an Oracle10g database. The .net framework, IDE and database cannot be changed at this client site. I'm connecting using the ODP.net provider the dll version is 2.102.2.20 When I run the fill command I get an ...

How to force Oracle Spatial to select an "executable" execution plan

A (spatial) query in Oracle 10g gets different execution plan depending only on a parameter value. And sadly Oracle cannot execute one of the plans at all, giving an error. Changing value (below 282 to 284) or operator (= to <) gives a result. Why are the plans different? Why oracle selects an unexecutable plan? What to do to force Orac...

can u help in in writing a oracle procedure which have to create file from the contents of table

can u help me in writing a procedure in oracle which have to create a csv file from table contents can we write a triger to create a csv file of a table after the table contents are updated.. if we can do that then can u give me that triger.. Thanks in advance... ...

Problem with Oracle 10g for writing trigger that will create CSV file with the contents of the data in table

How can a trigger be written which is invoked after updating a particular column in the table and creates a CSV file with the contents of same table? I am using Oracle 10g. ...

can we execute unix command from oracle10g procedure....

can anybody help me in oracle10g in unix machine I have a requirement to execute the unix command in procedure how can i do that thanks in advance ...

Granting "Create Directory" Privileges in Oracle

I want to run a CREATE DIRECTORY query in Oracle 10, but it's giving me an insufficient privileges error. Can anybody tell me how to grant this privilege to my user through the system as a user? ...

Oracle Export Datapump issues

Hi all, I have a problem with import certain specified tables using expdp command in oracle 10g. Here's what i did to set it up: I logged in as sysdba and ran the following commands create or replace directory dumpdir as 'c:\test\'; grant read,write on directory dumpdir to test; Then i went to the command prompt on my windows box a...

Flashback Table in Oracle 10g

How to use the Flashback Table feature in Oracle 10g. I want to know all the steps involved in detail. ...

How to get record count using reference cursor in oracle10g

I want to know how we can get record count using reference cursor in oracle10g. ...

Efficiency of storing an Oracle User Defined Type in an index organized table

Are there known issues with storing user defined types within index organized tables in Oracle 10G? CREATE OR REPLACE TYPE MyList AS VARRAY(256) OF NUMBER(8,0); CREATE TABLE myTable ( id NUMBER(10,0) NOT NULL, my_list MyList NOT NULL) CONSTRAINT pk_myTable_id PRIMARY KEY(id)) ORGANIZATION INDEX NOLOGGING; With this type...

Is there an Oracle equivalent to SQL Server's OUTPUT INSERTED.*?

In SQL Server, you can do things like this: INSERT INTO some_table (...) OUTPUT INSERTED.* VALUES (...) So that you can insert arbitrary sets of columns/values and get those results back. Is there any way to do this in Oracle? The best I can come up with is this: INSERT INTO some_table (...) VALUES (...) RETURNING ROWID INTO :out_r...

How to relate two tables in a DBMS?

I created two tables EMP and DEPT; now I want to relate these two tables. That is, one table's data will come to another table. How is it possible? ...

How to auto reconnect Oracle connection pool after connection interruption?

I'm running across a problem with Oracle connection pooling via OracleConnectionCacheImpl. When I connect to a connection pool on my database server (Oracle 10g) via the thin driver, everything works fine until after an unspecified time, the db connection gets dropped (possibly due to idle connections?) and I get an error message: C...

Realtime data transfer between two or more Oracle databases.

Hi, I'm not a techie as such but have a question which I would like some views on. Currently we have 4 applications runnings on either Oracle 10g or 9i and use OAQ for data transfer but Oracle Streams for within day data transfer. Streams is currently viewed as bringing tight coupling between the applications and such will not be our ...

What are advantages of using multiple instances of OHS 11g webserver?

Few days ago I came to know about the OHS feature i.e can create multiple instances. I am wondering,if using multiple instances of OHS webserver increases the performance of the Webserver. Is there any advantage, other than less server space use for using multiple instances of OHS? Where this feature of OHS is used? TIA Anil ...