oracle

Diff two copies of a database for meta data changes and data changes

Oracle Guru(s) I need your help. Suppose I clone an oracle database on January 1 and then make another clone of that database on January 2. Is it possible to diff the changes in meta data and data between the two clones, and then apply those changes to the January 1 Database? What tools are available? Any and all suggestions are welc...

SSIS issue when communicating with Oracle (T-SQL vs. PL/SQL?)

I have an SSIS package set up to pull data from an Oracle database into SQL Server. I recently ran into an issue that was preventing this data pull. The following code works fine in Oracle SQL Developer (it returns rows, as it should): SELECT a.MyField , a.MyOtherField, a.FromDate FROM MyTable a WHERE a.FromDate BETWEEN CONCA...

applying business rules at the database level

I'm working on a project in which we will need to determine certain types of statuses for a large body of people, stored in a database. The business rules for determining these statuses are fairly complex and may change. For example, if a person is part of group X and (if they have attribute O) has either attribute P or attribute Q,...

C# parameterized queries for Oracle - serious & dangerous bug!

This is an absolute howler. I cannot believe my own eyes, and I cannot believe nobody before me would have discovered this if it was a genuine bug in C#, so I'm putting it out for the rest of the developer community to tell me what I am doing wrong. I'm sure this question is going to involve me saying "DOH!" and smacking my head very h...

Delphi Interbase Sql Conversion to Sql Server and Oracle

hello, i have a delphi application which uses database interbase / firebird. To consult and write data I use the InterBase components palette (IBTable, IBQuery, IBDataset). I'm performing the conversion of my system to sqlserver / Oracle but i have thousands of queries that are assembled at runtime with SQL Instructions Specific of datab...

Quick-n-dirty results: View results of Procedure OUT cursor in SQL Worksheet?

Platform: Oracle Language: PL/SQL Issue: Want to output a procedure OUT cursor into the SQLDeveloper SQLWosksheet. Anyone know how to use the Oracle "Select * from Table( PipelinedFunction( Param ) ) " to check procedure code output cursors? I am using Crsytal Reports off of an Oracle stored procedure. Crystal requires that a procedu...

Is PARTITION RANGE ALL in your explain plan bad?

Here's my explain plan: SELECT STATEMENT, GOAL = ALL_ROWS 244492 4525870 235345240 SORT ORDER BY 244492 4525870 235345240 **PARTITION RANGE ALL** 207633 4525870 235345240 INDEX FAST FULL SCAN MCT MCT_PLANNED_CT_PK 207633 4525870 235345240 Just wondering if this is the best optimized plan for querying huge partitioned table...

Why does the following SQL script take forever to run?

I have the following Oracle SQL: Begin -- tables for c in (select table_name from user_tables) loop execute immediate ('drop table '||c.table_name||' cascade constraints'); end loop; -- sequences for c in (select sequence_name from user_sequences) loop execute immediate ('drop sequence '||c.sequence_name); end loop; End; It was giv...

SQL Stored Procedure Convert Date Parameter.

Hi, I have an sql stored procedure which accepts two dates, however when I send them in my open query, oracle does not like the date format for some reason.... How can I change the dateformat to YYYY-MM-DD from dd-mm-yyyy in the stored procedure before sending using it. e.g SET @startdate = CONVERT?? Thanks, Tina ...

Replace String in Oracle Procedure

I have a problem about oracle procedure,since I'm new in sql language :D, here is my query CREATE OR REPLACE PROCEDURE MONDESINT.UPDATECOADESCRIPTION IS DESCRIPT MONDES_MSTR_CHART_OF_ACCOUNT.NAMA_AKUN%type; BEGIN FOR SATU IN (select NO_AKUN, NAMA_AKUN from mondes_mstr_chart_of_account where NO_A...

Dependency of procedure in Oracle:

Hi all I am new to DATABASE. I am trying to figure out the way to find the procedure dependent on another procedure. Below query is giving me the dependecy of PROC1. ie Procedure called by PROC1 select REFERENCED_NAME from user_dependencies where name = 'PROC1' ; Below things I want to know: 1) Is this query even work same for Funct...

how can i pass information from ant to sql file or procedure

i am creating a user by using ant target as below <target name="create_user"> <exec executable="sqlplus" dir="${basedir}/dbsetup"> <arg value="system/oracle@orcl"/> <arg value="@create_user.sql"/> </exec> </target> and the sql files is as follows........ create user test identified by password; gra...

Oracle Data Archiving & Purging.

Can anyone please tell me what tech should i use for archiving & purging the historic data. ...

ODBC Oracle Connection error from MS Access

Hi Everyone- I currently support an MS Access database that has linked connections using the Microsoft ODBC Driver for Oracle. I can connect to the current linked tables without any issues, but we are required for security reasons to change the password on the account accessing the Server. I have changed the password successfully but...

Oracle update statement - how do you link to related tables?

I'm relatively new to Oracle, having working on MS SQL for most of my career. I'm used to doing stuff like: update t set Col1 = o.Col2 from MyTable t join OtherTable o on t.OtherID = o.ID I tried this syntax in Oracle, and it doesn't accept it. Looked in Oracle docs and couldn't find an example of what I'm trying to do. How do you...

Creating index/pk in a huge table is taking too long. I am using Oracle. How do I know if it is going well?

Hi, I have a really huge table, with ~200 million rows. It had no index/pk at all. Selects in this table were (obviously) running slow. I decided to create a PK using 3 columns. I did it in a test environment that has a smaller version of this table and it worked like a charm. So, before going home i did a ALTER TABLE HUGETABLE ADD CO...

How to fetch data from oracle database in hourly basis

Hi all, i have one table in my database say mytable, which contents request coming from other source. There is one column in this table as Time, which stores date and time(e.g. 2010/07/10 01:21:43) when request was received. Now i want to fetch the data from this table on hourly basis for each day. Means i want count of requests database...

Oracle Import Export compatibility matrix

Is there an official matrix that clearly explain how export dump format done with a specific version, is or not compatible with all others? I mean to fill this grid: Exp done with version: | 7 | 8i | 9i | 10g | 11g Is compatible with Imp 7 |yes | no | no | no | no 8i|yes |yes | no | no | no ...

How will you keep a specific country on top in a drop down list?

In a list of countries that need to be displayed in an alphabetical order, you need to place United States at the top of the list. How will do you this? I answered by saying that I will have a table structure in such a way that the US is at id-0. The rest of the countries are listed in their alphabetical order. So when I fetch from the...

Oracle sqldeveloper - how to connect DB from command line

Hi, I am writing a small DB utility. I would like to give the user the ability to open an instance of Oracle sqldeveloper directly from this utility. Is it possible to open Oracle sqldeveloper IDE that already connected to a specific DB? Something like sqldeveloper USERID/PASSWORD@DATABASE ...