oracle

[SOLVED]Why is String " " being read as NULL when mapping from the database to an object using ibatis?

In my oracle database I have table called PERSON with columns code, surname, forename. eg. 'PER001', '________________', 'Bob' (NOTE: _ = space) surname is set to NOT NULL but you can enter in a string of spaces like " ". I am having a problem with this because when Ibatis maps this column to an Object it is mapping it as ...

Powermock and problem loading jar file file during unit test with JUnit 4 in eclipse

I am using powermock 1.2.5 to perform a class that saves data into Oracle database. When I run my test my unit test fails with the following exception: NoSuchAlgorithmException : DES Algorithm can be found. After debugging the code I found out that this exception is thrown when my application is trying to set the password to establish...

count number of rows that occur for each date in column date range.

I have a table with data such as below Group Start Date End Date A 01/01/01 01/03/01 A 01/01/01 01/02/01 A 01/03/01 01/04/01 B 01/01/01 01/01/01 ETC I am looking to produce a view that gives a count for each day, like this Group Date Count A 01/01/01 2 A 01/02/01 2 A 01/03/01 ...

Oracle Performance IN or OR

Which operator in oracle gives better performance IN or OR ex: select * from table where y in (1,2,3) or select * from table where y = 1 or y = 2 or y = 3 ...

Developing for Windows Server 2003 64 bit on Windows XP 32 bit

I have been developing an ASP.NET application on Windows XP Professional. While promoting to production I have only now found out that the server is 64 bit. I installed Oracle Client 32 bit on the server and cannot connect to Oracle. I am using the Microsoft Provider for Oracle, and my question is, how do I get an ASP.NET application ...

What are the effects of disabling the redo logs in Oracle on Hibernate transactions?

If we disable the 'redo logs' of a tablespace in Oracle, will they impact Hibernate's transactions? These are the options present in the Oracle EM on a tablespace level: Enable logging Yes Generate redo logs for creation of tables, indexes and partitions, and for subsequent inserts. Recoverable No Redo log entries are smaller, the a...

Unable to delete oldest table partition - Oracle 11g

Hi, I'm using the 11g interval partitioning feature in one of my tables. I set it up to create 1 day partitions on a timestamp field and created a job to delete data 3 months old. When I try to delete the oldest partition I get the following error: ORA-14758: Last partition in the range section cannot be dropped I would have thought t...

Get a table count in SSIS from an Oracle view

In my SSIS package, I want to see if a particular Oracle view has data in it. I have a Execute SQL Task with a select count statement: Select CAST( count(*) as Integer) As Row_Count from OWNER.VIEW_MV My RowCount is in the Result Set, pointing to my Variable User:TableCount. If I set TableCount to anything except Object, I get an err...

How do I track down what's re-enabling triggers during my SQL*Loader load?

I seem to be seeing a lot of messages like this in my log: Trigger DEV."MBR_TRG" was disabled before the load. Trigger DEV."MBR_TRG" was re-enabled by another process. SQL*Loader-951: Error calling once/load initialization ORA-00604: error occurred at recursive SQL level 1 ORA-00054: resource busy and acquire with NOWAIT specified Thi...

Is it possible to perform a bitwise group function?

I have a field in a table which contains bitwise flags. Let's say for the sake of example there are three flags: 4 => read, 2 => write, 1 => execute and the table looks like this*: user_id | file | permissions -----------+--------+--------------- 1 | a.txt | 6 ( <-- 6 = 4 + 2 = read + write) 1 | b.txt | 4 ...

Oracle Query Performance

As a followup to this two questions and its answers Question 1 and Question 2. What gives better performance on Oracle using operator in, or or union? I think on a table with >1 mio rows with 10-500 rows per distinct value of y. select * from table where y in (1,2,3) or select * from table where (y = 1 or y = 2 or y = 3) or selec...

Nhibernate's EnumStringType and Oracle

Hi, I'm using an EnumStringType in my mapping to insert the enum string value in my DB. The problem is that Oracle needs AnsiString type for their parameters, and the EnumStringType maps the parameter values to "normal" String types. Something that got me busy for days until I found this article of James Kovacs Which means, that currentl...

Oracle Text URL indexing performance

I have an oracle table that has two columns - id and url. The URL is simply http://somemachinename/mypage.php?id= I then create an oracle text index using the URL datastore on the url column. If I then do: BEGIN ctx_ddl.sync_index(idx_name => 'MY_INDEX', memory => '50M', parallel...

Can Oracle's default object lock timeout be changed?

> ALTER PACKAGE blah COMPILE; (wait about 10 minutes) > ORA-04021: timeout occurred while waiting to lock object I understand why I get the timeout error (the package is in use). Does anyone know if there's a way to change the default 10 minute wait interval? Can this be configured at a database / session / statement level? Thanks ...

SQLDeveloper using over 100MB of PGA

Perhaps this is normal, but in my Oracle 11g database I am seeing programmers using Oracle's SQL Developer regularly consume more than 100MB of combined UGA and PGA memory. I'd like to know if this is normal and what can be done about it. Our database is on the 32 bit version of Windows 2008, so memory limitations are becoming an incre...

java - passing array in oracle stored procedure

Hi, I have a Java app accessing an oracle stored procedure. The arguments to the stored procedure include an array type. I do it like the following... con = this._getConnection(); Connection narrowdConn = (Connection)WSJdbcUtil.getNativeConnection( (WSJdbcConnection)con ); callable = con.prepareCall("{call MY_PKG.MY_PROCEDURE(?, ?...

Connecting to an oracle database in C# .Net

Hi I use the following code to connect to an orace database in Visual Studio 2008 and it is falling over with the exception of ServerVersion threw an invalid operation exception at line 3: m_strConnectionString = Settings.GetMandatoryConfig("databases", "SourceDB"); m_strQueryTerminator = Settings.GetConfig("databases", "QueryTerminator...

Optional Database Entities (part 2)

See 'Almost Decided' below NOTE: This is a continuation and simplification of Optional Database Entities. I am designing a new laboratory database that tests a wide variety of tests on a wide variety of sample types. Main Entities:   Each must have exactly one parent (except REQ) and at least one child (except MEA). Request ...

Oracle text indices on top of a materialized view

Hi I have a materialized view of a complex join, which I would like to have some of its columns be searcheable using Oracle Text. I've already created the indicies on the underlying table. Do you I have to create new indicies again for this materialized view? thank you, Joyce ...

Return the number of affected rows from a MERGE with cx_oracle

How can you get the number of affected rows from executing a "MERGE INTO..." sql command within CX_Oracle? When ever I execute the MERGE SQL on cx_oracle, I get a cursor.rowcount of -1. Is there a way to get the number of rows affected by the merge? ...