oracle10g

Frequent error in Oracle ORA-04068: existing state of packages has been discarded

天涯浪子 提交于 2019-12-18 15:09:42
问题 We're getting this error once a day on a script that runs every two hours, but at different times of the day. ERROR at line 1: ORA-04068: existing state of packages has been discarded ORA-04061: existing state of package body "PACKAGE.NAME" has been invalidated ORA-06508: PL/SQL: could not find program unit being called: "PACKAGE.NAME" ORA-06512: at line 1 Could someone list what conditions can cause this error so that we could investigate? Thanks. UPDATE: Would executing 'ALTER SESSION CLOSE

How to restore the data in a Oracle table?

梦想与她 提交于 2019-12-18 13:48:07
问题 I did a terrible mistake on my work, I executed an updated query on a oracle table without the 'where' clause and everything changed on this table, I was wondering if there is any way to restore the data on a table. I know I can use Flashback, but Is there another way to do that? If you know how to make a flashback table in oracle, please let me know. I'm using Oracle 10g R2 10.2.0.1 回答1: First, did you commit the change? If not, you can simply issue a rollback to revert your changes.

Matching Oracle duplicate column values using Soundex, Jaro Winkler and Edit Distance (UTL_MATCH)

北城余情 提交于 2019-12-18 13:38:34
问题 I am trying to find a reliable method for matching duplicate person records within the database. The data has some serious data quality issues which I am also trying to fix but until I have the go-ahead to do so I am stuck with the data I have got. The table columns available to me are: SURNAME VARCHAR2(43) FORENAME VARCHAR2(38) BIRTH_DATE DATE ADDRESS_LINE1 VARCHAR2(60) ADDRESS_LINE2 VARCHAR2(60) ADDRESS_LINE3 VARCHAR2(60) ADDRESS_LINE4 VARCHAR2(60) ADDRESS_LINE5 VARCHAR2(60) POSTCODE

Wildcard query expansion resulted in too many terms

人盡茶涼 提交于 2019-12-18 09:48:03
问题 I am receiving a "wildcard query expansion resulted in too many terms" error when executing a query similar to the following: SELECT * FROM table_a WHERE contains(clob_field, '%a%') > 0; Does anyone know a workaround/solution to this problem? 回答1: According to this, you may need to increase the wildcard_maxterms parameter, or take further steps. See the link for details (I'm not an expert in Oracle Text though). 来源: https://stackoverflow.com/questions/2554054/wildcard-query-expansion-resulted

How to create a not null column in a view

混江龙づ霸主 提交于 2019-12-18 07:41:13
问题 Given a table like: CREATE TABLE "MyTable" ( "MyColumn" NUMBER NOT NULL ); I want to create a view like: CREATE VIEW "MyView" AS SELECT CAST("MyColumn" AS BINARY_DOUBLE) AS "MyColumn" FROM "MyTable"; Only where the column "MyColumn" is "NOT NULL". In SQL Server this is pretty straight forward: CREATE VIEW [MyView] AS SELECT ISNULL(CAST([MyColumn] AS Float), 0.0) AS [MyColumn] FROM [MyTable]; However the Oracle equivalent results in a "NULL" column: CREATE VIEW "MyView" AS SELECT NVL(CAST(

Cannot retrieve the id of the last inserted row in Hibernate using Oracle

爷,独闯天下 提交于 2019-12-18 07:24:11
问题 I'm using Hibernate Tools 3.2.1.GA with the Spring version 3.0.2. I'm trying to retrieve the id of the last inserted row into the Oracle(10g) database as follows. Session session=NewHibernateUtil.getSessionFactory().getCurrentSession(); session.beginTransaction(); Country c=new Country(); c.setCountryId(new BigDecimal(0)); c.setCountryName(request.getParameter("txtCountryName")); c.setCountryCode(request.getParameter("txtCountryCode")); Zone z=(Zone) session.get(Zone.class, new BigDecimal

Listagg function and ORA-01489: result of string concatenation is too long

一曲冷凌霜 提交于 2019-12-18 04:41:19
问题 When i run the following query: Select tm.product_id, listagg(tm.book_id || '(' || tm.score || ')',',') within group (order by tm.product_id) as matches from tl_product_match tm where tm.book_id is not null group by tm.product_id Oracle returns the following error: ORA-01489: result of string concatenation is too long I know that the reason it is failing is that the listagg function is trying to concatenate a the values which are greater than 4000 characters which is not supported. I have

Listagg function and ORA-01489: result of string concatenation is too long

旧时模样 提交于 2019-12-18 04:41:05
问题 When i run the following query: Select tm.product_id, listagg(tm.book_id || '(' || tm.score || ')',',') within group (order by tm.product_id) as matches from tl_product_match tm where tm.book_id is not null group by tm.product_id Oracle returns the following error: ORA-01489: result of string concatenation is too long I know that the reason it is failing is that the listagg function is trying to concatenate a the values which are greater than 4000 characters which is not supported. I have

BETWEEN clause versus <= AND >=

百般思念 提交于 2019-12-17 22:56:48
问题 Is there a performance difference between using a BETWEEN clause or using <= AND >= comparisons? i.e. these two queries: SELECT * FROM table WHERE year BETWEEN '2005' AND '2010'; ...and SELECT * FROM table WHERE year >= '2005' AND year <= '2010'; In this example, the year column is VARCHAR2(4) with an index on it. 回答1: There is no difference. Note that BETWEEN is always inclusive and sensitive to the order of the arguments. BETWEEN '2010' AND '2005' will never be TRUE . 回答2: There is no

Oracle Sequence value are not ordered [duplicate]

南楼画角 提交于 2019-12-17 22:43:09
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Oracle RAC and sequences I have a Oracle RAC configured in my local environment. I analyzed a problem with Sequnce that the number generated by nextVal are not ordered. Suppose First time I get value as 1 , the second time get get value as 21 (I have configured the sequence as with default CACHE 20 and NOORDER ). On searching I found the solution that, I need to Order the sequence. I have question which is