oracle

Deleted some Oracle DBF files by mistake - how can I tell Oracle XE to forget about them?

So I accidently deleted some DBF files (only ones specfic to my tablespaces), fortunately I was only just about to start loading data in so have lost nothing, except now can't re-create the tablespaces. If I run: select name from v$datafile; The results include the DBF files that I deleted. I attempted to run a command I found on th...

subsonic with oracle database

Can anyone advise on the best Oracle ASP.NET 3.5 ORM in the land..pros and cons? How good is Subsonic 3.0 with Oracle? Thanks ...

Problem with return value of oci_parse

what will be the condition of if , where i want to execute some command inside if ,if there is no row returned by the query. if() { } else { } ?> ...

How do I browse databases on an Oracle Server?

So I'm coming from a position as a SQL Server developer who has written a little bit of PL/SQL way back in the mists of time but effectively knows nothing. I've got a laptop, it's running Oracle. There is a database on the laptop which I need to have a look at and neither I, nor anyone else I can speak to, knows what it's called. I ha...

How do I get the browser to update before my next Javascript function is called?

Hey all, I'm having a bit of trouble getting the desired functionality from my function... Basically, I'm making two calls to AJAX functions (as provided by Oracle APEX, so I can't change these) but they're taking a while. I'd like to show the standard AJAXy spinning gif while the action was going on, but I'm not having much luck. He...

Is it possible to store '' (empty string) as a non NULL value in the database?

I am using Oracle DB. At the database level, when you set a column value to either NULL or '' (empty string), the fetched value is NULL in both cases. Is it possible to store '' (empty string) as a non NULL value in the database? I execute this UPDATE contacts SET last_name = '' WHERE id = '1001'; commit; SELECT last_name, ID FROM c...

Why isn't index used for this query?

I had a query where an index was not used when I thought it could be, so I reproduced it out of curiosity: Create a test_table with 1.000.000 rows (10 distinct values in col, 500 bytes of data in some_data). CREATE TABLE test_table AS ( SELECT MOD(ROWNUM,10) col, LPAD('x', 500, 'x') some_data FROM dual CONNECT BY ROWNUM <= 100000...

Problem retrieving time from date field in oracle stored procedure

I'm having problems retrieving the time from a date field in a SP. If I run the query: select TO_CHAR(HOR_HST_ATN,'YYYY/MM/DD HH24:MI:SS') AS HOR_HST_ATN FROM AAM0_DT_RSTCN ; It returns the date and time ok. But in the SP, the code: SELECT FEC_DSD_ATN, FEC_HST_ATN, NOM_SEM_DSD_ATN, NOM_SEM_HST_ATN, TO_DATE(HOR_DSD_ATN ,'DD/MM...

quering an external oracle db in rails application

I have a website which useses a mysql database for its whole operation . But for a new requirement i need to query a external oracle database( used by other component) and compile a list of items and display in a page in the website. How is it possible to connect to a external database just for rendering a single page. And is it possib...

How to find locked rows in Oracle

We have an Oracle database, and the customer account table has about a million rows. Over the years, we've built four different UIs (two in Oracle Forms, two in .Net), all of which remain in use. We have a number of background tasks (both persistent and scheduled) as well. Something is occasionally holding a long lock (say, more than 3...

Oracle build order and PL/SQL package dependencies

I'm trying to build up a list of PL/SQL package dependencies so that I can help set up an automated build script for my packages to run on the test server. Is there a way to start with a single package (a "root" package identified by name, ideally) and then find all of the dependencies, and the order they must be compiled in? Dependenci...

Fluent NHibernate is trying to convert my GUID primary keys to numbers when querying.

Hi, I'm observing some strange behavior whilst trying to perform a query on an NHibernate entity. The primary key of my object is a string (guid), but when I pass in the guid string I wish to query by, I get an exception, NHibernate.ADOException: could not execute query System.FormatException: Input string '6eaa591f-bb75-4c0b-8acb-...

Java type for date/time when using Oracle Date with Hibernate

We have a Oracle Date column. At first in our Java/Hibernate class we were using java.sql.Date. This worked but it didn't seem to store any time information in the database when we save so I changed the Java data type to Timestamp. Now we get this error: springframework.beans.factory.BeanCreationException: Error creating bean wi...

what are the OleDbTypes associated with Oracle Number and varchar2 when calling a function

I'm trying to map OleDb parameters to an Oracle Function. I was able to do this using the System.Data.Oracle namespace but then found that this is depricated, so I thought i would re-write it as OldDb to avoid installing the Oracle Provider. I have defined the following oracle function as an example: create function GetImagePath (AIRS...

oracle db lock issue, commit

This is oracle 10g. If I issue an update on a table from sqlplus but do not commit, then in another session update the same row and try to commit, it just hangs until I commit the first one. I know some would argue it's the locking mechanism but the application we have does the same thing and users are being blocked. Whats the best way ...

Please recommend a way to deploy into a Linux box in a LAN environment

Hi, have you struggled with Linux deployment before? I need to deploy an application into a dedicated Linux box with no outside network access. The configuration should be as simple as possible, robust for different configurations (missing libraries and build tools) and preferably automatic. Another difficulty I need to consider is that...

sql order by numeric string .

I am using oracle 10. I need to sort my result set according to two numeric string fields. one sort criterion field holds data like this: FIELD1: FO-100001001001 FO-100001002001 FO-100001003001 SQ-200001003001 FC-102001003001 the other : FIELD2: 000203 000567 349990 I need to combine the two criterion , the first criterion take t...

Query parent and child entries of one element in a single row

Hi there, I'm searching for the best way to display parent and child entries in one row. Example: Table A ID | PARENT_ID | VALUE ============================= 1 | | A 2 | 1 | B 3 | 2 | C 4 | | D 5 | 4 | E So I want to get the following result: ID ...

How to use Oracle SQLdeveloper with HSQL / Hypersonic DB's JDBC driver

I'd like to use Oracle's SQLdeveloper to visualize my HSQLDB tables. An instruction on how to use it with MySQL can be found on http://blogs.techrepublic.com.com/programming-and-development/?p=564 ... and I know that Oracle points to a location where to download all JDBC drivers. With MySQL this worked, however, including the JAR file ...

how to avoid & and % in search

Hi i am getting query output as all Records when i put & and % sign in my search string I am using oracle and mysql as a database How i will avoid this , this is dynamically generated query snipit using java WHERE 0 = 0 AND (LOWER (business_keywords) LIKE '%&%'); and WHERE 0 = 0 AND (LOWER (business_keywords) LIKE '%%%'); thank...