oracle

Using MyGeneration, doodads, and Oracle XE, is it possible to implement an "auto number primary key" scheme?

Hello world. Using MyGeneration, doodads, and Oracle XE, is it possible to implement an "auto number primary key" scheme? Problem facts: I am using Oracle XE. I have implemented the following table and trigger: CREATE TABLE "USERS" ( "ID" NUMBER(38,0), "USER_NAME" VARCHAR2(50), "PASSWORD" VARCHAR2(50), "EMAI...

Database performance benchmark

Any good articles out there comparing Oracle vs SQL Server vs MySql in terms of performance? I'd like to know things like: INSERT performance SELECT performance Scalability under heavy load Based on some real examples in order to gain a better understanding about the different RDBMS. ...

Oracle Warning: execution completed with warning

Hi I have two tables Orders(ID,ORDERDATE,DELIVERYDATE,GOODID,QUANTITY,COLLECTIONFROM,DELIVERYTO,NOTES) and ROLLINGSTOCK_ORDER(ORDERID,ROLLINGSTOCKID,DEPARTUREDATE,DELIVERYDATE,ROUTEID) i have created a trigger to update the DELIVERYDATE in ROLLINGSTOCK_ORDER when DELIVERYDATE is updated in Orders CREATE OR REPLACE TRIGGER TRIGG...

libclntsh.so.11.1: cannot open shared object file.

I want to schedule a task on linux by icrontab, and the task is written in python and have to import cx_Oracle module, so I export ORACLE_HOME and LD_LIBRARY_PATH in .bash_profile, but it raise the error: libclntsh.so.11.1: cannot open shared object file. Since it is ok to run the task by issue the command in shell like python a.p...

Create Variable In Oracle

Hi What is the equivalent of DECLARE @Variable INT SET @Varialbe = 1 in Oracle? Thanks ...

Why do I get Bind Variable "DeliveryDate_Variable" is NOT DECLARED(Completely New TO Oracle)

Hi, I have the following script in Oacle I do not understand why i get Bind Variable "DeliveryDate_Variable" is NOT DECLARED Everything looks ok to me VARIABLE RollingStockTypeId_Variable NUMBER := 1; VARIABLE DeliveryDate_Variable DATE := (to_date('2010/8/25:12:00:00AM', 'yyyy/mm/dd:hh:mi:ssam')); SELECT DISTINCT rs.Id, ...

Oracle SQL CMD Line

Whenever I perform select statements in the command line tool it doesn't use all of the space. I've modified buffer size and window size and it just doesn't work. Here is the screenshot: ...

PL/SQL function while executing throws Out Process Memory Error

I have PL/SQL function, which is programmed to sort a set of data. This function work fine without any error, when called directly as a PL/SQL Function. However, when I call this Function Via a Unix Shell Script, even though the script returns a success code and throws an Out Process Memory Error and function is actually not executed. ...

UniversalConnectionPoolManagerMBean already registered.

I have two web applications. Both of yhem use oracle.ucp.UniversalConnectionPool. When I deploy these applications on JBoss I get following exception: java.sql.SQLException: Unable to start the Universal Connection Pool: java.sql.SQLException: Unable to start the Universal Connection Pool: oracle.ucp.UniversalConnectionPoolException: ...

oracle select query - index on multiple columns

Hello. I'm working on a sql query, and trying to optimise it, because it takes too long to execute. I have a few select and UNION between. Every select is on the same table but with different condition in WHERE clause. Basically I have allways something like : select * from A where field1 <=TO_DATE ('01/01/2010', 'DD/MM/YYYY') AND fie...

Porting Oracle Date Manipulation

I need to port this following from Oracle syntax to Postgresql. Both FLO_END_DT and FLO_START_DATE are of type DATE in Oracle, and TIMESTAMP WITHOUT TIME ZONE in Postgresql: SELECT TRUNC( TO_CHAR(ROUND(( FL.FLO_END_DT- FL.FLO_START_DT)* 24), '9999D99'), 2) FROM FLOWS FL I am not familiar enough with Oracle to know what it is tryin...

ORA-00904: "FORMAT": invalid identifier

I am trying to format a date: FORMAT(table.TCKT.TCKT_ISS_DATE, 'YYYY') AS TICKETYEAR but I am getting the following error: ORA-00904: "FORMAT": invalid identifier Right now the date show the complete timestamp. Any suggestions on how to fix this problem, or any other way to format the date to just show the four digit year? ...

PL/SQL bulk collect into associative array with sparse key

I want to execute a SQL query inside PL/SQL and populate the results into an associative array, where one of the columns in the SQL becomes the key in the associative array. For example, say I have a table Person with columns PERSON_ID INTEGER PRIMARY KEY PERSON_NAME VARCHAR2(50) ...and values like: PERSON_ID | PERSON_NAME ...

Which one gives you more advantages: Microsoft or SUN/Oracle certification?

Which one gives you more advantages: Microsoft or SUN/Oracle certification? If you don't mind, please relate your answer to your career (dev, sys-admin, dba), industry (finance, general consulting, business apps, software house), and location (where you live, does it influence your decision?) as well. One reason I asked this because I h...

How to free an Oracle Object-Type passed to an external procedure

I'm using OTT to pass and load an Object Type from a C++ external procedure. The problem I have is that I don't know how to somehow mark the object for deallocation once extproc has done marshalling it. The object remains in extproc's memory forever making it grow in memory consumtion. Here's part of the code: void decodeFromBuffer(OCIE...

Do views only perform the joins that they need to, or all joins always?

I am on an oracle DB. Lets say I have one view that joins to three tables. The view has two fields each. Each field only needs data from two of the three tables. If I query the view and return only one field, does the view still join to three tables or just to the two tables that it needs to calculate the field? ...

Query to find shortest route in Oracle

Hello, fellow developers. I'm starting studies in Oracle 11g Spatial Databases and I want to know if is there a query that returns the shortest route (or path) between two points, or between a point and a linestring. I have a map with some linestring (hiking trails) and Polygons (geographic accidents) and I want to find the shortest ro...

Select count() max() Date

I have a table with shifts history along with emp ids. I'm using this query to retrieve a list of employees and their total shifts by specifying the range to count from: SELECT ope_id, count(ope_id) FROM operator_shift WHERE ope_shift_date >=to_date( '01-MAR-10','dd-mon-yy') and ope_shift_date <= to_date('31-MAR-10','dd-mon-yy') GROUP ...

bulk insert from Java into Oracle

I need to insert many small rows rapidly into Oracle. (5 fields). With MySQL, I break the inserts into groups of 100, then use one insert statement for every group of 100 inserts. But with Oracle, user feedback is that the mass inserts (anywhere from 1000-30000) are too slow. Is there a similar trick I can use to speed up the programm...

SQL Design: representing a default value with overrides?

I need a sparse table which contains a set of "override" values for another table. I also need to specify the default value for the items overridden. For example, if the default value is 17, then foo,bar,baz will have the values 17,21,17: table "things" table "xvalue" name stuff name xval ---- ----- ---- ---- foo ... ...