oracle

One check constraint or multiple check constraints?

Any suggestions on whether fewer check constraints are better, or more? How should they be grouped if at all? Suppose I have 3 columns which are VARCHAR2(1 BYTE), each of which is a 'T'/'F' flag. I want to add a check constraint to each column specifying that only characters IN ('T', 'F') are allowed. Should I have 3 separate check c...

Entity Framework - Why does EF use LEFT OUTER JOIN's in a 1-to-1 relationship?

Why does .NET Entity Framework produce SQL that uses a subquery and left outer join on a simple 1-to-1 relationship? I expected to see a simple join on the two tables. I'm using Devart Dotconnect for Oracle. Any ideas? Below is the output I see courtesy of the EFTracingProvider: SELECT 1 AS C1, "Join1".USER_ID1 AS USER_ID, ... FROM "M...

How to get array using Oracle sql query

I want to display result set of Years between From date - To date using oracle SQL on dual table e.g. if i pass - From date as 1/1/1900 and To Date as 1/1/2000 then it shoold display Only Years 1900 1901 1902 - - 2000 ...

OWSM custom security policy for JAX-WS, GenericFault

Hi, I tried creating custom security and policy as given here: http://download.oracle.com/docs/cd/E15523_01/relnotes.1111/e10132/owsm.htm#CIADFGGC when I run the service client custom assertion is executed, returning successfully. public IResult execute(IContext context) throws WSMException { try { System.out....

Types of Index in oracle?

What are the type of indexes in oracle? How to identify the index need to create? ...

OCI, an appetizer

Can anybody point me to a good OCI quick tutorial? I took a tour of official Oracle documentation, but it is really huge (and I know OCI deserves every line of it, anyway). Since I'm starting off with OCI I would like to have something more brief to play around with initially, and by which I can figure out how this interface works. A...

Oracle table fragmentation

How do I fragment a table so that it is distributed over multiple oracle 9i servers. ...

How do the different services in Oracle SOA relate to each other?

I'm am trying to figure out how the Oracle "Layered Architecture Model" works, and I am very confused about what the business, data, and presentation do, and how they relate to each other. I have seen many diagrams showing how this should work, but some real world examples would be useful? For example I am guessing that web applications...

Xcode is not calling asp.net webservice

I have oracle database and using webservice i want to insert some records in to it So i created webservice in asp.net as follows public bool PickPill(string Me_id, string Mem_device_id, string Test_datetime, string Creation_id, string PillBayNo) { string Hed_seq_id = Hed_seq_Id(); bool ResultHED = InsHealthEData(Hed...

Select and Insert across dblink

I am having a bit of trouble with a select into insert across a dblink in oracle 10. I am using the following statement: INSERT INTO LOCAL.TABLE_1 ( COL1, COL2) SELECT COL1, COL2 FROM REMOTE.TABLE1@dblink s WHERE COL1 IN ( SELECT COL1 FROM WORKING_TABLE) When I run the statement the following is what gets run against the remote ser...

SQL Query Help: how to select just start and end rows of groups (Oracle)?

(Apologies for the title of this question - I wasn't overly sure how to explain it) Not sure whether this can be done in SQL. Below is a (somewhat truncated) sample of an event log table. EVENT ID DATE TIME --------- ---------- -------- ---- ONE_THING 0006241800 20091109 1719 ONE_THING 0006944800 20091109 1...

PL/SQL embedded insert into table that may not exist

Hi, I much prefer using this 'embedded' style inserts in a pl/sql block (opposed to the execute immediate style dynamic sql - where you have to delimit quotes etc). -- a contrived example PROCEDURE CreateReport( customer IN VARCHAR2, reportdate IN DATE ) BEGIN -- drop table, create table with explicit column list CreateReportTa...

Refresh Oracle master files in WebFocus

I am just learning WebFocus. I have access to our client's WebFocus server through Developer Studio, but not the Oracle db it connects to. Another company is responsible for the database and makes changes without telling us. I am working on a report and I'm sure it is failing because of the db schema changes. Is there any way to rebu...

Oracle ALTER DATABASE OPEN

Hi everyone, Im having some trouble with an oracle database. Every time i try to connect, i get this message. ORA-01033: ORACLE initialization or shutdown in progress I searched the web, and found that the solution is to execute an alter database open command, but what I dont understand is where should i execute if, since I ca...

Avoid implicit conversion from date to timestamp for selects with Oracle using Hibernate

I'm using Hibernate 3.2.7.GA criteria queries to select rows from an Oracle Enterprise Edition 10.2.0.4.0 database, filtering by a timestamp field. The field in question is of type java.util.Date in Java, and DATE in Oracle. It turns out that the field gets mapped to java.sql.Timestamp, and Oracle converts all rows to TIMESTAMP before ...

Oracle datetime in VB.net

I have a Oracle procedure to which I have to pass a datetime value (2/5/2010 11:46 AM) How do I pass this value from VB.net. When I pass the date as shown below it is not returning any records though there are records. With Cmd .Connection = FactsConn .CommandType = CommandType.StoredProcedure ...

Oracle - correlated subquery problems

I have this query: select acc_num from (select distinct ac_outer.acc_num, ac_outer.owner from ac_tab ac_outer where (ac_outer.owner = '1234567') and ac_outer.owner = (select sq.owner from (select a1.owner from ac_tab a1 ...

oracle's pro*C compiler and gnu C (__builtin_va_list, __attribute__, etc)

I'm compiling a database library with pro*C which converts the .ppc library file to a .c file that gcc can use. However, I'm getting a lot of errors in pro*C like the following PCC-S-02201, Encountered the symbol "__ attribute__ " when expecting one of the following ... , Encountered the symbol "__builtin_va_list" wh...

How do you find out which database links are used in queries for the Oracle RDBMS?

I would like to find out if any and which database links are being used, for a schema, and in which tables. Is it possible via the data dictionary somehow? Is this possible with the Oracle RDBMS? ...

i want to copy the output of unix and sqlplus into a file .

I am using Solaris. I have to log into sql plus and run some queries, which give a huge result set. I want to copy all that into a file. Is there any command for it in unix or sqlplus ? ...