SQL & PL/SQL :: Oracle Large Update

Sep 30, 2011

I need to add a new column to a very large table, and update it with 'N'. (this is similar as specifying default 'N'). I'm using Oracle 9i. Which is the best method regarding to speed, to update this column on entire table? The table contains ~30 millions of records. I've read that parallel DML (here UPDATE) does not work on unpartitioned tables. My table is not partitioned. If i specify:

update /*+ full(p) parallel(p,10) */ my_table p set p.my_column = 'N';

This, i think will not speed up the operation on 9i. Our business does not accept to use CREATE TABLE AS SELECT, then renaming table and recreating all indexes and so on.

View 21 Replies


ADVERTISEMENT

SQL & PL/SQL :: FOR UPDATE Large Data

Jan 23, 2012

the large data FOR UPDATE in table column ?

claimClob clob:=claim; -- claim large data
v_buf varchar2(1000);
amount binary_integer:=1000;
position binary_integer:=1;

[Code]....

why the FOR UPDATE don't do nothing ?

View 4 Replies View Related

SQL & PL/SQL :: Update Statement - Calculating Few Values From Large Table

Sep 2, 2011

I have a large table and want to calculate just a few values. Therefore, I don't want to create a new table, I want to update the table. Here an example:

I want to calculate the VALUE_LAG with ID = 4 only (-> two values).

create table zTEST
( PRODUCT number,
ID number,
VALUE number,
VALUE_L1 number );

[Code]..

I tried this, but obviously, windows functions are not allowed in the update statement.

update zTEST
set VALUE_L1 = lag(VALUE) over (partition by PRODUCT, order by ID)
where ID = 4

How can I do this?

View 12 Replies View Related

SQL & PL/SQL :: How To Store A Large String In Oracle

Nov 20, 2009

how do i store large string in oracle.

View 19 Replies View Related

Oracle SQL - Query A Large Library File?

Dec 1, 2008

I'm currently new to Oracle 10g SQL and I need to query a large library file.I need to find the different first keywords associated with references written by authors who have more than 10 references in the readings table.

View 4 Replies View Related

JDeveloper, Java & XML :: Update Xml Element In Oracle 10gr1 Without Using Oracle XDB

Jun 27, 2013

I would like to update an XML element without using the function APPENDCHILDXML or INSERTCHILDXML because they are not available in Oracle 10GR1.
In my database, Oracle XDB is not installed.

The following query fail with the following error : ORA-00904: "INSERTCHILDXML" : identificateur non valide

update scl_profile
set profile_data =
insertChildXML(profile_data,'/exportImportMarcheCriteria','colonnesExport',
XMLType('<colonnesExport>ENTETE_GESTIONNAIRES_AUTORISES</colonnesExport>'))
where profile_xmltype =
'fr.mipih.marches.marche.criteres.ExportImportMarcheCriteria'
and profile_type =
'eMagh2.MRGS.AccesMarche.ListeMarche.Export.OptionsExportImport';
[code]........

If i try to use the package DBMS_XMLDOM, i have the following error :

ORA-06550: Ligne 3, colonne 11 :
PLS-00201: l'identificateur 'DBMS_XMLDOM.DOMDOCUMENT' doit etre declare
ORA-06550: Ligne 3, colonne 11 :
PL/SQL: Item ignored

I think it's because ORACLE XDB component is not installed in my database.

View 1 Replies View Related

Bulk Update In Oracle

Mar 28, 2012

I have performance issue with the bulk update. I have 2 tables one with 21 millions of data and the other table with 2 millions of data.here the requirement is to update the table which is having 21 millions with the other tables data(which is having 2 million records) based on some matching criteria.

The procedure is taking 9 hours to update the table(which is having 21 millions data). I have created required indexes on table also.But the performance is not good.

Here my procedure:

