ERROR: CANNOT PARALLELIZE AN UPDATE STATEMENT THAT UPDATES THE DISTRIBUTION COLUMNS - etl

When trying to copy data from source (MSSQLSERVER) TO target (greenplum database) using talend ETL server.
Description: When executing an UPDATE statement to GreenPlum, the mentioned error is thrown.
GIVEN
No of records fetching to target is ~ 0.3 million
Update is failing with error
ERROR: CANNOT PARALLELIZE AN UPDATE STATEMENT THAT UPDATES THE DISTRIBUTION COLUMNS current transaction is aborted, commands ignored until end of transaction block
Any help on it would be much appreciated
Solution i tried :
When ON_ERROR_ROLLBACK is enabled, psql will issue a SAVEPOINT before every command you send to greenplum
gpadmin=# \set ON_ERROR_ROLLBACK interactive
But after that we tried running the same Job and it did not solved the problem.

1) Update is not supported in Hawq.
2) Update is only supported to heap but not AO table in GPDB.
GPDB/HAWQ are used as data warehouse/BI and data exploration purpose.

Related

DBeaver - Non sequential when executing multiple oracle inserts

I'm using latest DBeaver with Oracle 12
I need to run several inserts to different tables that are connected by foreign key
When executing multiple oracle inserts (Alt + X ) to several tables and it failed on foreign key when it shouldn't (if executed sequentially).
Executing same SQLs in PLSQL developer doesn't produce any error. (reproducible)
It seems that the inserts aren't execute in sequence
Can this behavior changed?
Found DBeaver wiki that warns for unexpected results
NOTE: Be careful with this feature. If you execute a huge script with a large number of queries, it might cause unexpected problems.
Found in disucssions solution to add inserts to PL/SQL block:
ShadelessFox
It's not possible from a DBeaver perspective, but you can use PL/SQL blocks

Insufficient memory error in proc sort

My data is stored in Oracle table MY_DATA. This table contains only 2 rows with 7 columns. But when I execute step:
proc sort data=oraclelib.MY_DATA nodupkey out=SORTED_DATA;
by client_number;
run;
the following error appears:
ERROR: The SAS System stopped processing this step because of insufficient memory.
If I comment nodupkey option then error disappears. If I copy dataset in work library and execute proc sort on it then everything is OK too.
My memory options:
SORTSIZE=1073741824
SUMSIZE=0
MAXMEMQUERY=268435456
LOADMEMSIZE=0
MEMSIZE=31565617920
REALMEMSIZE=0
What can be the root of the problem and how can I fix it?
My Oracle password was in grace period and when I changed it the issue disappeared.

Oracle update million records from XML file

Gurus ,
I have reporting shell script on LINUX platform,Oracle 12c database which does the following.
Read the Error XML file created in last 24 hrs( mtime)from the unix directory path
Sed unwanted text like '
Fetch each row and column using cut -d ";" -f $X
Prepare update statement
execute update statement after processing each file to set the error
code.
In UAT I received , 400 files , each file have 20,000 rows. which means, update statement will be prepared 400X20,000 times and each statement will be executed.
The issues I see are:
Unable to log/handle update errors in order to debug or rerun them.
it is taking lot of time even though we have indexes.
What is the best way to handle such situation?
I have following thought in mind: Instead of creating update statements, use sqlldr to load to temp table and execute update/merge two tables. I'm not sure about performance of executing 400 sqlldrs.any idea?
Is there a better way to handle ? in terms of error handling and process.

DataStage Job "ABORTED" because of Deadlock issue

DataStage -- 8.1
Database -- Oracle 10g
OS -- Unix
I have a DataStage job (FCT) which is doing a lookup based on two keys columns to the DIM table. This job ABORTED with the following error message.
"main_program: (aptoci.C:483). Message: ORA-04020: deadlock detected while trying to lock object DIM_TABLE_NAME "
Partition type for lookup stage -- Auto
Config file Nodes -- 2
Note:- Most of the times this job runs without any issues but sometimes fail with the above error message.
Don't understand what can cause deadlock here and how to resolve this issue.
Thanks in advance.

how to identify wather execution of updatequery made changes or not in oracle database

I am using oracle as backhand and jsp servlet as frunthand I am executing update query and I want to identify whether update query has made updation in database or not. i am using executeUpdate() it is executing but it results 0 when update query fails to execute and 1 when execution is done but it does not identify whether data is updated or not
executeUpdate will return the number of modified rows on your update sentence. So if you are getting 0, it does not mean it failed to execute but no rows were modified upon execution. And if you are getting 1, you've managed to update one row.
Usually, if update sentence failed, you will get a SQLException thrown by the JDBC driver.

Resources