oracle

Invoking sql statements in shell scripts

Hello members, I'm working on the Solaris environment and the DB i'm using is Oracle 10g. Skeleton of what I'm attempting; Write a ksh script to perform the following. I have no idea how to include my sql query within a shell script and loop through the statements. Have therefore given a jist of what I'm attempting, below. Copy file...

SQL*Loader problem

I am getting an error SQL*Loader-606, which means: The synonym specified in the INTO TABLE clause in the SQL*Loader control file specifies a remote object via a database link. Only a synonym for an existing local table can be specified in the INTO TABLE clause. Is there any way we can insert into remote table using SQL*Lo...

Asking for opinions : One sequence for all tables

Here's another one I've been thinking about lately. We have concluded in earlier discussions : 'natural primary keys are bad, artificial primary keys are good.' Working with Hibernate earlier I have seen that Hibernate default creates one sequence for all tables. At first I was puzzled by this, why would you do this. But later I saw the...

Delphi 6 App. occurs a error message: Table is not indexed.

I got a app developed in Delphi 6 with master/detail constrution. Both master and detail take TQuery to open the data source. It works fine when the master opens first, but after that an error message of "Table is not indexed" occured when the detail opens the data source. The working account for app. is the SCHEMA_USER, which has a aft...

SELECT SUM as field

Suppose i have this table table (a,b,c,d). Datatypes are not important. I want to do this select a as a1,b as b1,c as c1, (select sum(d) from table where a=a1 and b=b1) as total from table group by a,b,c ...but I can't find a way (sqldeveloper keeps complaining with "from clause not found".) Is there a way? Is it possible? ...

Oracle reverse index and query

If I create a reverse index in Oracle on a VARCHAR2 column do I also need to reverse the value used in the WHERE clause? CREATE INDEX myindex ON myTable(name) REVERSE; SELECT name FROM myTable WHERE name='Peter'; or SELECT name FROM myTable WHERE name='reteP'; ...

How do I clear a table with a lot of references in oracle?

For instance, suppose I have table A. Then I have tables B-Z that have a foreign key to table A's primary key. Then perhaps there are also some tables that have a foreign key constraint to a table in B-Z's primary key constraint. Is there any easy way to clear out table A and all of the tables that refer to A (or that refer to a table...

ASP.NET MVC + Oracle: samples and how-to

While reading NerdDinner, and browsing other examples on the internet regarding ASP.NET MVC with LINQ To SQL. In my ASP.NET MVC project I have to connect to an Oracle database. The main goal of the application is to display, edit, and update data. I am uncertain if ASP.NET MVC can work with an Oracle database. Has anyone ever don...

In ORACLE, How do I determine the fields that compose the primary keys of tables or views?

I'm doing an heterogeneous replication app in Django and need to determine the primary key fields of the tables that are going to get sync'ed. ...

Querying tables listed in DBA_Tables

A third party product we have at my company uses Oracle as a backend. I'm attempting to log into the Oracle database and look at the schema and data. I've logged in as sys/sysdba, created a user with a default tablespace of that created by the application, and granted the user all necessary permissions to query the structures. I've also ...

Finding most specific prefix with SQL

I have a bit of an SQL problem. Here are my tables: areas(id, name, sla_id) areas_groups(id, group_id, areaprefix) The sla_id is an identifier from a different source - it is unique, but areas has its own auto-incrementing primary key. The areaprefix field is the interesting one. It just contains the first few digits of the sla_id an...

Insert, Update, Delete for Oracle are not working in .NET C#?

It has been a while that i'm dealing with oracle and .net and they don't seem to be a perfect match together. That's this strange thing, i'm not finding any reason why it happens or how to fix it. I do simple insert, update and delete and they are not working. It fails on the cmd.ExecuteNonQuery(); Here's the piece of code: sqlComm...

What is the optimum number of sqls run in batch?

I am trying to load the data in Oracle server remotely. I am doing "executeBatch()" for every 50 sqls that are added in batch. (thru JDBC) What is the optimum number of sqls run in batch? Is it unlimited? ...

JMS setTimeToLive

I'm using JMS topic to publish messages. And on the message producer I'm setting setTimeToLive.I'm expecting the messages to be deleted after 16 hours. But even after 16 hours the message is still there in DB as well as in topic. Any thoughts on this? Am i missing something? private static final long DEFAULT_TIME_TO_LIVE = 16 * 60 * 60 ...

Undo a POST in Oracle

Can anyone think of a way to reverse a POST that has been issued in Oracle Forms? Note; this is a POST, not COMMIT. Its quite complex but basically I need to POST so I can query against some records that will normally be created but at a later point I may need to change some values. This requires me to undo the previous POST. I've tri...

Throwing specific error messages in PLSQL Oracle...catching in hibernate?

Is it possible to throw a specific error message in a PL/SQL oracle stored procedure and catch it in Hibernate when it gets invoked? ...

Oracle comparison issue

I'm trying to compare two columns from different columns. Ex: Select a.Col1, b.Col1, CASE WHEN a.Col1 <> b.Col1 THEN 'TRUE' ELSE 'FALSE' END CASE FROM TableA a LEFT OUTER JOIN TableB b ON a.id = b.id I always get false but not true even though they are different or if there is a value in TableA and not in TableB. What is wrong with ...

Subsonic 3 with Oracle support

Is there an oracle ttinclude file available anywhere? ...

Oracle Migration Workbench

Does anybody know anything about using Migration Workbench to migrate db2 database to oracle 10G? I am getting a strange SQL1402N error when I try to get source capture. ...

How do I get a list of locked users in an Oracle database?

I want to be able to list all of the users in a given database along with an icon that determines whether they are locked or not. The problem I'm having is querying the "locked" status for a given user, I though it might have been on all_users but it isn't. Can anyone point me in the right direction? ...