I'm usign @GeneratedValue(strategy = GenerationType.AUTO) to generate and id on my entity.
I don't now how it works, but on my chils table, generates id values, that follow the parent sequence.
//parent table
@Entity
@Table(name="parent")
public class Parent {
@Id
@GeneratedValue(strategy = GenerationType....
How should I index a date column when some rows has null values?
We have to select rows between a date range and rows with null dates.
We use Oracle 9.2 and higher.
Options I found
Using a bitmap index on the date column
Using an index on date column and an index on a state field which value is 1 when the date is null
Using an index...
I have a query that was recently required to be modified.
Here's the original
SELECT RTRIM (position) AS "POSITION",
. // Other fields
.
.
FROM schema.table x WHERE hours > 0
AND pay = 'RGW'
AND NOT EXISTS( SELECT position FROM schema.table2 y where y.position = x.position )
Here's the new version
SELECT RTRIM...
I'm selecting from tables FOO and BAR. I'd like to lock the records of FOO which are being returned, but I don't want the records of BAR to be locked.
cursor c_foobar is
select foo.*, bar.* from
foo, bar
where foo.id = bar.foo_id
for update of <what should I put here?>
It seems like I need to specify individual columns, but I want t...
I would like to restrict users from inserting more than 3 records with color = 'Red' in my FOO table. My intentions are to A) retrieve the current count so that I can determine whether another record is allowed and B) prevent any other processes from inserting any Red records while this one is in process, hence the for update of.
I'd l...
Q. when i create a view on sql browser it show insufficient priviligies,so how i can create a view?
...
I have some tables in Oracle enviroment which I have found could benefit from new indexes.
However, they are big tables, ranging from 1M registers to 300M registers, so I would first try to estimate how much time it would take for the index creation take place, so I would know at least the order of magnitude it would take (hours, days, w...
I was wondering if there somebody knows if there are some benchmarks which compare the following jvms.
sun jvm vs. openjdk jvm vs. rockit jvm vs. j9 jvm vs. apache harmony.
Which one is has the best performance?
...
I am very confused about making choice between being a Oracle DBA or SAS Data Analyst. I've got B.Sc.Maths degree and have decided to make inroad in computer and some friends have suggested me SAS as better option than DBA. But I have heard that DBA is money and job stability-wise better than a data analysyt. I have no very much programm...
Hi all,
I am writing an application that invokes an Oracle web service. The web service client code was provided me.
This application uses a custom subclass of URLClassLoader to load jars at run-time. Running the unit tests from my local machine works fine, however when I deploy the application on the server and run it, I get the follo...
I have multiple versions of Oracle and it saved tnsnames.ora files all over the place. Older ones got stored in program files under oracle but newer ones got stored under an app directory in my hard drive.
I'm using the .net libraries provided by Oracle to connect with a .net app and it's telling me it cannot find the name I want to co...
Hi,
I have a series of scripts running in parallel as a nohup on an AIX server hosting oracle 10g. These scripts are written by somebody else and are meant to be executed concurrently. All the scripts are performing updates on a table. I am getting the error,
ORA-00060: deadlock detected while
waiting for resource
As I g...
Hi,
I killed a script that was in the middle of updating a table. Now when I rerun the script I am getting,
ORA-00054: resource busy and acquire
with NOWAIT specified
I presume the table is locked?. How do I unlock the table?. Thanks in advance.
...
Have you encountered deficiencies, limitations or flaws while using SQL?
I can think of several examples: Complicated queries/updates, SQL injection, etc.
€
Could you accomplish the same task easily with a different DML or programming language?
Can you provide me with case examples of problems you have encountered or cases where for ex...
For example: Being able to start displaying or manipulating rows as they are being returned by a query while the query has not finished searching the table?.. and I don't mean using the FIRST ROWS directive to hint the engine, I mean transparently, without having to add addtional logic. A feature like this would be useful for queries whi...
It's my understanding that the quickest way to access a particular row is by its ROWID. In INFORMIX-SE 7.3, when I do a 'SELECT ROWID FROM table;' I notice that its values are type SERIAL[INT]. In oracle, they are SERIAL[HEX]. Has anyone ever used ROWID for any practical use?.. If I wanted to locate the most recent row added to a table, ...
Hello everybody. I'm starting with Databases. I've been playing around with MySQL and Informix, but never had a real life project.
What is the real responsibility of a Database? Should we add Store procedures and functions to de Database or just let it to be a data repository with no logic?
...
MySQL supports events where i can set up something to happen in a specified time period
Eg: Update the salary's every month
Eg: Update something every year
Eg: Change the status of a book to "overdue" in a week
Etc etc etc
How do I do this in Oracle?
...
.
Hi,
We are building an ASP.NET application with C#.net language and Oracle 9i database. Here we installed Oracle 9i client software on our PCs.
We never worked on Oracle 9i database. It’s the first time.
We are planning to build stored procedures in Oracle database and call them from our ASP.NET application. Does working with Ora...
We are making a fairly serious application that needs to remain agnostic to the DB a client wants to use. Initially we plan on supporting MySQL, Oracle & SQL Server. The tables & views are simple as are the queries (no real fancy SQL), therefore the question:
Use native DB drivers (MySQLDbConnection etc.) and encapsulate the logic of e...