oracle

NHIbernate Newbie: Can someone please explain why NHibernate attempts to execute a database update during CreateQuery execution

Basically, I wish to fetch a filtered set of objects from the database (Oracle 9.2) based on the id property of the object PsalertsEvent. The code being executed is: Public Overloads Function GetAll(ByVal laterThan As Long, ByVal filteredPsalertsEvents As IList) As IList Implements IPsalertsEventRepo.GetAll 'Get all psalert...

in oracle, do explicit cursors load the entire query result in memory?

I have a table with about 1 billion rows. I'm the sole user so there's no contention on locks, etc. I noticed that when I run something like this: DECLARE CURSOR cur IS SELECT col FROM table where rownum < N; BEGIN OPEN cur; LOOP dbms_output.put_line("blah") END LOOP; CLOSE cur; END; there is a lag between the time ...

How can I enumerate the list of privileges granted to an Oracle role?

I have a homegrown Oracle role that was created long ago: create role MyRole; It's been granted the ability to select, insert, update, and delete from some tables and views. grant select on sometable to MyRole; grant insert on sometable to MyRole; grant select on someothertable to MyRole; -- etc. How can I now enumerate the specifi...

Is there a way to throttle or limit resources used by a user in Oracle?

I have a multi-user web application and am encountering issues when a third party reporting application queries my Oracle 10g database. The reporting queries are slowing the system and impacting all other users. Is there a way to throttle this user's session so their queries don't impact the other users? ...

SQL*Loader - How can i ignore certain rows with a specific charactre

Hi guys, If i have a CSV file that is in the following format "fd!","sdf","dsfds","dsfd" "fd!","asdf","dsfds","dsfd" "fd","sdf","rdsfds","dsfd" "fdd!","sdf","dsfds","fdsfd" "fd!","sdf","dsfds","dsfd" "fd","sdf","tdsfds","dsfd" "fd!","sdf","dsfds","dsfd" Is it possible to exclude any row where the first column has an exclamation mark...

Selecting a given row in a table

Hello guys, here is a simple problem. I have a table of 500 rows and what to be able to select a given row number n. This is what I am doing: select * from table where table.arg1 ='A' and time_stamp=to_date('1/8/2010','MM/DD/YYYY') and rownum = n But it would only work for the row 1, for the rest it doesn't return...

Can you estimate the time a query would take in Oracle?

Hi, all. I'm very new to Oracle and was wondering if there's a way either through some tool or programmatically to estimate how a long a query would to take to execute? THanks! ...

Does Squirrel SQL or Oracle have a way to alias table names in queries?

I'm using Squirrel SQL with Oracle. I often have to write quick queries for tables with longish names. It would be nice if I could give aliases to them and write queries like "select * from ft where n='blah'" instead of "select * from footablelongname where nameField='blah'". I wouldn't use that sort of thing in applications, but it wou...

How can I call a PL/SQL procedure without specifying a variable to hold its OUT parameter?

I'd like to call a PL/SQL stored procedure that has an OUT parameter specified, but I don't care about the return value. I just care that the procedure executed successfully, i.e. no exceptions thrown. Do I have to define a dummy variable in my calling PL/SQL block to receive the out parameter even though I don't want it? It clutters ...

SQL Query to retrieve highest item up to a point in a group

The best way of describing this is I have a table of people with their names and ages. Assume that people with the same surname are from the same family. I need a query in oracle which will retrieve a list of the oldest person in each family, but not older than a certain age. Table: person name surname age ==============...

How to configure oracle instantclient for mono?

Mono is really awesome. Some of our applications worked in linux out of the box even without recompiling the binary. However I am having tough time to configure oracle instantclient to use it with mono. I installed instantclient on a CentOS VM(by installing instantclient rpm) but however I did not find TNSNAMES.ORA anywhere. I searche...

Calling oracle stored procedure from Excel - VBA

I have to execute an Oracle stored procedure from vba (Excel) with around 38 input parameters. The stored procedure will insert some values in the destination table once that is executed. When it is executed through VBA the number of fields which is inserted is less than when it is executed directly from the backen...

Oracle UCM 10g XML data island

What is the best way to manage XML data island in Oracle UCM 10g. I need to add and delete result set items dynamically from form page. The main problem is Oracle does not delete result set item if you don't pass all data fields with blank values. Please give any suggestions. ...

How to have a primary key with null values using empty string ?

I have a table in which I need both the values to be primary because I am referencing this combination as foreign key in the other tables. Table definition and the data I need to put are as follows create table T1 ( sno number(10), desc varchar2(10), constraint T1_PK primary key(sno,desc) ) DATA to put sno | desc -------------...

SQL: Query 2 columns; if one is valid then ignore the other

Hello, I'm not sure how to approach this SQL statement so please advise, even if its just a pointer to something I can read up on I have a table, such as the following ID OVER60 OVER80 1 N N 2 Y N 3 Y Y The IDs are unique, what I need to do is to create a SELECT st...

Oracle storeprocedures

Hi, Since I am new to oracle , please tell me what different ways to find packages , store procedures, triggers ,functions, indexes, tablespaces Thanks ...

Oracle SQL case when for ordering

I have to sort out my data by some column, such that some specific value appears first. So for a query like this ... SELECT rtrim(taskid) into v_taskid FROM tasks where /* some where clausers */ and rownum = 1 ... I have based it on case when, but what bothers me is three nested selects I have now: SELECT rtrim(taskid) ...

pipelined function

Can someone provide an example of how to use parallel table function in oracle pl/sql. We need to run massive queries for 15 years and combine the result. SELECT * FROM Table(TableFunction(cursor(SELECT * FROM year_table))) ...is what we want effectively. The innermost select will give all the years, and the table function will t...

Difference between "COMPRESS FOR ALL OPERATIONS" and "COMPRESS FOR OLTP"?

I was looking through Oracle's OLTP Table Compression (11g onwards) documentation as well as online resources to find the syntax and came across two different versions: COMPRESS FOR ALL OPERATIONS and COMPRESS FOR OLTP The documentation I looked through didn't mention any alternative syntax, so i was wondering if anyone here might...

Long queue times for oracle row locks

I keep running into "enq: TX - row lock contention", when I run the Sql command below in a oracle 9 DB. The table mytable is a small table, with less than 300 lines. UPDATE MYTABLE SET col1 = col1 + :B3 , col2 = SYSDATE WHERE :B2 = col3 AND :B1 = col4 I run 10 threads at the same time, and some ...