oracle10g

why DataColumn AllowDbNull is true even if oracle db does not allow null

Hi. I have column SomeId in table SomeLink. When I look with tOra or Sql Plus Worksheet both state: tOra: Column name Data type Default Null Comment SOMEID INTEGER {null} NOT NULL {null} Sql Plus: SOMEID NOT NULL NUMBER(38) I have authored a method that's intended to give default values to all...

MVC + Nhibernate + Oracle Schema Configuration

Our customer wants us to use a connectionstring with username = "external" and add schemaName "original" infront of our queries like: "select columnA from original.TableA" I dont want to change mapping files which are shared by other projects, tried adding default schema as: <property name="default_schema">original</property> But t...

SqlPlus on mac osx 10.6 doesn't work

When i try to run this #sqlplus system@orcl it gives me this error SQL*Plus: Release 10.1.0.3.0 - Production on Tue Apr 20 02:24:41 2010 Copyright (c) 1982, 2004, Oracle. All rights reserved. Enter password: ERROR: ORA-12154: TNS:could not resolve the connect identifier specified the oracle server is working , I can connect th...

Show child and parent together using CONNECT BY Sql statement

I have an sql statement that currently is just returning all the end parent rows for a list of child rows: SELECT DISTINCT row FROM table heirarchy WHERE parent_row = NULL CONNECT BY nocycle PRIOR parent_row = row START WITH row IN (select statement returning child rows) Is there a way to show the child and its ...

ORACLE:- 'SELECT ORDER BY ASC' but 'USA' always first.

I have to write a drop down query for countries. But USA should always be first. The rest of the countries are in alphabetical order I tried the following query SELECT countries_id ,countries_name FROM get_countries WHERE countries_id = 138 UNION SELECT ...

How Oracle 10g evaluates NULL in boolean expressions

if not (i_ReLaunch = 1 and (dt_enddate is not null)) How this epression will be evaluated in Oracle 10g when the input value of the i_ReLaunch = null and the value of the dt_enddate is not null it is entering the loop. According to the rules in normal c# and all it should not enter the loop as it will be as follows with the values. ...

Oracle output: cursor, file, or very long string?

First, the setup: I have a table in an Oracle10g database with spatial columns. I need to be able to pass in a spatial reference so that I can reproject the geometry into an arbitrary coordinate system. Ultimately, I need to compress the results of this projection to a zip file and make it available for download through a Silverlight ...

Global Temporary Table "On commit delete rows" functionality discrepancy.

I have a global temporary table. I shall call him GTT, for that was it's initials. My GTT never hurt anyone, and did everything I bade of it. I asked my GTT to delete rows on commit. This is a valid function in the creation script of my GTT in oracle. I wanted to be able to have different users see GTT with their own data, and not the ...

cx_Oracle and output variables

I'm trying to do this again an Oracle 10 database: cursor = connection.cursor() lOutput = cursor.var(cx_Oracle.STRING) cursor.execute(""" BEGIN %(out)s := 'N'; END;""", {'out' : lOutput}) print lOutput.value but I'm getting DatabaseError: ORA-01036: illegal variable name/number Is...

What is the impact/limitation of oracle select with large number of bind variables?

We had our oracle server choking during processing a select statement with close to 3500(!!) bind variables. This select is, obviously, built dynamically by code that we can't change. During the execution of this select the db server went to 100% cpu usage and our system almost halted. We know how to reproduce this problem. So we can p...

SQl count() help with a select statement

HI im using this code SELECT MACH_NO, COUNT(MACH_NO) AS TOTAL_REPORTS FROM MAINTENANCE_LOG GROUP BY MACH_NO; to retrieve some data which gives MACH_NO TOTAL_REPORTS 1 4 5 2 8 1 7 1 now how can i retrieve only where total reports is bigger than three? I TRIED WHE...

Is it dangerous to have table with big number of columns?

Is it a dangerous practice to have tables with large number of columns. Is there possibility of some performance or memory issues? My DB is Oracle 10g. It is easier to add columns for existing table then rearrange structure of db in my case. I'm talking about 30-50 additional columns to the table that already has had about 50 columns in ...

LOBSEGMENT space management

Hello M. Cave please, can you help me about LOBSEGMENT space optimization ? My table has two fields 630MB CLOB; There are two of lobsegment 28152MB 28171MB respectively, relative to these two fields Can I do something to better manage the space? Thank you, Tutulica ...

SQL query for the latest record for each day

I've got an Oracle 10g database with a table with a structure and content very similar to the following: CREATE TABLE MyTable ( id INTEGER PRIMARY KEY, otherData VARCHAR2(100), submitted DATE ); INSERT INTO MyTable VALUES (1, 'a', TO_DATE('28/04/2010 05:13', ''DD/MM/YYYY HH24:MI)); INSERT INTO MyTable VALUES (2, '...

Difference in select for update of ... in Oracle Database 10g and 11g

Hi, I found out that Oracle Database 10g and 11g treat the following PL/SQL block differently (I am using scott schema for convenience): DECLARE v_ename bonus.ename%TYPE; BEGIN SELECT b.ename INTO v_ename FROM bonus b JOIN emp e ON b.ename = e.ename JOIN dept d ON d.deptno = e.deptno WHERE b.ename = 'Scott' ...

Is it possible to connect to remote SQL Server database from Oracle 10g ?

I want to fetch data from remote SQL Server 2008 from Oracle 10g without installing anything on remote machine .. How can I achieve that ? ...

Is there a way to parametrize ORACLE 10g SELECT-query with IN-clause

I saw couple of SO questions (SO) concerning SQL-server. For SQL-server there was no decent solution. All were hacks/workarounds. What about Oracle? Is it same answer (Paremeterizing each value)? Any Oracle example without LINQ would be appreciated (I have .NET 2.0). Thanks & BR -Matti ...

Is there an open source alternative to SQL Data Dude for Oracle?

Is there an open source alternative to SQL Data Dude for Oracle? ...

sql query --need some suggestions

I have a table with list of cycle codes.CYCLE_DEFINITION. each and every cycle_code has 12 months entries in another table(PM1_CYCLE_STATE). Each and every month has a cycle_start_date and a cycle_close_date. i will check with a particular date(lets say sysdate) and check what is the current month of every cycle.additionally i will also ...

Insert problem with Oracle using Nhibernate

There is a CLOB field we are trying to insert html content and sometimes we are getting an error as: ORA-01461: can bind a LONG value only for insert into a LONG column When i used nhibernate profiler and copy the query to Toad, it asked me to enter values for variables called "NBSP"! Is this means that nhibernate doesnt escape spe...