CREATE OR REPLACE PROCEDURE AHM_GKPR.CLAIMS_WITHOUT_PARTITIONS
IS
TYPE T_PL_CO IS TABLE OF VARCHAR2(3) INDEX BY BINARY_INTEGER;
L_PL_CO T_PL_CO;
TYPE T_PL_CD IS TABLE OF VARCHAR2(9) INDEX BY BINARY_INTEGER;
L_PL_CD T_PL_CD;
TYPE T_PL_NB IS TABLE OF VARCHAR2(10) INDEX BY BINARY_INTEGER;
L_PL_NB T_PL_NB;
TYPE T_SE_CD IS TABLE OF VARCHAR2(1) INDEX BY BINARY_INTEGER;
L_SE_CD T_SE_CD;
TYPE T_BIR_DT IS TABLE OF DATE INDEX BY BINARY_INTEGER;
[code].........

View 5 Replies View Related

Value Too Large For Column MSG

Mar 9, 2011

1. When querying the "alert_log" table I created from the alert log using the script below, 2 new files were created ALERT_LOG_30499.bad and ALERT_LOG_30499.log.

The ALERT_LOG_30499.log. contains this error message:

error processing column MSG in row 2910 for datafile /u02/damistst/admin/bdump/alert_damistst.log
ORA-12899: value too large for column MSG (actual: 82, maximum: 80)

the ALERT_LOG_30499.bad , so far, only contains datafile resize information. The datafiles have plenty of space and there is plenty of space on the San slice the datafiles reside.

2. then each time I recreate the table and increased the increased the varchar2 size, the "actual" size will also increase in the log file.

error processing column MSG in row 2910 for datafile /u02/damistst/admin/bdump/alert_damistst.log ORA-12899: value too large for column MSG (actual: 92, maximum: 90)

3. When I increased the varchar2 size to 120+ it gave me this error message:

[oracle@tds_dw bdump]$ cat ALERT_LOG_30715.log

LOG file opened at 03/09/11 14:46:20

Field Definitions for table ALERT_LOG
Record format DELIMITED BY NEWLINE
Data in file has same endianness as the platform
Rows with all null fields are accepted

Fields in Data Source:

MSG CHAR (255)
Terminated by ","
Trim whitespace same as SQL Loader

TABLE DDL:

create table
alert_log ( msg varchar2(80) )
organization external (
type oracle_loader
default directory BDUMP
access parameters (
records delimited by newline
)
location('alert_damistst.log')
)
reject limit 1000;

**** QUESTION
I can still query the alert_log table in sqlplus, but those log and bad files are generated, is this an issue?

example of a piece of the results from " select * from alert_log; "

MSG
--------------------------------------------------------------------------------
Thread 1 advanced to log sequence 5254 (LGWR switch)
Current log# 1 seq# 5254 mem# 0: /tds_oradata/redo01a.log
Current log# 1 seq# 5254 mem# 1: /u02/damistst/REDO_LOGS/redo01b.log
Thread 1 cannot allocate new log
Checkpoint not complete
Current log# 1 seq# 5254 mem# 0: /tds_oradata/redo01a.log
Current log# 1 seq# 5254 mem# 1: /u02/damistst/REDO_LOGS/redo01b.log
Wed Mar 9 14:33:09 2011
Thread 1 advanced to log sequence 5255 (LGWR switch)
Current log# 2 seq# 5255 mem# 0: /tds_oradata/redo02a.log
Current log# 2 seq# 5255 mem# 1: /u02/damistst/REDO_LOGS/redo02b.log

13076 rows selected.

View 7 Replies View Related

Inserted Value Too Large?

Jun 12, 2008

I keep getting the "ORA-01401:inserted value too large for column". No biggie - I've dealt with this multiple times before (but obviously not enough in this instance).

The data being entered is a SINGLE digit number - a number like 1, 2 or 3 - nothing fancy, just a plain straight everyday single digit number. The field in question is / was set as field type "Integer". Now, there is no set field size for integers! - not in Oracle anyway. Since it wasn't happy, I decided I'll try field types of 'Number' and also "Varchar2" set to 10 bytes. I have deleted the column from the table and re-created it as well.

