oracle10g

exporting db objects for version control

为君一笑 提交于 2019-12-06 16:22:13
We are implementing version control for our project. As part of this we need to check in all DB objects. We have tables, procedures, functions, packages, view and materialized view. Problem is there are many objects and we need to put source code file wise. e.g. There are tables T1, T2, T3 and we need files Table_T1.txt which will have T1 definition ( columns definition, indexes for the table and grants) and so on for all objects. I m aware of metadata tables such as DBA_VIEWS , dba_source and DBMS_METADATA.GET_DDL etc where I can find required information but how to pull that information

How to store an array of bytes in Oracle?

元气小坏坏 提交于 2019-12-06 15:29:10
问题 I want to store a short array of 64 bytes in Oracle database (a password hash). I thought char(64 byte) is what I need, but it seems like it doesn't work. In Microsoft SQL, I use binary and varbinary types. What type do I need to use in Oracle? Every example I've found uses blob to store binary data, but I suppose blob is intended only for large objects, not for fixed size short arrays. When updating the data, is the code like this appropriate: byte[] passwordHash = GenerateHash(); using

Logging Oracle Java Stored Procedure using Java Logging API (java.util.logging )

眉间皱痕 提交于 2019-12-06 14:46:02
I've developed a new Java(1.4) Stored Procedure in Oracle (10g). I've never done this before, I usually keep Java and the DB separated but this was a requisite. So I developed a Java code that can be deployed in Tomcat as well as a Stored Procedure in Oracle. For this I used the Java Logging API. I can execute the stored procedure in Oracle, but I can't find the logs. I would like to know what should I do in order to print the logs, it can be to Oracle logs or trc files, or even, if possible, configure it to print the logs to another specific folder. Does anyone know how to achieve this?

can we call procedure inside a function in PL/SQL?

一笑奈何 提交于 2019-12-06 13:47:54
we can call the function inside the procedure , but is it possible to call procedure inside the function ? I tried but I can't call procedure inside the function. could you tell me why we can not call the procedure inside the function? " I tried but I can't call procedure inside the function." How did you try? What did you try? In what way did you fail? Because it is permitted to call procedure inside the function. So if it isn't working for you, then the cause is something wrong in your code. We cannot possibly diagnose that without you providing a lot more information than you currently have

increasing the page width in oracle reports builder

回眸只為那壹抹淺笑 提交于 2019-12-06 12:45:38
I am designing a new report using oracle reports builder that comes with 10g. I have many columns to be inserted horizontally. But I couldn't increase the page width of the body section beyond 8.5 inches. But I can see the page width of some existing reports to be more than 16 inches. How do I increase the page width?. I have been googling for an hour but couldn't find anything useful. I have tried tinkering with the settings at, File->Page Size Tools->Options->Margin Edit->Preferences but no gain. So any help would be much welcome. Thanks. In the Object Navigator window, open up the Layout

execute immediate over database link

蓝咒 提交于 2019-12-06 12:05:54
问题 Is it possible to execute dynamic PL/SQL on a remote database via a databse link? I'm looking for something like: l_stmt := 'begin null; end;'; execute immediate l_stmt@dblink; The syntax above is obviously wrong, I get PLS-00201: identifier 'L_STMT@DBLINK' must be declared . It is possible to create a procedure remotely and then execute it. Is there a way to execute code without creating a remote procedure? EDIT: I'm trying to work around passing a type over DB link. A remote procedure

SQL Query Select first rank 1 row From Multiple ranks/Group

旧巷老猫 提交于 2019-12-06 11:36:28
问题 I have following data Table1 id col1 col2 col3 ---------------------------------- 1 abc 01/01/2012 - 1 abc 01/01/2012 A 2 abc 01/01/2012 - 2 abc 01/02/2012 - 3 abc 01/02/2012 - 3 xyz 01/01/2012 - 4 abc 01/02/2012 - 4 xyz 01/01/2012 - 4 xyz 01/02/2012 - following is order to evaluate - if(col1 is false) then evaluate col2 if(col2 is false) then col3: Col1 - xyz has first preference from all values in this column col2 - min date col3 - not '-' or min(col3) I want to return only one row for each

Table Lock happens for spring batch chunk item reader and writer

。_饼干妹妹 提交于 2019-12-06 11:24:49
问题 I am working with the spring batch data loader . I have 15000 files and processing only one file using multiresource partitioner.It seems that the table lock happens when trying to insert data in to the table.There is no parallel step defined here. it is very slow for file processing. Following is the code snippet for chunk item reader and writer and the sql output for table lock. Spring config file <step id="filestep" xmlns="http://www.springframework.org/schema/batch" > <tasklet allow-start

SQL to return the rownum of a specific row? (using Oracle db)

纵然是瞬间 提交于 2019-12-06 10:18:45
In Oracle 10g, I have this SQL: select dog.id as dogId from CANINES dog order by dog.codename asc which returns: id -- 204 203 206 923 I want to extend this query to determine the oracle rownum of a dog.id in this resultset. I have tried select rownum from (select dog.id as dogId from CANINES dog order by dog.codename asc) where dog.id=206 But this does not work out very well (it returns 1 no matter which dog.id I match on). I was expecting to get back 3. Thanks for your help! Notes http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html I am pretty sure I do not need to use rowid

Calling an Oracle stored procedure in C# using “Oracle.DataAccess” (with a parameter)

荒凉一梦 提交于 2019-12-06 08:38:48
问题 So I'm trying to call an Oracle stored procedure from my C# .NET application. Most online references I can find suggest "using System.Data.OracleClient;", but .Net 3.5 doesn't recognize that namespace so I'm using "Oracle.DataAccess.Client" instead. Here's some paraphrasing of my code below, with a previously setup and tested OracleConnection called 'myConn' already filled with parameter ':arg_myArg' (it's a number, if that matters): command.Connection = myConn; command.CommandType =