oracle

Oracle UPDATEs to Certain Table Hang Indefinitely

I can update some tables just fine, but a certain table I have cannot be updated by either my ASP.NET application or SQLPLUS. Both hang indefinitely. I have to forcibly quit SQLPLUS. I have update statments both in standard OracleCommand objects running a: cmd.ExecuteNonQuery(); but I also have asp:SqlDataSources bound to a GridVie...

Best practices when using oracle DB and .NET

What are the best practices or pit falls that we need to be aware of when using Microsoft Oracle provider in a web service centric .NET application? ...

Is there a nesting limit for correlated subqueries in Oracle?

Here is the code that will help you understand my question: create table con ( content_id number); create table mat ( material_id number, content_id number, resolution number, file_location varchar2(50)); create table con_groups (content_group_id number, content_id number); insert into con values (99); insert into mat values (1, 99, 7,...

"no descriptor for this position" Oracle error

We're trying a basic insert statement: INSERT INTO HOLIDAY (HOLIDAY_TYPE_CODE, CALENDAR_NAME, HOLIDAY_DATE, DESCRIPTION, CREATE_TS, UPDATE_TS) VALUES (2, 'CZK', '17-NOV-2009', NULL, SYSDATE, NULL); And we get this error: ORA-24334: no descriptor for this position What are we doing wrong here?? ...

Oracle primary keys: NUMBER vs NUMBER(7,0)

Is there any benefit to specifying the precision on the PK? Is 7,0 sufficient, given that there will probably never be more than a few thousand records? Any dangers to not specifying the precision? ...

How do I concatenate variables with a string to create an Oracle table name in a FROM clause in a stored procedure?

e.g. select * from v_schema || '.tbl_a@' || abc.world ...

How to avoid repeating a lengthy CORRELATED subquery?

Here is the code to help you understand my question: create table con ( content_id number); create table mat ( material_id number, content_id number, resolution number, file_location varchar2(50), file_size number); create table con_groups (content_group_id number, content_id number); insert into con values (99); insert into mat values...

Modeling One-to-Constant Relationship

Can a One-To-Constant Relationship be completely modeled in Oracle with constraints? In other words, the PARENT entity ALWAYS has EXACTLY n-CHILDREN of the child entity, and each child only has one parent. Consider n to be a database constant. ...

Oracle's NCHR() function is behaving differently across platforms. How to fix?

I am encountering an issue with some Oracle code which uses the NCHR function. The same code is running on Windows/Ora10g and Linux/Ora11g, yet it behaves differently. The NLS characterset is identical on both instances. I am trying to determine if this is an issue with Oracle versions or because of the OS. Has anyone encountered thi...

Oracle TNS: net service name is incorrecly specified

Help! I'm a newbie to Oracle who's trying to access a database on an old server we inherited for a client. I'm confident I have the oracle database and listener started and working, but when trying to access sqlplus or the exp commands, I'm getting the following error: ORA-12162: TNS:net service name is incorrectly specified I have ed...

MaxClient Directive in apache

we have php web application on two db linux web server connected with RAC load balancy with two Oracle db server.. we have a high traffic .. about 500 client concurrency on the same time conenct the web application .. our linux web server is 2 giga RAM .. and 2 processors. we want to make apache more performance .. i have installed zend ...

row is not inserting into table

The table is present in oracle database, I am updating that table with one record. It's executing and when I type select * from that table it's showing that record. But the problem is when I commit the changes. The table is showing nothing - I am not seeing anythng inside table, it's showing 0 records. Can you please help me? insert i...

Providing a more meaningful message when an error is raised in PL/SQL

Suppose I have a PL/SQL function that selects one value from a table. If the query returns no records, I wish for the NO_DATA_FOUND error to propagate (so that the calling code can catch it), but with a more meaningful error message when SQLERRM is called. Here is an example of what I am trying to accomplish: FUNCTION fetch_customer_id...

Oracle: Migrating a col. with values, nulls and 0s

I'm migrating data from one db to another. I have a numeric col. that contains some values, some 0s and some nulls. My gut feeling is to convert all the 0s to NULLs. This will store an optional, user-provided number. Any reason NOT to convert all the 0s to NULLs? ...

How can I sort data using an 'order by' sql clause with specified data at the beginning

I currently have a table(/grid) of data that I can page, filter and sort. On the table I also have a built in checkbox column. Paging, filtering and sorting right now happen within the SQL query. What I want to be able to do is sort by the clicked items in my checkbox column. This would bring all items that are checked to the front o...

"Cursor is closed" error - when trying to execute an Oracle SP using JDBC

The Oracle version of our database is 10g. The stored procedure selects all the elements in a table and returns a REF CURSOR type as follows: create or replace PROCEDURE S_S_TEST( test_OUT OUT OAS_TYPES.REFCURSOR ) AS BEGIN OPEN test_OUT FOR SELECT * FROM table_p; CLOSE test_OUT; END S_S_TEST; When this sto...

ORACLE Batching DDL statements within a Execute Immediate

I'm trying to run multiple ddl statements within one Execute Immediate statement. i thought this would be pretty straight forward but it seems i'm mistaken. The idea is this: declare v_cnt number; begin select count(*) into v_cnt from all_tables where table_name='TABLE1' and owner = 'AMS'; if v_cnt = 0 then execute immediate 'C...

Impact for increasing the column length of an existing table.

The datatype of a column in a existing table is of type Char(4). Now, is there any impact while selecting that row if I increase the column length to say 10. ...

Oracle SQL - Strange 'ORA-00907 Missing Right Parenthesis' error

Hi folks, I've written a query to test out a simple linear regression to get the line of best-fit between two sets of weight measures. It should hopefully return results like below, but it's throwing a strange error 'ORA-00907 Missing Right Parenthesis' and TOAD is pointing towards the part where it says: case ( when trn.wid_locati...

Parsing tnsnames.ora in Visual C# 2008

Hi all, How I parse tnsnames.ora file using Visual C# (Visual Studio 2008 Express edition) to get the tnsnames ? For instance, my tnsnames.ora file contains ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = shaman)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) BILL = ...