Here's the even more puzzling bit: I can INSERT data into this field, BUT I can not UPDATE the field with the exact same data. The data is being inserted from a csv file. The same exact csv file used to insert works, but the same data in the same file will not update only that particular column.

If I delete the specific column data from the csv file, all goes through fine. If I hard code the update for the field (eg SET field2 = '1' or even SET field2 = ' ') it still doesn't work. So I know it is not the csv file that is causing problems. I deleted all data from the csv file except the field in question - still no luck.

So after eliminating:
1. The field type
2. The field length
3. The data being inserted
4. The external source of the data

What else could possibly be the problem?

View 1 Replies View Related

SQL & PL/SQL :: Value Too Large For Variable

Jan 21, 2011

I HAVE DECLARED A VARIABLE

VAR1 VARCHAR2(20000);

BUT STILL WHEN I ASSIGN SOME STRINGS TO THAT VARIABLE I GET "VALUE TOO LARGE" MESSAGE. WHAT SHOULD I DO?

View 2 Replies View Related

Delete / Update From XL Sheet To Oracle?

May 7, 2008

have one XL sheet Doc that has 2 tabs. One has the list of keywords for deleting the records from Oracle that has the keywords in it. The second one needs the update query. Read the first column in the XL sheet and replace it with the second column value for the records that has the first column value in it.

I never worked in the combination of XL and Oracle.

View 3 Replies View Related

Update Using CLOB Datatype In Oracle

Aug 16, 2010

how can i update CLOB values in Oracle? I am passing string values to Clob datatype from .Net Eg '13223311','12122112','122125552'

View 6 Replies View Related

Oracle Trigger - Update Same Table?

Mar 30, 2010

I am trying to create some PL/SQL that will create a trigger for UPDATES and INSERTS which will update a column on the same row to the system date.

So far I have:

DECLARE
tablename VARCHAR(30) := 'table';
triggername VARCHAR(30) := 'mytrigger_' || tablename;

[Code]....

I have declared the tablename and triggername outside the trigger creation as I need this to be parameterised for a list of tables.

The procedure IsCDCUser just checks it should be updating for this user.

The problem I get is the following error:

Bind Variable "NEW" is NOT DECLARED

View 3 Replies View Related

Update With Join Syntax In Oracle

Apr 13, 2011

This is my working query in ms access...

UPDATE Caxnode AS A INNER JOIN Caxnode AS B ON A.node_alias = B.node_alias SET A.partition_Type = 'LDOM', A.node_mode = 'LOGICAL', A.host_id = b.host_id, A.num_of_proc = b.num_of_proc WHERE (((A.node_mode)='virtual' Or (A.node_mode)='regular') AND ((B.partition_Type)='LDOM'));

This doesn't work in oracle, I googled and read that update doesnt work with inner join in oracle..translate this query to work on oracle?

View 4 Replies View Related

How To Persuade Oracle To Update V$RECOVERY_FILE_DEST

Aug 12, 2011

my app/oracle11/diag/rdbms/buidev/buidev/trace/alert_buidev.log ends with

CODEErrors in file /home/oracle11/app/oracle11/diag/rdbms/buidev/buidev/trace/buidev_m000_4587.trc:
ORA-19815: WARNING: db_recovery_file_dest_size of 5000000000 bytes is 99.55% used, and has 22528000 remaining bytes available.
************************************************************************
You have following choices to free up space from recovery area:
1. Consider changing RMAN RETENTION POLICY. If you are using Data Guard,
then consider changing RMAN ARCHIVELOG DELETION POLICY.

[code]....

although I deleted many .arc-files with rm so the disk usage in the recovery area is far below the limit:

