oracle

How to determine database type for a given JDBC connection?

i need to handle resultset returning stored procedures/functions for three databases (oracle, sybase, MS-Server). the procedures/functions are generally the same but the call is a little different in oracle. statement.registerOutParameter(1, oracle.jdbc.OracleTypes.CURSOR); . . . statement.execute(); ResultSet rs = (ResultSet)statem...

view values of variables from oracle PL/SQL

I'm running a PL/SQL block that is supposed to be calling a stored procedure who's output parameters are supposed to be populating variables in the PL/SQL block. The procedure compiles, and the PL/SQL block runs successfully. But I'd like to check the values of the variables populated by the procedure. Is there a way to output these val...

What is a View in Oracle?

What is a view in Oracle? ...

Shortcuts for creating/modifying web forms in PHP?

I'm new to PHP and before I waste a lot of time doing things the hard way, I wanted to find out if there are shortcuts/techniques to creating PHP web forms apps. All this app will do is display web forms with data from 1 or more tables. In addition to displaying data, the user must be able to update the form and add new data to the for...

Oracle: how to add minutes to a timestamp?

I need to add 30 minutes to values in a Oracle date column. I do this in my SELECT statement by specifying "to_char(date_and_time + (.000694 * 31)", which works fine most of the time. But not when the time is on the AM/PM border. For example, adding 30 minutes to "12:30" [which is PM] returns "1:00" which is AM. The answer I expect i...

relational terminology: foreign key source, destination?

I'm doing some FK analysis of our tables by making a directed graph representing FK dependencies and then traversing the graph. In my code, I name everything using directed graph terminology, but I'd like to have something a bit more "user friendly" in the report. In this scenario: create table t1(a varchar2(20)); alter table t1 add c...

Oracle single-table constant merge with CLOB using JDBC

As a follow-up to this question, I need help with the following scenario: In Oracle, given a simple data table: create table data ( id VARCHAR2(255), key VARCHAR2(255), value CLOB); I am using the following merge command: merge into data using ( select ? id, ? key, ? value fr...

How to minimize transaction overhead in Oracle?

I have to simultaneously load data into a table and run queries on it. Because of data nature, I can trade integrity for performance. How can I minimize the overhead of transactions? Unfortunately, alternatives like MySQL cannot be used (due to non-technical reasons). ...

Is anybody using OBIEE (formerly Siebel Analytics) ? What is your experience.

We are in the process of selecting BI stack for our data warehouse. The top contenders are OBIEE = Oracle BI Enterprise Edition (formerly Siebel Analytics) and Microstrategy. Has anyone worked with OBIEE? Lessons learned? General impressions? Flaws, strengths? ...

Is there an easy way to clone the structure of a table in Oracle?

If I have a table like: CREATE TABLE FRED ( recordId number(18) primary key, firstName varchar2(50) ); Is there an easy way to clone it's structure (not it's data) into another table of a given name. Basically I want to create table with exactly the same structure, but a different name, so that I can perform some functionality on it. ...

SQL Conversion

I want to port a project from sybase to oracle. I need to port the tables scripts (around 30) and some data in meta data tables(100 rows 2/3 tables). What will the best tool for this work? ...

notification when alter occurs on oracle database

We have a database that many persons have to have access to. I am looking for a way that will allow us to get notification whenever "alter" occurs on this database, so other parties can be aware of it. Please advise. ...

How do I compress this Oracle resultset into values according to row priority, ignoring nulls?

I'll simplify the problem as much as possible: I have an oracle table: row_priority, col1, col2, col3 0, .1, 100, {null} 12, {null}, {null}, 3 24, .2, {null}, {null} Desired result: col1, col2, col3 .2, 100, 3 So according to the priority of the row, it overrides previous row values, if given. I'm attempting to work out a solutio...

Oracle Analytics - partitions and ordering of sql queries

This came up when answering another user's question (TheSoftwareJedi)... Given the following table: ROW_PRIORITY COL1 COL2 COL3 0 0.1 100 <NULL> 12 <NULL> <NULL> 3 24 0.2 <NULL> <NULL> and the following query: select 'B' METRIC, ROW_PRIORITY, last_value(col1 ig...

Better Understanding an OC4J Stack Trace

I've been tasked with deploying an application built by a third party on an Oracle Application Server, version 10.1.3.0. I've deployed it on Oracle Application Server version 10.1.2.0 without much difficulty. I'm getting the following error: javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such dom...

oracle procedure returns integer

In oracle, I want to create a delete sproc that returns an integer based on the outcome of the deletion. this is what i have so far. create or replace PROCEDURE Testing ( iKey IN VARCHAR2 ) AS BEGIN delete from MyTable WHERE TheKey = iKey; END Testing; i've tried putting a RETURNS INTEGER in but the sproc won't compile. ...

Generating SQL Schema from XML

We are using an Oracle 11 database and a java development environment (using Eclipse) and would like to migrate several xml schemas to SQL schemas. Have looked ax xsd but really need something that we can run from ant/ Eclipse without SQL Server installed. Regards, Andy ...

How do I calculate tables size in Oracle

Hello, Being used to (and potentially spoiled by) MSSQL, I'm wondering how I can get at tables size in Oracle 10g. I have googled it so I'm now aware that I may not have as easy an option as sp_spaceused. Still the potential answers I got are most of the time outdated or don't work. Probably because I'm no DBA on the schema I'm working ...

How to find out when an Oracle table was updated the last time

Can I find out when the last INSERT, UPDATE or DELETE statement was performed on a table in an Oracle database and if so, how? A little background: The Oracle version is 10g. I have a batch application that runs regularly, reads data from a single Oracle table and writes it into a file. I would like to skip this if the data hasn't chang...

What's the best type 4 Oracle JDBC driver?

What's the best type 4 Oracle JDBC driver? What I want: Stable, few bugs and quick fixes Should warn about the usual JDBC pitfalls (connection leaks, etc) Must support CLOB [EDIT] My main issues with the "free" Oracle Type 4 driver are: I spent two weeks hunting down a cursor leak in the CLOB support code (closing the stream would...