10g

Partitioning Oracle tables used for logging

I have an application that records activity in a table (Oracle 10g). The logging records should be kept for at least 30 days. I expect about 20 million rows to be added to this table every month. The DBA suggested that the table be split in partitions containing one week of data. The weekly maintenance script would then delete the oldes...

Extract Unique Time Slices in Oracle

I use Oracle 10g and I have a table that stores a snapshot of data on a person for a given day. Every night an outside process adds new rows to the table for any person whose had any changes to their core data (stored elsewhere). This allows a query to be written using a date to find out what a person 'looked' like on some past day. A ne...

SQL query using oracle 10g database datetime equal not working

Hi, I have SQL query like this. select * from TABLE_A where LogDateTime >= startdatetime and LogDateTime <= enddatetime; But some reason enddatetime equal is not working. I have the record with the date 11/23/09 8:50:09. When I select enddatetime as 11/23/09 8:50:09 it's not returning this record. It's returning till 8.49:59. What ...

Oracle sqlplus: relative paths starting at position of script

When I have two sql-files, one of them in a sub-directory main_test.sql sub/sub_test.sql and sub_test.sqlcalls @../main_test.sql (or @@../main_test.sql) then this works fine when executing it from the sub-directory sub> sqlplus xxx @ sub_test.sql But when I call sub> cd .. > sqlplus xxx @ sub/sub_test.sql this results in SP2-03...

Add comma-separated value of grouped rows to existing query

I've got a view for reports, that looks something like this: SELECT a.id, a.value1, a.value2, b.value1, /* (+50 more such columns)*/ FROM a JOIN b ON (b.id = a.b_id) JOIN c ON (c.id = b.c_id) LEFT JOIN d ON (d.id = b.d_id) LEFT JOIN e ON (e.id = d.e_id) /* (+10 more inner/left joins) */ It joins quite a few tables and return...

Oracle function and query return different results

Hi, I am using oracle 10g database. Function is : create or replace FUNCTION FUNC_FAAL(myCode number,firstDate date , secondDate date) RETURN INTEGER as rtr integer; BEGIN select count(*) into rtr from my_table tbl where tbl.myDateColumn between firstDate and secondDate and tbl.kkct is null and tbl.myNumberColumn...

Problem binding with OPEN-FOR-USING statement

I have a cursor in an ORACLE function that I am dynamically generating using the arguments of the function. I define the text of the cursor and in certain cases I include the following statement: sql_stmt := sql_stmt || 'AND MOD ( LOG_ID, :logsetmax ) = :logset '; I open the cursor and pass arguments in using the ORACLE OPEN-FO...

Oracle 10gR2 CLOB Data type

I am having table with clob column & trying to insert SIGNED character data which contains =176048 characters, it throws error has Insert exception data transaction java.sql.SQLException: ORA-01704: string literal too long ...

How to rapidly read data coming through a 10GbE NIC?

I have two debian boxes connected by a CX4 cable going between two 10 GbE cards. One is going to be generating data very quickly (between 4Gbits/s and 16Gbits/s), and the other needs to be able to grab all of that and store it in RAM for later parsing. I'm new to this kind of low-level coding, and would happily accept any ideas about w...

How do I delete the data from all my tables in ORACLE 10g

I have an ORACLE schema containing hundreds of tables. I would like to delete the data from all the tables (but don't want to DROP the tables). Is there an easy way to do this or do I have to write an SQL script that retrieves all the table names and runs the TRUNCATE command on each ? I would like to delete the data using commands in ...

Oracle 10g - Write queries results to file

Hello, I want to run 200+ select queries and append the results to a file. All queries are the same the only difference in the date-time variable. I don't have privileges to create a routine that's why I had to create all the queries. I don't have privileges to create a view or another table to store the results in. I don't have access...

How to create and restore backups of the Oracle 10g database by using commanline scripts automatically?

I want to automate the periodic backup and restore of the Oracle 10g Database.Please, someone help me immediately. and please note that I want the task to be performed from the command line scripts. ...

Where is the C precompiler for Oracle10g located?

I am looking for a newer version of the Pro*C/C++ to upgrade my procui.exe 9.0.1.1.1. I downloaded the 10g client disk and when install I have the following options: instant client administrator runtime custom I dont seem to able to find the actual program other than just getting some common files. Can someone help? ...

Multiple database with NHibernate

Hi, I have two databases. One from Oracle 10g. Another from Mysql. I have configured my web application with Nhibernate for Oracle and now I am in need of using the MySQL database. So how can i configure the hibernate.cfg.xml so that i can use both of the database at the same application? My current hibernate.cfg.xml is: <?xml versio...

ORA-12899 error in CHAR(1) field, but I'm sending only a 'C'

My Oracle database returns the error: ORA-12899 - Value too large for column TIT.ESTADO_CIVIL (actual: 2, maximum: 1) But I'm very sure that the sended value is an unique char 'C'. Anyone knows why this is happening? (I'm using C# with ODP.NET) ...

Suggestions needed for replacement of Oracle SSO 10g in an 11g environment

We're currently using the SSO component of Oracle 10g App Server to authenticate users on our external / internet facing client "portal" (think similar to online banking) SSO uses Oracle Internet Directory to store it's data, and we've been able to use PL/SQL and Java to access and modify the data held in OID (e.g create/drop users, cha...

Oracle 10g - JAXB unmarshalling is not working as expected

We're using Oracle 10g application server and deployed the Web service and trying to deploy the web service client. Server is working fine i.e.; marshalling is working fine. We're getting the output from the service properly but the search client is not unmarshalling (parsing) the response received. We're using all the tags under same na...

insert date to oracle

hi i have 2 Date field's in oracle 10g (MyDate and MyTime) and i need to insert string that contain a date & time strDate = 04/01/2010 00:00:00 strTime = 01/06/2010 17:20:12 how to insert strDate & strTime to field's MyDate & MyTime ...

Wasn't there a switch to toggle Oracles empty varchar2 - null behavior?

As everybody working with Oracle knows, it an empty Varchar2 will result in a NULL value when put into a Varchar2 column. I (and a coworker as well) thought we had read about a parameter that could be set in the database to change that behavior and actually differentiate between null values and empty Strings. Is there such a parameter ...

Integrating PL/JSON with Oracle APEX 4.0

I am trying to use PL/JSON in my Oracle APEX application but get the following errors when I attempt to run a Hello, world example (which works fine when I run the example from SQL*PLUS as sys): ORA-06550: line 2, column 20: PLS-00905: object MY_SCHEMA.JSON is invalid ORA-06550: line 2, column 20: PL/SQL: Item ignored ORA-06550: line 5,...