CODE[oracle11@gvoracle11 fast_recovery_area]$ pwd
/home/oracle11/app/oracle11/fast_recovery_area
[oracle11@gvoracle11 fast_recovery_area]$ du -ks buidev/ BUIDEV/
9556    buidev/
1212264 BUIDEV/
[oracle11@gvoracle11 fast_recovery_area]$

Inspired by the sugestions in alert_buidev.log and on different web pages I did the following:

CODE[oracle11@gvoracle11 ~]$ ORACLE_SID=buidev rman target=/ nocatalog
Recovery Manager: Release 11.2.0.2.0 - Production on Fri Aug 12 11:24:12 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database (not started)
RMAN> startup mount
Oracle instance started
database mounted

Total System Global Area    3340451840 bytes

Fixed Size                     2231088 bytes
Variable Size               2583692496 bytes
Database Buffers             738197504 bytes
Redo Buffers                  16330752 bytes

RMAN> crosscheck archivelog all;

crosscheck archivelog all;
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
validation succeeded for archived log

[code]....

RMAN> delete noprompt force expired archivelog all;

released channel: ORA_DISK_1
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=63 device type=DISK
specification does not match any archived log in the repository
RMAN>

But some parts of oracle believe in my files which have ceased to exist:

CODESQL> select * from V$RECOVERY_FILE_DEST;
NAME
--------------------------------------------------------------------------------
SPACE_LIMIT SPACE_USED SPACE_RECLAIMABLE NUMBER_OF_FILES
----------- ---------- ----------------- ---------------
/home/oracle11/app/oracle11/fast_recovery_area
5000000000 4981712384           4240384              42
SQL>

That looks like [URL] but my version is 11.2.0.2.0 .How can I persuade Oracle to update V$RECOVERY_FILE_DEST ?

View 1 Replies View Related

Oracle 11G - Update Is Very Slow On View?

Dec 7, 2012

I have big trouble with some Update query on Oracle 11G.I have a set of tables (5) of identical structures and a view that consists in an UNION ALL of the 5 tables.None of this table contains more than 20 000 rows.Let's call the view V_INTE_NE. Each of the basic table has a PRIMARY KEY defined on 3 NUMBERS(10,0) -> INTE_REF / NE_REF / INSTANCE.

Now, I get 6 rows in another table and I want to update my view from the data of this small table (let's call it SMALL). This table has the 3 columns INTE_REF / NE_REF / INSTANCE.

When I try to join the two tables :

SELECT * FROM T_INTE_NE T2
WHERE EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE )

I get the 6 lines in 0.037 seconds

