oracle

SQL Plus change current directory

How does one change the current directory in SQL Plus under windows. I am trying to write a script with several "@ filename" commands. I know that one can open a script with the File --> Open command, which will change the current directory, but I am looking for a way to do this automatically unattended. Resolution Based on Plasme...

Alternatives to Oracle application express?

I've using Oracle Application Express (apex) which is the most fast database application builder for the web that I've seen. Oracle Apex is like Microsoft Access for desktop and Oracle databases. Any one knows about alternatives? EDIT: For alternative I mean "There is any tool comparing this one?". Of course there are a lot of frame...

Multi-line PL/SQL command with .NET OracleCommand

Hi all, I'm using System.Data.OracleClient.OracleCommand to create a table and fill it out with some data. The query I am using runs OK in PS/SQL Developer, however when I'm trying to execute it from within .NET application I'm getting this error: ORA-06550: line 1, column 20: PLS-00103: Encountered the symbol "" when expecting one of ...

Is there a tool to DB Diff on 'data' for an ORACLE database?

We have an ORACLE 10g database with 100+ tables. The software used against this database is an order entry system. We are looking for some software (preferably free) or script which when ran will tell us which tables had a new row INSERTED or any data UPDATED....after we have generated a new 'order' from within ... Also which sequences...

Oracle ORA-00600

I have SQL SELECT statement that returns: Error: ORA-00600: internal error code, arguments: [qerpfAllocateR], [], [], [], [], [], [], [] If I narrow my results by adding one more condition in WHERE clause everything is ok. Anyone knows what is happening? EDIT: select * from ( select tbl1.col1, ..., tbl1.points from tabl...

Database Deadlocks when using Rownum?

If I have the following code being called from multiple threads in an application, is there a deadlock risk? The transaction used to connect to the database for this is opened just before this call and closed once it returns. Application : Java Database: Oracle FUNCTION reserveWork(in_batch_id NUMBER, in_work_s...

How do I use the current date in an HQL query with an Oracle database?

I'm trying to write this query using Hibernate 3 and Oracle 10. from Alert alert where alert.expiration > current_date() order by alert.priority, alert.updated, alert.name It's creating SQL like this - Hibernate: select alert0_.ANNOUNCEMENTS_ID as ANNOUNCE1_1_, alert0_.ANNOUNCEMENT S_NAME as ANNOUNCE2_1_, alert0_.ANNOUNCEMENTS_PRIO...

Insert rows (parent and children) programmatically

I am using Spring and JDBCTemplate. The scenario is a CUSTOMER table and ORDERS table - parent-child relationship. I want to do an insert (for example 1 customer and 5 orders) - but I am unsure how you programmatically insert a row in the CUSTOMER table (some how get hold of the Oracle generated unique id), and then insert the correspo...

Porting an application from Oracle 9 to Oracle 11 - gottchas?

We have an application (well, 3) which uses Oracle 9i, however this is being end-of-life-ed shortly, and we need to move to another platform - Oracle 11 or Postgress being the obvious ones. I've heard comments to the effect that porting from 9i to 11 isn't straight forward, but no-one here can confirm one way or the other. I'm not over...

Meaning of (+) in SQL queries

I've come across some SQL queries in Oracle that contain '(+)' and I have no idea what that means. Can someone explain its purpose or provide some examples of its use? Thanks ...

Oracle command-line tools on Linux

What is the equivalent of oradim on Linux? Does Oracle even provide anything like that for Linux? ...

Oracle connections in Spring

I am using Oracle 9 JDBC Thin Driver - the connection string I have used for standard JDBC was: jdbcConn.connect("jdbc:oracle:thin:myDevDb/myDevDb@fooServer:1521:MYSIDNAME"); ...just trying to get my head around using this kind of connection in Spring 2.5. How do you wire up Spring to an Oracle connection - think it has something t...

SQL Create Table Error

Hello all. I am just beginning to learn SQL and have stumbled at the first hurdle, I am unable to create a table. Below is the code example. The error I am receiving when running the statement, references line 7 stating there is an issue with a 'relational operator'. The purpose of line 7 is to check that the age of the person is greater...

Hibernate's setFirstResult() issue with Oracle jdbc driver

I'm trying to do pagination with Hibernate using setFirstResult() and setMaxResults() but I'm not getting the expected results when setting the first result to 0. When doing the following: Query query = session.createQuery(queryString); query.setFirstResult(0); query.setMaxResults(30); List list = query.list(); //list.size() r...

Duplicate set of columns from one table to another table

My requirement is to read some set of columns from a table. The source table has many - around 20-30 numeric columns and I would like to read only a set of those columns from the source table and keep appending the values of those columns to the destination table. My DB is on Oracle and the programming language is JDBC/Java. The source...

How do I test if a column equals empty_clob() in Oracle?

The naïve FOO = empty_clob() complains about incompatible types. I tried Googling, but (once again) had little success searching for help with Oracle. Thanks. ...

Slow deletes from table with CLOB fields in Oracle 10g

I am encountering an issue where Oracle is very slow when I attempt to delete rows from a table which contains two CLOB fields. The table has millions of rows, no constraints, and the deletes are based on the Primary Key. I have rebuilt indexes and recomputed statistics, to no avail. What can I do to improve the performance of delete...

Installed Oracle Express - Can't login

I just installed Oracle Express edition. During the installation it asked me to set a password but not a username. After the installation completed, it directed me to a browser window and asked me to login with a username and password. The password I know but the username I don't know. Is this an IQ test? Did I fail it? ...

Allow Oracle User to connect from one IP address only

For security reasons, we'd like to limit an oracle user to only connect from a specific IP address. Is this possible? If so, how can we configure this? ...

Why am I able to read char[2] but not char[1]?

I am able to read char into char[2] in OCI C++ code, but I am not able to read to char[1]? Does anyone have any idea why? (oracle data type is char(1)) ...