oracle

.NET date handling: parse 15-OCT-08 15.36.16.280000000

The custom date strings in .NET allow you to parse a date with seven fractional parts of a second using fffffff I need to parse data exported from Oracle SQL Developer which looks like: 15-OCT-08 15.36.16.280000000 I count nine fractional parts but fffffffff is not a valid date format. In fact: ? DateTime.Now.ToString("dd-MMM-yy H...

How can I specify the Oracle Home to use when using System.Data.OracleClient

I'm working on an Excel Addin (VSTO) in .NET that connects to an Oracle 10g database. I'm running on Vista x64 and have figured out that I need both the x86 and x64 Oracle clients installed on my machine so that both 32 bit processes (like PL/SQL Developer) and 64 bit processes (like an example .NET console app compiled for "Any CPU") c...

READ COMMITTED database isolation level in oracle

Hi there, I'm working on a web app connected to oracle. We have a table in oracle with a column "activated". Only one row can have this column set to 1 at any one time. To enforce this, we have been using SERIALIZED isolation level in Java, however we are running into the "cannot serialize transaction" error, and cannot work out why. ...

SQL Select Entire Row by Distinct Columns

Hello, I need an sql statement which will allow me to select an entire row from oracle database, but by distinct columns. Here is a simplified database: Project_Num Title Category 0 Project 1 Admin 0 Project 1 Development 1 Project 2 Admin 2 Pro...

Oracle PLS-00103 error. How do you check for an existing record and do update or insert based on that condition?

I need to check if a record exists in the table or not from a SELECT statement. If the record exists, do an update otherwise create a record on the table. I'm trying to but i'm getting PLS-00103 error. These are the errors that I'm getting when i run my code in DBVisaulzier: 18:00:09 [DECLARE - 0 row(s), 0.000 secs] [Error Code: 655...

distribution transaction lock in oracle database

Hi, I have some question around transaction lock in oracle database. What I have found out so far is that: Cause: The time to wait on a lock in a distributed transaction has been exceeded. This time is specified in the initialization parameter DISTRIBUTED_LOCK_TIMEOUT. Action: This situation is treated as a deadlock and the statement ...

Sql Query Problem

i have problem when joining tables(left join) table1: id1 amt1 1 100 2 200 3 300 table2: id2 amt2 1 150 2 250 2 350 my Query: select id1,amt1,id2,amt2 from table1 left join table2 on table2.id1=table1.id2 my supposed o/p is: id1 amt1 id2 amt2 row1: 1 100 1 150 row2: 2 200 2 250 row3: 2 2...

Access and Filter predicates in Oracle execution plan

What is the difference between Access and Filter predicates in Oracle execution plan? If I understand correctly, "access" is used to determine which data blocks need to be read, and "filter" is applied after the blocks are read. Hence, filtering is "evil". In the example of Predicate Information section of the execution plan below: 10 ...

Correct cleaning up after accessing Oracle DB from .Net code

Is this the proper way to clean up after myself when using a connection to an oracle-server, using system.data.oracleclient? using System.Data.OracleClient; var con = new OracleConnection("some connection string"); con.Open(); con.Close(); con = null; ...

Oracle SQL: update table conditionally based on values in another table

[Previous essay-title for question] Oracle SQL: update parent table column if all child table rows have specific value in a column. Update RANK of only those students who have 100 marks in all the subjects. If student has less than 100 marks in any subject, his RANK should not be updated. I have a scenario where I have a parent table a...

How to use BOOLEAN type in SELECT statement

I have a PL/SQL function with BOOLEAN in parameter: function get_something(name in varchar2, ignore_notfound in boolean) This function is a part of 3rd party tool, I cannot change this. I would like to use this function inside a SELECT statement like this: select get_something('NAME', TRUE) from dual This ...

What is the difference between Cassandra vs Oracle Coherence?

Assume that Oracle Coherence is free :) Which one do you prefer? What are the architectural and feature capability differences between Oracle Coherence(Tangosol) and Cassandra? Best Regards ...

Are Oracle Analytic Functions costly?

Has anyone encountered slow performance when using oracle analytic functions? The lead() oracle analytic function was used to generate a new field in the table. Basically, it would allow the previous row's field value to be used as the value of the current row's new field. The explain plan indicates a full table scan is performed on t...

Determining when an Oracle database object became invalid

Is it possible to determine when an object within an Oracle database became invalid? I have tried looking at the DBA_OBJECTS view, but none of its date stamp columns seem to be affected when the STATUS changes to 'INVALID'. ...

How do you execute SQL from within a bash script?

I have some SQL scripts that I'm trying to automate. In the past I have used SQL*Plus, and called the sqlplus binary manually, from a bash script. However, I'm trying to figure out if there's a way to connect to the DB, and call the script from inside of the bash script... so that I can insert date and make the queries run relative to a...

Setting and updating connection pool (OracleConnectionPoolDataSource) properties for best performance

In a Java web application I am working on, we are using OracleConnectionPoolDataSource for a database connection pool functionality. Each getConnection call includes the user's Oracle ID and password. So each user in a sense ends up with their own database connection pool. Currently we are using the default values for most properties. T...

Does Oracle roll back the transaction on an error?

This feels like a dumb question, but I see the following in the Oracle concepts guide on transaction management: A transaction ends when any of the following occurs: A user issues a COMMIT or ROLLBACK statement without a SAVEPOINT clause. A user runs a DDL statement such as CREATE, DROP, RENAME, or ALTER. If the cur...

Number of Records in Insert Statement (Oracle)

I'd like to report on the number of records inserted in an Oracle insert statement. I'm inserting from a statement, so I could run my select twice and a count, but I'd rather keep it all in a single statement. Is there a way? ...

SQL Syntax Formating Tool

I find the need to send SQL statements by email often and I was wondering if anyone had a tool that would color code the Oracle Reserved Words, Keywords, and Namespaces so that when the code is copied from the tool into say Lotus notes it would appear in the email as it does in the tool. ...

Querying multiple rows from Oracle table using package

I wrote a package to query rows from a table. This select query will call other functions and returns all the rows from table. But when i write a package with all functions and sprocs , my sproc with select statement gives me an error saying i cannot execute without into statement. But if i use into then it will return only one row. How ...