oracle

ways to avoid global temp tables in oracle

We just converted our sql server stored procedures to oracle procedures. Sql Server SP's were highly dependent on session tables (INSERT INTO #table1...) these tables got converted as global temporary tables in oracle. We ended up with aroun 500 GTT's for our 400 SP's Now we are finding out that working with GTT's in oracle is conside...

Identity Insert In Oracle

Possible Duplicate: Which command would replace IDENTITY INSERT ON/OFF from SQLServer in Oracle? How to do Identity Insert On/Off In oracle? ...

Selecting data effectively sql

Hi, I have a very large table with over 1000 records and 200 columns. When I try to retreive records matching some criteria in the WHERE clause using SELECT statement it takes a lot of time. But most of the time I just want to select a single record that matches the criteria in the WHERE clause rather than all the records. I guess the...

Invoking a function call in a string in an Oracle Procedure

Hello, I writing an application using Oracle 10g. I am currently facing this problem. I take in "filename" as parameter of type varchar2. A sample value that filename may contain is: 'TEST || to_char(sysdate, 'DDD')'. In the procedure, I want to get the value of this file name as in TEST147. When i write: select filename into ffilena...

How to synchronize two DataBase Schemas Oracle 10G?

Hi Masters, Good Day, I am new and very naive to Oracle DB. I am using Oracle 10G. Let me explain to you. I have one source database named ( DB1) and Target Database named (DB2). I have 2 schema's named dbs1 and dbs2 in the source database (DB1). I have exported both the database schemas in Source Database (DB1) and imported it suc...

Why doesn't PHP's oci_connect return false?

I have a situation in which we have two production databases that synchronize with one other. Server One is considered the primary. Sometimes due to maintenance or a disaster Server Two will become primary. In some of our code that means we have to manually go in and edit the server name for database connections. I find this annoyi...

Mixing together Connect by, inner join and sum with Oracle

Hey there, I need help with a oracle query. Excuse me in advance for my english. Here is my setup: I have 2 tables called respectively "tasks" and "timesheets". The "tasks" table is a recursive one, that way each task can have multiple subtasks. Each timesheet is associated with a task (not necessarily the "root" task) and contains th...

Why is retreiving a ResultSet from Oracle stored procedure soooo slow ?

I have to improve some code where an Oracle stored procedure is called from a Java program. Currently the code is really really slow : up to about 8 seconds on my dev machine. On the same machine, if I call directly a SQL query that does about the same treatment and returns the same data, it takes under 100 ms... The code creates a Call...

Oracle DBMS_PROFILER only shows Anonymous in the results tables

I am new to DBMS_PROFILER. All the examples I have seen use a simple top-level procedure to demonstrate the use of the profiler, and from there get all the line numbers etc. I deploy all code in packages, and I am having great difficulty getting my profile session to populate the plsql_profiler_units with useful data. Most of my runs loo...

DB Design to store custom fields for a table

Hi All, this question came up based on the responses I got for the question http://stackoverflow.com/questions/2785033/getting-wierd-issue-with-to-number-function-in-oracle As everyone suggested that storing Numeric values in VARCHAR2 columns is not a good practice (which I totally agree with), I am wondering about a basic Design choice...

Oracle for the SQL Server DBA guides?

I am looking for a reference for a SQL Server DBA who has to come up to speed on basic Oracle 11 DBA tasks: backup, recovery, user administration, etc. There seems to be some material on the web for the reverse: Oracle -> SQL Server, but the only potentially useful resource I have found in a few searches is yet to be published: http://w...

Upside down question mark issue

We have a very strange problem in out application, all of a sudden we started noticing upside down question marks being saved along with other text typed in to the fields on the screen. These upside down question marks were not originally entered by the users and it is unclear where they come from. We are using Oracle 10g with java. And ...

Application cannot open connection to Oracle database - missing DLL OraOps9.dll

My .NET application tries to connect to an Oracle database, but the connection fails to open because it cannot find "OraOps9.dll". xxx.CreatedbConnection() failed to open connection. System.DllNotFoundException: Unable to load DLL (OraOps9.dll). at Oracle.DataAccess.Client.OpsTrace.GetRegTraceInfo(UInt32& TrcLevel) at Oracle.DataA...

How to intregrate an oracle database with an asp.net web application?

How to intregrate an oracle database with an asp.net web application?... Any good tutorial to start with? ...

Oracle : select maximum value from different columns of the same row

The whole question is pretty much in the title. For each row of the table I'd like to select the maximum of a subset of columns. For example, from this table name m1 m2 m3 m4 A 1 2 3 4 B 6 3 4 5 C 1 5 2 1 the result would be name max A 4 B 6 C 5 The query must be compatible oracle 8i. Thanks. ...

Oracle global temporary tables - maximum number of records?

Hello, Is there a limit on how many records can go to a global temporary table, before it affects performance, and does it affect performance? I am talking here about millions of records that might be inserted to a global temporary table. ...

Oracle (PL/SQL): Is UPDATE RETURNING concurrent?

I'm using table with a counter to ensure unique id's on a child element. I know it is usually better to use a sequence, but I can't use it because I have a lot of counters (a customer can create a couple of buckets and each of them needs to have their own counter, they have to start with 1 (it's a requirement, my customer needs "human r...

I want to manually insert an ASCII stream into a column of type BLOB in oracle

Is there a command that will convert ASCII into blob? I have the following table: sample_table: ------------- id : NUMBER type : NUMBER version : NUMBER data : BLOB When doing the following command: insert into sample_table values (1, 0, 1, '<?xml version="1.0" encoding="UTF-8"><Test><buffer><A></buffer></Test>' ); I'm g...

Cost of logic in a query

I have a query that looks something like this: select xmlelement("rootNode", (case when XH.ID is not null then xmlelement("xhID", XH.ID) else xmlelement("xhID", xmlattributes('true' AS "xsi:nil"), XH.ID) end), (case when XH.SER_NUM is not null then xmlelement("serialNumber", XH.SER_NUM) ...

How do I get output into Java from a SELECT stored procedure in Oracle?

I'm using Java to connect to an Oracle 10 Database. I want to create a stored procedure (don't ask why) that takes no arguments and returns a lot of rows. Specifically, in Java I want to be able to get this data with something like: ResultSet rs = stmt.executeQuery("call getChildless"); where getChildless is the query: SELECT objecti...