oracle10g

Logging JPA SQL with Weblogic 10.3

大憨熊 提交于 2019-11-30 23:08:04
By looking into the Open JPA website i've found that i can log the generated SQL by using the following: <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/> If i try to add the above property to my persistence.xml i get the following warning from weblogic: <Warning> <J2EE> <BEA-160202> <You have specified a ope njpa.Log setting in your configuration for persistence unit services.ear#services-ejb.jar#exp#exp. This setting will be ignored, and all log messages will be sent to the WebLogic logging subsystem. Trace-level logging is controlle d by the various JPA

How to override >2499 character error in Oracle DB?

夙愿已清 提交于 2019-11-30 22:50:46
I have a Oracle query which I'm executing through shell script and in that my query is getting exceeded the maximum length of 2499. I'm getting error SP2-0027: INPUT IS TOO LONG(> 2499 CHARACTERS) - LINE IGNORED Here are some options for working around SQL*Plus line length limitations: Upgrade to 12.2(?) client. On 12.2 the client allows up to 4999 characters. Which is infuriating in a way - if Oracle finally admits that 2499 is not enough, why did they only increase the limit to 4999? Add line breaks. Split the results into multiple lines. If using Windows make sure to use both carriage

Alter a nonunique index to a unique index

依然范特西╮ 提交于 2019-11-30 22:34:01
问题 I have a few non-unique constraints that I want to alter into unique constraints ( business rules have changed since the data model was made ). Is there any way to do it with out dropping and recreating as a unique constraint? I was thinking there would be an option in the alter constraint command, but I have not found anything. Thanks!! 回答1: You can't modify a constraint in the way you wish you can only drop and recreate it. If you want to do this with no downtime then look into the DBMS

How can I monitor SQL activity on Oracle? [closed]

China☆狼群 提交于 2019-11-30 20:43:36
I'd like to find a tool for Oracle that is similar to the SQL Server Profiler, but a cursory search hasn't yielded any good results. I just want to see, in real time, the queries that my application are making against the database. Any suggestions? Quest software has some really good tools for Oracle. I think that both Foglight Performance Analysis for Oracle and Spotlight do what you're looking for. Not sure for Spotlight though. The v$ views in Oracle (which a lot of tools use) offer a wealth of information if you have access to them. Here's an example on askTom to find the sql the current

Oracle - string combinatorial permutation

a 夏天 提交于 2019-11-30 20:25:15
I think I have a complex requirement. It's a combinatorial permutation using Oracle 10.2, I'was able to solve it using cartesian joins, but I think that it need some improvements to made it simplest and more flexible. Main behaviour. input string : 'one two' output : 'one' 'two' 'one two' 'two one' For my solution I've restricted the number of strings to 5 (note that the output is a number near the factorial) SQL: with My_Input_String as (select 1 as str_id, 'alpha beta omega gama' as str from dual ) --------logic------- , String_Parse as ( SELECT REGEXP_SUBSTR(str, '[^ ]+', 1, ROWNUM) str

JPA Entiy on synonym instead of table

眉间皱痕 提交于 2019-11-30 19:35:12
I have a Seam 2.2 based Java EE 5 web application with a bunch of tables mapped to JPA 1.0 Entities via Hibernate 3.3.3. During development it's running on a Tomcat 6, Oracle 10 XE and Windows 7. Now, we had the request by operations department to split the data model into one schema being the owner of all database objects ( myschema ) and one schema acting as the application's database user ( myschema_app ). So I did the following: create schema myschema_app grant object rights on all necessary tables from myschema (both regular ones and n:m intermediate tables) and sequences depending on the

ORA-22275: invalid LOB locator specified

对着背影说爱祢 提交于 2019-11-30 19:14:49
问题 I have huge Oracle function which is used to calculate data from 6 tables. create or replace FUNCTION STATISTICS_FUNCTION(NAMEIN IN VARCHAR2 ) RETURN CLOB AS LAST_60_CPU NUMBER; ............. LINE CLOB; CURSOR LAST_60_CPU_CURSOR IS ................. BEGIN LINE := EMPTY_CLOB(); DBMS_LOB.CREATETEMPORARY(LINE,true); OPEN LAST_60_CPU_CURSOR; LOOP FETCH LAST_60_CPU_CURSOR INTO LAST_60_EVENT_DATE, LAST_60_CPU; .................... DBMS_LOB.APPEND(LINE, TO_CHAR(LAST_60_EVENT_DATE)); DBMS_LOB.APPEND

Logging JPA SQL with Weblogic 10.3

旧街凉风 提交于 2019-11-30 17:20:11
问题 By looking into the Open JPA website i've found that i can log the generated SQL by using the following: <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO"/> If i try to add the above property to my persistence.xml i get the following warning from weblogic: <Warning> <J2EE> <BEA-160202> <You have specified a ope njpa.Log setting in your configuration for persistence unit services.ear#services-ejb.jar#exp#exp. This setting will be ignored, and all log messages will

Need to count records and group count by date on oracle db using sql developer

左心房为你撑大大i 提交于 2019-11-30 17:13:20
I have a table like the following ID created sent type ----------------------------------------------------- 0001463583000051783 31-JUL-12 1 270 0081289563000051788 01-AUG-12 1 270 0081289563000051792 01-AUG-12 1 270 0081289563000051791 01-AUG-12 1 270 0081289563000051806 01-AUG-12 1 270 0001421999000051824 06-AUG-12 1 270 0001421999000051826 06-AUG-12 1 270 0001464485000051828 06-AUG-12 1 270 0082162128000051862 09-AUG-12 2 278 0082162128000051861 09-AUG-12 2 278 0022409222082910259 09-AUG-12 3 278 I would like to have the following for output created Count --------------------- 31-JUL-12 1

Oracle text search on multiple tables and joins

杀马特。学长 韩版系。学妹 提交于 2019-11-30 16:14:24
I have the following SQL statement. select emp_no,dob,dept_no from v_depts where catsearch (emp_no,'abc',NULL) > 0 or catsearch (dept_no,'abc',NULL) > 0 where v_depts is a view. Now I would like to add one or more tables as join so that I can do text search on columns e.g. employee_details contains employee information and I can join with emp_no I have created index on employee_details table for emp_name column, however I am not able to join with v_depts to search because I modify my sql statement as select a.emp_no,a.dob,a.dept_no from v_depts a left outer join employee_details b on (a.emp_no