oracle

oracle spool query

Hi All, I have written the sql by name cashload.txt on unix box and kept it on the following location on unix box: exit |sqlplus -s batch/password@SW_TEST @/soft/checkfree/AccurateBXG/scripts/cashload.txt In the cashload.txt the below code is written: spool /Detail/reports/inner/SW/Rep_OIbyAccount_$DATE_FILE.csv select accountnumber|...

Is Oracle DBA Privilege include "CREATE ANY TABLE" role???

I Just need to create table from a user to any user under the same DB. letz consider 3 Schemas. Schema_1,Schema_2 and Schema_3. schema 1 had DBA Privilege. Is it possible to table in SChema_2 or Schema_3 from Schema_1???? or we need to give this role "CREATE ANY TABLE" also ?? ...

JDBC: How can I query by time in Oracle?

I have this JDBC SQL query: select * from table where TX_DATE = {d '2009-01-05'} and TX_TIME = {t '15:23:39'} This returns some rows. Note that, since Oracle has no TIME type, both columns are of type DATE. But it fails when I use JDBC parameters: select * from table where TX_DATE = ? and TX_TIME = ? where the first parameter is n...

Oracle hibernate sequence generator problem

Hello friends, I am developing an application using oracle 11g, Java(struts2) and Hibernate. I have table named mytemp with column mytemp_id which is of type NUMBER(22,0). In my mytemp.hbm.xml file id is as given below <id name="mytempId" type="big_decimal"> <column name="MYTEMP_ID" precision="22" scale="0" /> <genera...

Oracle: How are sequences implemented?

To meet some odd business requirements, I'm going to have to implement my own sequence-like counters. I'm going to make a first cut of this in the obvious way, but I would like to understand a bit more about how Oracle implements sequences. For example, can they use latches instead of locks? I've been unable to find much about this on...

version control for Oracle 10g Express

I'm looking for version control for Oracle 10g. can anyone suggest good ones (free and commercial ones) ? ...

Partition by Date and PK

I am designing a new laboratory database. My primary data tables will have at least id (PK NUMBER) and created_on (DATE). Also, for any two entries, the entry with a higher id will have a later created_on date. I plan to partition by created_on to increase performance on recently entered data. Since the columns increase together, t...

String matching in Oracle 10g where either side can have wildcards

Test case schema and data follow as: create table tmp ( vals varchar(8), mask varchar(8) ); insert into tmp values ('12345678',' '); insert into tmp values ('12_45678',' _ '); insert into tmp values ('12345678',' _ '); insert into tmp values ('92345678',' '); insert into tmp values ('92345678',' _ ')...

Inheritance in Database Design

I am designing a new laboratory database with MANY types of my main entities. The table for each entity will hold fields common to ALL types of that entity (entity_id, created_on, created_by, etc). I will then use concrete inheritance (separate table for each unique set of attributes) to store all remaining fields. I believe that this...

procedure problem

create or replace PROCEDURE XXB_RJT_HEADER_PROCEURE ( V_PROD_ID IN NUMBER, V_WARE_ID IN XXB_RJT_HEADER.WAREHOUSE_ID% TYPE, V_PAY_METH IN XXB_RJT_HEADER.PAYMENT_METHOD% TYPE, V_PAY_STAT IN XXB_RJT_HEADER.PAYMENT_STATUS% TYPE, V_ORD_ID IN XXB_RJT_HEADER.ORDER_ID% TYPE, V_ORD_DT IN XXB_RJT_HEADER.ORDER_DATE%...

Oracle 10g Setup: in Visual Studio 2008 ?

Hi i am using Oracle 10g database with ASP.NET website. I would like to know how can i make setup of Oracle 10g for deployment? Is there any way to make Oracle Database setup in Visual Studio 2008? ...

Primary Keys in Oracle and SQL Server

What's the best practice for handling primary keys using an ORM over Oracle or SQL Server? Oracle - Should I use a sequence and a trigger or let the ORM handle this? Or is there some other way ? SQL Server - Should I use the identifier data type or somehow else ? ...

How should I range partition an index with a varchar2 column in Oracle? Is it a bad idea?

I am using Oracle 10g Enterprise edition. A table in our Oracle database stores the soundex value representation of another text column. We are using a custom soundex implementation in which the soundex values are longer than are generated by traditional soundex algorithms (such as the one Oracle uses). That's really beside the point. ...

oracle10g hibernate problem

when my app startup, i get error like below, can anyone elaborate what i missed out? the app running fine when using mysql. do i miss out any extra parameter in config.xml file? 2009-08-17 11:32:12,294 [main] INFO [info.jtrac.config.DataSourceFactoryBean] - Not using embedded HSQLDB or JNDI datasource, switching on Apache DBCP data sour...

How to exclude duplicate rows when joining a table with itself.

Here's a sample table to help illustrate my problem: mysql> select * from test; +----+--------------+--------+ | id | type | siteid | +----+--------------+--------+ | 1 | First Visit | 100 | | 2 | Second Visit | 100 | | 3 | First Visit | 300 | | 4 | First Visit | 400 | | 5 | Second Visit | 500 | | 6 | Sec...

iSQLPlus not starting on Port 80

I am trying to change the port for iSQLPlus on my Oracle DB server, by making changes in the file http-web-site.xml. When I change the port to 80, in this file, the iSqlPlus doesn't start. I can nether connect over a browser or telnet to it, even from the host machine itself. On the command line, however, it does not give any errors. ...

Is the dba_transformations dictionary view only accessible when you log in AS SYSDBA?

I'm trying to query the data dictionary to find information on the transformations in the database. I've given my user DBA privileges, so I can access the DBA_ dictionary views. With this user, I can access all the DBA_ views without issues, however it seems I can only access DBA_TRANSFORMATIONS when logged in AS SYSDBA. Am I missing a s...

Targeting a Java app at Oracle AND Postgres

Does anyone have any experience with creating database agnostic apps in Java, particularly with Hibernate, and simultaneously targeting Oracle and Postgres databases? In particular I am looking at Oracle Spatial and PostGIS. We want to create a Java based SOA which can be used with both Oracle Spatial and PostGIS back ends. I've used Hi...

Oracle 11g connection prob.

Our application is based on Oracle 11g database its drivers already installed but application throws an error on runtime. "AppliMSP.ADOcommands.GetConnected Error while connecting, Provider cannot be found, It may not be properly installed." I am using OraOLEDB.oracle provider. This provider work properly on other module (Administrati...

Hibernate Timestamp with Timezone

I'm new to Hibernate and am working with an Oracle 10g database. We have columns in our tables that are of type TIMESTAMP WITH TIMEZONE. Hibernate does not seem to support this mapping directly. Is there a standard way to go about this? Thanks ...