When I try to update the view (I have an INSTEAD OF trigger that does nothing (just return for testing even without modifying anything), I execute the following query :

UPDATE T_INTE_NE T2
SET INTE_STATE = -11 WHERE
EXISTS ( SELECT 1 FROM SMALL T1 WHERE T2.INTE_REF = T1.INTEREF AND T2.NE_REF = T1.NEREF AND T2.INTE_INST = T1.INSTANCE )
The 6 rows are updated (at least TRIGGER is called) in 20 seconds.
However, in the execution plan, I can't see where Oracle takes time to achieve the query :
Plan hash value: 907176690

[code]....

Predicate Information (identified by operation id):

2 - access("T2"."INTE_REF"="T1"."INTEREF" AND "T2"."NE_REF"="T1"."NEREF" AND
"T2"."INTE_INST"="T1"."INSTANCE")

Note- dynamic sampling used for this statement (level=2)

Statistics
-----------------------------------------------------------
3 user calls
0 physical read total bytes
0 physical write total bytes
0 spare statistic 3
0 commit cleanout failures: cannot pin

[code]....

I get exactly the same execution plan (when autotrace is ON).Furthermore, if I try to do the same update on each of the basic tables, I get the rows updated instantaneously.

View 10 Replies View Related

PL/SQL :: Oracle Version Is 10g - Bulk Update?

Apr 18, 2013

My oracle version is 10g.I want to update a table which has 2 million rows and 20 columns. I want to update 3 columns in my table based on a query output.

Say:-
select decode(col1,'a',col2,col3) up_col1, decode(col5,'Y',20,30)* col6 up_col2, col7 up_col3 from base_tab a, update_tab b where a.key = b.key

I tried the simple update SQL, it hangs and never comeback even after 2 hrs.So I resort to PLSQL to complete my job using bulk collect with limits. Now I am stumbled upon with the Bulk update step.I referred to the BULK Update example given in [URL]...

I gone by 9i approach, I got invalid rowid error. Since the example doesn't uses a join.

I am little bit worried to go by 10g approach given in the example. I have to fetch entire row from my update table. My update table has 5 varchar(1000) fields. Anyway I am not going to affect them in my update. Whether it will occupy memory and again leads to hanging of my procedure.

View 2 Replies View Related

Oracle Critical Patch Update

Jul 18, 2012

I need to apply this Critical Patch in my databases but I have a doubt about if the component that I find out in the documentation is the component where the fix has to be applied or doesn't matter and I have to apply this fix on all my installations.

CVE#           Component          

CVE-2012-1740 - Oracle Application Express Listener
CVE-2011-3192 - Apache
CVE-2012-1737 - Enterprise Manager for Oracle Database
CVE-2012-1745 - The vulnerability affects Microsoft Windows platforms only.
CVE-2012-1746 - The vulnerability affects Microsoft Windows platforms only.
CVE-2012-1747 - The vulnerability affects Microsoft Windows platforms only.
CVE-2012-3134 - The vulnerability affects Microsoft Windows platforms only.
CVE-2011-4885 - PHP

View 3 Replies View Related

SQL & PL/SQL :: Getting Error / Value Too Large For Column

Jul 29, 2011

I am using trim function in my select query. But still I am getting white space in my output. because of this, I am getting the error "value too large for column... " when I load the data into a table through sqlloader.

define APPName="&1"
set heading off;
set verify off;
set newpage 0
set feedback off;
set rtrimspool on;
set termout off;
set pagesize 40000;

[code].....

View 3 Replies View Related

SQL & PL/SQL :: Unpivoting Large Tables

Feb 6, 2012

I have a 27 million row table in the following format:

MEDCLM_MTH_SUM_KEY PRIMARY_DIAG_CD DIAG_CD2 DIAG_CD3 DIAG_CD4 DIAG_CD5 DIAG_CD6 DIAG_CD7 DIAG_CD8 DIAG_CD9 DIAG_CD10
2212990780 5552 78907 53170 5368
2231127242 V5481 7812 71595 4019 2761 2859 496 V4364 30501

I need to unpivot this data to get it to look like this:

MEDCLM_MTH_SUM_KEY DIAG_CD_LEVEL DIAG_CD
2212990780 PRIMARY_DIAG_CD 5552
2212990780 DIAG_CD2 78907
2212990780 DIAG_CD3 53170
[code]...

I was wondering if there was a quicker, more efficient way to do this.

View 3 Replies View Related

Identify Cause Of Large UGA Consumption?

Apr 27, 2013

I'm trying to identify what PL/SQL or the exact code that's is causing massive UGA consumption. How can I identify it?

View 5 Replies View Related

Can Undo Tablespace Be Too Large

Apr 26, 2013

Can an undo tablespace be too large and actually hurt performance? I have seen a system with a dedicated 1 TB drive for undo tablespace (no guarantee) with an undo_retention of 7 days. Would this hurt performance? What about setting an undo_retention of 24 hours with no guarantee? The only mention I could find online said that it would not hurt performance but I wanted to double check. You would think that Oracle does not care if it deletes the undo at 15 minutes or if it deletes the undo at a later date such as 7 days later and the performance should stay the same.

View 3 Replies View Related

Large Amount Of Data

Aug 6, 2013

I have oracle 11gr2 database on linux os. It's total sga size is 500mb only. Now, if uses wants read the 1gb of data from database, then there is no sufficient memory in buffer cache. so how it will works. the transaction will get successful or it will fail.And i have another doubt, does oracle can read the data from memory only or it can also read directly from disk. 

View 11 Replies View Related

SQL & PL/SQL :: Oracle Update Statement Using Undocumented Hint

Jun 1, 2010

I have been asked to rewrite the following update statement without using the hint BYPASS_UJVC.

l_new_CFT_ID CASHFLOW_TYPE.CFT_ID%TYPE;

if (l_Record > 0) then
-- since at least 1 loan was found with the old type, process the actual update
update /*+BYPASS_UJVC*/ (
select
cfa.CFA_CFT_ID
[code]......

I think I am supposed to be using the Merge statement but I am not sure on how to go about it.

View 11 Replies View Related

Forms :: Update Table Data Via Oracle 10g

Jul 7, 2011

I am trying to develop a form consisting of a key block and a single data block. The problem is that the driving table is not the table that needs to be updated.

user wants the following layout:student Advisor
ID# name degree major Concentration ID# name
The driving table (TABLE A) will supply the first 5 fields. The advisor ID comes from (TABLE B).

The user needs to update the adviser ID# field associated with the student ID# field. The form is to be tabular listing all students. I've seen some info on using procedures to insert, delete, update, query and lock tables, but i'm just not sure if that's what is needed.

View 6 Replies View Related

Oracle SQL - Update Table Value By Matching Columns

Mar 15, 2010

I have two table and trying to update tableA with data from tableB but gives an error. My TableA has columns - colA,colB,colC,colX and table B has columns - colA,colB,colX. Sample data looks like this:

tableA:
XXYY, local,3/19,48
XXYY,ixc,3/19,24
XXYYlocal,3/20,48
XXYY,local,3/21,48

Table B:
XXYY,local,48
XXYY,ixc,24
PPQQ,local,72

this is the query I wrote
update tableA a
set (a.colX)=(select (b.colX) from tableB b where a.colA=b.colA and a.colB=b.colB);

When i run it gives this error:single row subquery returns more than one row.

tableB has only 1 value for colX for each colA,colB record but tableA has mutiple colA and colB repeated but for all of thsoe in table A i want to update the tableB.colX value for matching colA and colB.

View 4 Replies View Related

Forms :: Migrating From Oracle 8i To 10g - Update Required?

Jul 1, 2010

I am using oracle 8i (8.1.7) with forms 5 and reports 3 on a windows 2000 platform. Now I want to migrate from 8i to 10 g. Will the applications in form 5 and reports 3 work or should I have to upgrade the forms and reports as well.

View 4 Replies View Related

SQL & PL/SQL :: Update Insert Using Oracle Data Dictionaries

Apr 13, 2010

Is there a way in oracle 10g to know when was a row inserted or updated using oracle data dictionaries.

I know we can track these by creatig a seperate date column.

I just want to know if there is built in table which shows these.

View 2 Replies View Related

SQL & PL/SQL :: Translating Update Query In Access To Oracle

Apr 13, 2011

This is my working query in ms access...

UPDATE Caxnode AS A INNER JOIN Caxnode AS B ON A.node_alias = B.node_alias SET A.partition_Type = 'LDOM', A.node_mode = 'LOGICAL', A.host_id = b.host_id, A.num_of_proc = b.num_of_proc WHERE (((A.node_mode)='virtual' Or (A.node_mode)='regular') AND ((B.partition_Type)='LDOM'));

This doesn't work in oracle, I Googled and read that update doesn't work with inner join in oracle.

View 2 Replies View Related

Update Oracle Tnsnames.ora File With Some New Entries?

Oct 5, 2011

I need to Update Oracle tnsnames.ora file with the some new entries ....i was looking for ora 92, but could not find a proper link to download.now I have oracle 11 g, but i cant find tnsnames.ora file in that...is it because my installation was not proper...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved