oracle

How can I keep my DB connection from failing when the network is unstable?

We have a application that uses BDE connected to an Oracle DB. I use TQuery for the SQL queries, and it connects to TDatabase, we are not professional programmers, and we don't know what happens under the hood. Our network is unstable, we have an issue with packet loss. When the problem occurs, our application disconnects from the DB s...

Performance of Oracle's dbms_crypto.hash function for SHA-1

Looking for stats for input sizes of at least between 4 and 30 MB. ...

Oracle Form Builder: Switching between tabs in a form

Hi guys, i am building a form in oracle forms builder i have a tabbed canvas i need to know how to swap to the next tab when a button is pressed so what do i program into the next-tab button?? ...

Single SQL SELECT Returning multiple rows from one table row

We have a table which is of the form: ID,Value1,Value2,Value3 1,2,3,4 We need to transform this into. ID,Name,Value 1,'Value1',2 1,'Value2',3 1,'Value3',4 Is there a clever way of doing this in one SELECT statement (i.e without UNIONs)? The column names Value1,Value2 and Value3 are fixed and constant. The database is oracle 9i. ...

How to cancel a long-running Database operation?

Currently working with Oracle, but will also need a solution for MS SQL. I have a GUI that allows users to generate SQL that will be executed on the database. This can take a very long time, depending on the search they generate. I want the GUI/App to responsive during this search and I want the user to be able to cancel the search. ...

Oracle query to get Data from table inserted in last 10 mins.

I have to get data from Oracle Table in which I have one datefield called lastupdatedDate and I want to get only that rows back in which lastupdatedDate is in last 10 mins of sysdate for example if in my table I have lastupdateDate as 05/20/09 4:20:44 then I want this row back in my result until from if I run the query in between 0...

Oracle form builder not getting values from server

Hey all, I am logged into a sql server. when i insert values via SQL*Plus server, they are not registered by Form builder, but when i insert them using form builder, they do appear when i search for them on SQL*Plus... what is going on and how do i get form builder to register the values entered in SQL*Plus?? ...

Abort a PL/SQL program

How do I get a PL/SQL program to end halfway through? I haven't been able to find any way to gracefully end the program if an exception occurs - if I handle it, it loops back into the code. Basically what I want to do is force the app not to run in certain conditions. So, I want to add something like this to the top of the program: B...

How would one Drop the external user in oracle?

hi, When i give.. select * from dba_users; It ll give list of users. In that list there is a user username:first/dbgokul Password:EXTERNAL ofcourse.. this was created by me by mistake.(Long back). Now i dono how to drop this user.. kindly tel me.. how to remove this user from database..??? Thanks in advance. ...

Calculate the Sum of duration in sql query

Hello all, I have a table which has two columns start time and end time. I am able to calculate the time duration for each row but I also want to get the total duration. how to do this. Thanks ...

How to get a record using EXECUTE IMMEDIATE?

I have a bunch of functions with signatures like: FUNCTION func1 (par1 IN VARCHAR2, par2 IN NUMBER) RETURN my_rec; and I have a function for retrieving data from this bunch of functions: FUNCTION get_result (func_name IN VARCHAR2, par1 IN VARCHAR2, par2 IN NUMBER) RETURN my_rec; IS rec1 my_rec; BEGIN EXECUTE IMMEDIATE 'SE...

Oracle stored procedure OUT parameters

Hi to all, I have a stored procedure with an IN OUT parameter declared like follows: create or replace PROCEDURE RIFATT_SEGN0_INS(pIdRifattSegn0 in OUT NUMBER, pNumDossier IN VARCHAR2 , pNumConsegna IN NUMBER, pDtConsegna IN DATE, [..] ) AS [..] Whene...

Data loading in Oracle

Hi, I am facing problem in loading data. I have to copy 800,000 rows from one table to another in Oracle database. I tried for 10,000 rows first but the time it took is not satisfactory. I tried using the "BULK COLLECT" and "INSERT INTO SELECT" clause but for both the cases response time is around 35 minutes. This is not the desired re...

oracle subselect with dynamic table and column

I would like to run the following SQL select: SELECT ID, NUMERATOR, (SELECT m.COLUMNNAME FROM m.TABLENAME p WHERE p.numerator = m.numerator ) VALUE, TABLENAME, COLUMNNAME FROM MainTable m; at the current state it doesn't run at all, naturally, because oracle doesn't recognize the m.TABLENAME at all. Is it possible t...

Unit testing DDL statements that need to be in a transaction

I am working on an application that uses Oracle's built in authentication mechanisms to manage user accounts and passwords. The application also uses row level security. Basically every user that registers through the application gets an Oracle username and password instead of the typical entry in a "USERS" table. The users also receive ...

Too many columns in a single database table?

An application I am dealing has a single table with 170 columns. In my mind, it would make more sense to break this table up into smaller, more logical groupings, though you could have an issue where numerous tables have to be joined if you needed data from columns in the various tables. I am wondering what the pros and cons of these...

Oracle Hierarchical query: how to include top-level parent

I have a hierarchical query to track a reporting structure. This almost works, except that it's not reporting the very top level node, probably because the top-level people "report" to themselves. The query is: select level, empid, parentid from usertable connect by nocycle prior parentid= empid start with empid = 50 This pro...

Oracle Resource Manager Plan Design

I am new to the Oracle 10g Resource Manager and am looking for guidance on how to put together a plan to meet my goals. I will test the plan, but I'm hoping for some guidance so I don't have to try hundreds of different plan configurations. I have the following goals: Don't let non-sys sessions significantly slow down sys sessions. D...

Oracle Forms/Applications in Internet Explorer 8 using JInitator

Has anyone been able to get Oracle Forms running JInitator to loan in Internet Explorer 8 yet? I have tried removing all add-ons, various version of Java, add the domain to the trusted sites using wildcards, and using compatibility mode to no avail. I am looking to get our Oracle guys to kick there Internet Explorer 6 habit. This is r...

Is there an easy way to convert HTTP_ACCEPT_LANGUAGE to Oracle NLS_LANG settings?

When adding internationalisation capabilities to an Oracle web application (build on mod_plsql), I'd like to interpret the HTTP_ACCEPT_LANGUAGE parameter and use it to set various NLS_* settings in the Oracle session. For example: HTTP_ACCEPT_LANGUAGE=de alter session set nls_territory=germany; alter session set nls_lang=... However...