Error Handling in Oracle GoldenGate
Hi:
i connect two databses with Oracle GoldenGate in Active-Active bidirectional replication process.
i required when any replicat fails it colud be sote in table with values. like i made the change in source database , while replicating it fails then this record store in a table.
i want to use as schema for all tables. there is no common column in all the tables.
Could you please help me out.
Regards,
Abhishek
You can map errors into an exceptions table. You can use one table for many errors, but you have to code whatever to make the insert work. You can do a one-to-one mapping too, just depends on how granular you want the exceptions table to be. The hard part is making sure you account for expected errors.
-- Specify mapping of exceptions to exceptions table:
MAP <owner>.*, TARGET <owner>.<exceptions>, EXCEPTIONSONLY;
An example shown on pages 96-97 of 11.1 Admin guide:
MAP swilkes.date_test, TARGET swilkes.date_test, &
REPERROR (21000, EXCEPTION), &
SQLEXEC (ID lookup, ON UPDATE, &
QUERY "select count(*) conflict from date_test where t_id = ? and &
t_timestamp > ?", &
PARAMS (p1 = t_id, p2 = t_timestamp), BEFOREFILTER, ERROR REPORT, &
TRACE ALL),&
FILTER (lookup.conflict = 0, ON UPDATE, RAISEERROR 21000);
MAP swilkes.date_test, TARGET swilkes.date_test_exc, EXCEPTIONSONLY, &
INSERTALLRECORDS, &
COLMAP (USEDEFAULTS, errtype = "UPDATE FILTER FAILED.");
An exceptions table could look like:
--8 characters max for the replicat name
--varchar2(30) via object naming rules in Oracle for the table name
--error returned is numeric, and so on
create table ggs_admin.exceptions
( rep_name varchar2(8)
, table_name varchar2(30)
, errno number
, dberrmsg varchar2(4000)
, optype varchar2(20)
, errtype varchar2(20)
, committimestamp timestamp);
Similar Messages
-
ERROR OGG-00868 Oracle GoldenGate Capture for Oracle, ext1.prm: + ORA-12514
Hello Guys,
Environment is as below:
Primary site (source): This is production DB and up and running.
RAC 2 nodes
Oracle RAC 11.2.0.1.0
ASM
Enterprise Linux Server release 5.5 (Carthage)
target Site (destination): Software installed and instance has been created.
Standalone single server - Non RAC
Oracle 11.2.0.1.0
ASM
Enterprise Linux Server release 5.5 (Carthage)
Oracle GoldenGate 11g Release 1 (11.1.1)
I have installed and setup Oracle GoldenGate 11g Release 1 (11.1.1) But I am getting below error while starting extract:
2011-05-01 21:27:41 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): edit params ext1.
2011-05-01 21:29:11 INFO OGG-00987 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (oracle): start extract ext1.
2011-05-01 21:29:11 INFO OGG-00963 Oracle GoldenGate Manager for Oracle, mgr.prm: Command received from GGSCI on host xxx.xx.x.4 (START EXTRACT EXT1 ).
2011-05-01 21:29:11 INFO OGG-00975 Oracle GoldenGate Manager for Oracle, mgr.prm: EXTRACT EXT1 starting.
2011-05-01 21:29:11 INFO OGG-00992 Oracle GoldenGate Capture for Oracle, ext1.prm: EXTRACT EXT1 starting.
2011-05-01 21:29:11 INFO OGG-01635 Oracle GoldenGate Capture for Oracle, ext1.prm: BOUNDED RECOVERY: reset to initial or altered checkpoint.
2011-05-01 21:29:12 ERROR OGG-00868 Oracle GoldenGate Capture for Oracle, ext1.prm: Attaching to ASM server asm: (12514) ORA-12514: TNS:listener does not currently know of service requested in connect descriptor.
2011-05-01 21:29:12 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, ext1.prm: PROCESS ABENDING.can anyone tell me how to edit listener.ora for ASM instance so that it may capture data from instance.
Below is the listener.ora :
$ cat listener.ora
LISTENER_SCAN3=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN3)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
LISTENER_SCAN2=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN2)))) # line added by Agent
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN2=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN3=ON # line added by Agent
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = +ASM1)
(ORACLE_HOME = /u01/app/11.2.0/grid)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = +ASM2)
(ORACLE_HOME = /u01/app/11.2.0/grid)
$$ cat tnsnames.ora
# tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
ASM =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = xxxdata-scan)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = +ASM2)
$your response will be highly appreciated.
Cheers !!!
LazyDBA11g
Edited by: LazyDBA11g on May 5, 2011 11:16 PM
Edited by: LazyDBA11g on May 22, 2011 5:24 AM
Edited by: LazyDBA11g on May 22, 2011 5:29 AM
Edited by: LazyDBA11g on May 30, 2011 10:46 PMHi,
I installed GG with same configuration and i didn't configure ASM statically in listener.ora at all:
LISTENER=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))) # line added by Agent
LISTENER_SCAN1=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER_SCAN1)))) # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER_SCAN1=ON # line added by Agent
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
When i check listener status, i can see that ASM Instance is correctly registered:
$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 26-MAY-2011 15:41:48
Copyright (c) 1991, 2010, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
Start Date 16-MAY-2011 13:17:17
Uptime 10 days 2 hr. 24 min. 31 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /opt/oracle/grid/11.2.0.2/network/admin/listener.ora
Listener Log File /opt/oracle/base/diag/tnslsnr/pollux/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xxx.xxx.92)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=xx.xxx.xxx.94)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "R112" has 1 instance(s).
Instance "R1121", status READY, has 1 handler(s) for this service...
Service "R112XDB" has 1 instance(s).
Instance "R1121", status READY, has 1 handler(s) for this service...
The command completed successfully
You need to make sure, that ASM registers dynamically with your listener. In my case i have set local_listener in ASM instance as follows:
SQL> show parameter local_listener
NAME TYPE VALUE
local_listener string (DESCRIPTION=(ADDRESS_LIST=(AD
DRESS=(PROTOCOL=TCP)(HOST=xx.xxx.xxx.94)(PORT=1521))))
This is no GG specific question. You need this for other tools like Gridcontrol as well.
Hope this helps,
Robert -
Error Handling in Oracle Sales Cloud
Is there a best practice guide/document for error handling in Oracle Sales Cloud?
For example: Error handling in groovy scripts, business processes.
Can someone provide a starting point to this topic?
Thanks,
AbhishekHi.
Please review this short video showing you the online logging feature for Application Composer - Groovy. It's very simple and gives you a basic debug capability.
https://www.youtube.com/watch?v=RcyeKQY2ZGo&index=35&list=PL1ZiAfFIniZf_Uu4qTcp5IZYdFOm9K5o3
Kind regards,
Richard
FA Developer Relations -
Hello,
Could anyone help to convert the following T-SQL statement to PL-SQL? Thanks inadvance!
BEGIN TRAN
UPDATE Table1 SET .......
SELECT @ReturnCode = @@error
IF @ReturnCode <> 0
BEGIN
SELECT @msg = 'Error - update date feed'
GOTO Err_Handler
END
COMMIT TRAN
RETURN 0
Err_Handler:
ROLLBACK TRAN
INSERT INTO LogTable(ProcessName, ProcessStatus)
VALUES('Daily date feed', @msg)
EXEC msdb.dbo.sp_send_dbmail
@recipients = '[email protected]',
@Subject = 'Daily datafeed process failed',
@body = @msg
RETURN 1Sänjay wrote:
Hi,
Anonymous block example
SQL> declare
2 x number ;
3 begin
4 select count(*) into x from dual ;
5 update emp set empno=empno ;
6 dbms_output.put_line('Rows updated '|| sql%rowcount);
7 exception -- Exception Or Error Handling
8 when others then
9 rollback ;
10 dbms_output.put_line(SQLERRM);
11 end ;
12 /
Rows updated 14
PL/SQL procedure successfully completed.SSAwful example! I would fire programmers who would repeatetly produce such code. Rule #1: Avoid "when others expetions" wherever possible!
I know you're capable of give much better examples.
Btw: This code would produce the same result in sql*plus without any exception block:
proof
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for HPUX: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
SQL>
SQL> drop table test;
Table dropped.
SQL> set serveroutput on
SQL> create table test (col1 number);
Table created.
SQL>
SQL> /* first without exception */
SQL> declare
2 x number ;
3 begin
4 insert into test values (1);
5 select length(dummy) into x from dual where 1=1;
6 end;
7 /
PL/SQL procedure successfully completed.
SQL>
SQL> select * from test;
COL1
1
SQL>
SQL> /* now add some error */
SQL>
SQL> declare
2 x number ;
3 begin
4 insert into test values (2);
5 select length(dummy) into x from dual where 1=2;
6 end;
7 /
declare
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 5
SQL>
SQL> select * from test;
COL1
1
SQL>
SQL> As you can see the second insert was rollbacked. But be careful, this works only for ANONYMOUS pl/sql blocks.
Edited by: Sven W. on Jul 24, 2009 3:17 PM -
Error MySQL to Oracle Replication ERROR OGG-00146 Failed to Query Meta
Hello Guys,
I have a configured replication between MySQL database and Oracle Database using Golden Gate.
Extract data from MySQL is replicated to Oracle.
MySQL is on Linux and version is 5.5
Oracle is 11gR2 RAC on Linux (I am using one node for replication)
When i start extract and replicat they works fine, but as soon as record is inserted in source database i.e MySQL extract ABENDED with this error in the log file:
*2013-04-11 16:24:40 ERROR OGG-00146 Oracle GoldenGate Capture for MySQL, smpp7.prm: VAM function VAMRead returned unexpected result: error 600 - VAM Client Report* *<CAUSE OF FAILURE : Failed to Query Metadata from Table : smpp7.sent_sms WHEN FAILED : While Sending Insert and Delete Record WHERE FAILED : MySQLBinLog Reader Module*
CONTEXT OF FAILURE : No Information Available!>.
*2013-04-11 16:24:40 ERROR OGG-01668 Oracle GoldenGate Capture for MySQL, smpp7.prm: PROCESS ABENDING*
This is my extract and replicat:
Extract
GGSCI>ADD EXTRACT SMPP7, TRANLOG, BEGIN NOW
GGSCI>EDIT PARAMS SMPP7
EXTRACT smpp7
DBOPTIONS HOST 10.168.20.253, CONNECTIONPORT 14422
SOURCEDB [email protected]:14422, USERID "*******", PASSWORD "*******"
RMTHOST 10.168.20.31, MGRPORT 7809
RMTTRAIL /u01/app/oracle/oradata/GG/dirdat/D2
TRANLOGOPTIONS ALTLOGDEST /mysql/node3/data/mysql-bin.index
TABLE smpp7.sent_sms;
GGSCI>ADD RMTTRAIL /u01/app/oracle/oradata/GG/dirdat/D2, EXTRACT SMPP7, MEGABYTES 5
GGSCI>INFO RMTTRAIL *
GGSCI>START EXTRACT SMPP7
Replicat
GGSCI>ADD REPLICAT smpp7, EXTTRAIL /u01/app/oracle/oradata/GG/dirdat/D2, checkpointtable ggs_owner.checkpoint
3) edit params smpp7
REPLICAT SMPP7
USERID *******, PASSWORD *******
ASSUMETARGETDEFS
HANDLECOLLISIONS
SOURCEDEFS /u01/app/oracle/oradata/GG/dirdef/smpp7.def
DISCARDFILE /u01/app/oracle/oradata/GG/dirrpt/smpp7.dsc, PURGE
MAP "smpp7.sent_sms", TARGET MYSQL_SMPP7.sent_sms, COLMAP (usedefaults,COMPRESS_=compress,SERVICE=@STRCAT(service,"_sms"));
GGSCI>START REPLICAT smpp7
I have given full rights to MySQL user:
GRANT ALL PRIVILEGES ON *.* TO '**********'@'localhost' IDENTIFIED BY 'kannel' WITH GRANT OPTION;
GRANT ALL PRIVILEGES ON *.* TO '**********'@'10.168.20.253' IDENTIFIED BY 'kannel' WITH GRANT OPTION;
Can you please help me to get through this problem.
Regards, ImranHi,
I have the same error between two Mysql 5.5.
I have added this line in the extact param file :
vam params (arliberror -14 warn)
And on my replicate param file :
map "aix"."etat", target "FR"."etat", REPERROR (-1403, EXCEPTION);
It looks working better.
But I can't modify my max_binlog_size to 4069 (4k). It make have to much file and slow my system. -
Error Handling in Oracpe form 9.4.0
Hi,
Have you got good documentaion about error handling in Oracle form 9.0.4? If yes, Could you let me know?
Many thanks
MichaelMichael,
Although, link I'm listing here is for Forms 4.5, the concepts of Error Handling still apply as Forms Error Handling has not changed significantly.
[Oracle Forms Developer and Forms Server Documentation|http://www.oracle.com/technology/documentation/forms.html]
Select the "A32506_2 PDF Forms 4.5 Advanced Techniques" option.
You can also try the [Oracle9iDS Forms Developer Reference Guide|http://www.oracle.com/technology/documentation/forms/902docs/9iRefGuide.zip] from the [Link to Oracle Forms 10g (10.1.2), Oracle Forms 10g (9.0.4), and Oracle9i Forms (9.0.2) Documentation|http://www.oracle.com/technology/documentation/9i_forms.html]. This is a .zip file which contains the "Forms 9i Reference Guide" pdf file.
Hope this helps.
Craig... -
Page Error handling question..
Using APEX 4.1.1.. Hosted instance.. I am testing various error handling functions (Oracle's standard one from documentation and others). I have a page with a standard report, I have defined the page to have an associated error handling function. On the report I have a calculated column that should error out due to a division by 0 error..
Now what I had thought was, the page would handle the error more gracefully than previous version, in that it would show the custom error message I define in the constraints table...
Is there a section of the documentation I am missing that shows at what point the error handling function kicks in and where we need to invoke it otherwise?
Thank you,
Tony Miller
Dallas, TXInteresting. Had never considered this aspect.
Just did a couple of tests - so it must only come into play from the PL/SQL engine.
Created an sql report:
select floor(dbms_random.value(1,10))/0 num
from dual
connect by level <= 10But the error function never gets hit.
begin
for i in (select floor(dbms_random.value(1,10))/0 num
from dual
connect by level <= 10) loop
htp.p(i.num);
end loop;
end;Function gets hit.
Just looking at the docs, there doesn't appear to be any indication of processing point.
But from Patrick's blog:
This includes errors raised by validation, process, … and all errors raised by the Application Express engine itself.http://www.inside-oracle-apex.com/apex-4-1-error-handling-improvements-part-1/
I guess an SQL report isn't considered as an 'all errors raised by the apex engine'. -
1. After imported data,i want start rep_2 at a CSN point but it dosn't work
2013-09-13 20:22:15 ERROR OGG-01028 Oracle GoldenGate Delivery for Oracle, rep_2.prm: Incompatible record (101) in ./dirdat/r2000000, rba 86102323 (getting header).
2013-09-13 20:22:15 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rep_2.prm: PROCESS ABENDING.
2.
So i try many times ,i want the rep_2 to find a avalibale file to start(ignore some file )
ALTER REPLICAT rep_2, EXTSEQNO X
Still comes OGG-01028
3.
Logdump 3 >open ./dirdat/r2000000
Current LogTrail is /home/oracle/ogg/dirdat/r2000000
Logdump 4 >ghdr on
Logdump 5 >count
I didn't find any bad rows
So somebody help!!![oracle@p49drzdb dirprm]$ cat rep_2.prm
REPLICAT rep_2
SETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)
USERID ogg, PASSWORD ogg
ASSUMETARGETDEFS
DBOPTIONS SUPPRESSTRIGGERS
ddl include all
DDLERROR DEFAULT DISCARD IGNOREMISSINGOBJECTS
REPERROR (DEFAULT, DISCARD)
DISCARDFILE ./dirrpt/rep_r2.DSC, PURGE
MAP ... -
How to limit extract base on date condition in oracle goldengate?
Hi all,
I have a problem about date condition in extract parameter:
My extract parameter:
GGSCI>edit params ext1
EXTRACT ext1
USERID ggadmin, PASSWORD ggadmin
EXTTRAIL /u01/app/oracle/product/gg/dirdat/lt
DDL INCLUDE MAPPED
table test.chien, where (id >4 and TDATE>TRUNC(TO_DATE('01/01/2011 00:00:00','DD/MM/YYYY HH24:MI:SS')));
when I start extract, have a error:
+7. 2011-11-04 07:06:45 ERROR OGG-01157 Oracle GoldenGate Capture for Oracle, ext1.prm: Error in WHERE clause for TEST.CHIEN.+
I check where condition in the select statement is ok.
I don't know what is different between condition in params of extract and condition in select statement?
Please explaint to me and hepl me how to limit extract capture base date condition,
Thanks so much.
Omni
Edited by: user12378049 on 21:46 03-11-2011Thanks for Stevencallan's reply.
I try again with Stevencallan's way, but not successful.
TABLE SCOTT.EMP, sqlpredicate "where EMPNO >4 AND HIREDATE> TO_DATE('01/01/1911 00:00:00','DD/MM/YYYY HH24:MI:SS')"; All Error is the same my old post:
2011-11-07 05:37:52 INFO OGG-01517 Oracle GoldenGate Capture for Oracle, ext1.prm: Position of first record processed Sequence 26, RBA 21009936, SCN 0.1498876, Nov 7, 2011 5:34:14 AM.
2011-11-07 05:37:53 ERROR OGG-00212 Oracle GoldenGate Capture for Oracle, ext1.prm: Invalid option for MAP: "where.
2011-11-07 05:37:53 ERROR OGG-01668 Oracle GoldenGate Capture for Oracle, ext1.prm: PROCESS ABENDING. {code}
The trunc(date) to round date to the first time in the day. I think it is not reason of the error.
{code} The TRUNC (date) function returns date with the time portion of the day truncated to the unit specified by the format model fmt. The value returned is always of datatype DATE, even if you specify a different datetime datatype for date. If you omit fmt, then date is truncated to the nearest day. Please refer to "ROUND and TRUNC Date Functions" for the permitted format models to use in fmt.
{code}
I have no resolution for this problem yet.
Who had passed this case and had resolution? Please tell me your way
Thanks so much.
---Omni -
Oracle stored procedure call failed,but not captured by the error handling
Hi All,
I have a unix shelll script which calls a stored proc in Oracle, the stored proc call failed due to "ORA-01033: ORACLE initialization or shutdown in progress".
But it is not captured in the error handling block, Any ideas why this had happened?
SQL file had : my_test_sql.sql
exec my_proc(..............);
Unix shell script has this call:
sqlplus -s my_user/my_pwd@db1 @my_test_sql.sql
if [[ $? -ne 0 ]]; then
echo "failed"
exit 1
else
echo "success"
fi
If i execute the above shell, I'm getting the following
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
SP2-0306: Invalid option.
Usage: CONNÝECT¨ Ýlogon¨ ÝAS SYSDBA¨
where <logon> ::= <username>Ý/<password>¨Ý@<connect_identifier>¨ | /
success.
This puzzled me, any pointers?The $? status variable shows the return code of the last command executed. It will be difficult to determine what the exit status of your sql script is without knowing the script. Do you have any "WHENEVER SQLERROR EXIT" statements in the script?
The ORA-01033 error happens when the database is not open, perhaps in recovery, or startup or shutdown is halted due to a failed or full disk, error in archiving or writing to redo, etc. -
Oracle Error Handling in Shell Scripts
I need to manage 2 diferente class of errors :
Oracle Errors(produced in compilation time) and
Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
Please can you help me how can I manage then?
this my alternative but is not correct ;
#creating conexion with sql
exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
#Evaluating last sentence (sqlplus . . . . )
VERROR=$?
#Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
if [ $VERROR != 0 ]
then
echo "value of VERROR are:$VERROR"
echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
" Here show VERROR
else #Oracle error handling in compilation time
echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
" Here show VERROR
else if [ $VERROR = 0 ]
" DATA EXTRACTION WAS SUCESSFUL"
fi
Would apreciate your help its very urgent.
Best Regards
Antoniouser5647282 wrote:
I need to manage 2 diferente class of errors :
Oracle Errors(produced in compilation time) and
Operating Syste Error(e.g. No Datbase conection ORA-1017,etc) my shell its KSH.
Please can you help me how can I manage then?
this my alternative but is not correct ;
#creating conexion with sql
exit | sqlplus -s $USERPV_DB/$PWDPV_DB @$VORDSQLPATH/ord.extractor_porven.sql $VFDESDE $VFHASTA > $VORDDATOS_PATH/ord.extractor_porven$VDATE.dat 2>> $VLOG
Piping the output of 'exit' to sqlplus????????? what do you expect from this?
#Evaluating last sentence (sqlplus . . . . )
VERROR=$?any error returned by sqlplus as $? would be a fatal error of sqlplus itself, not any error returned by processing a sql statement. If your script ord.extractor_porven.sql were to generate, say, an ORA-00001, that is NOT an error in sqlplus and so does not return to the OS as an error of sqlplus.
#Si VERROR=0 should stop process execution and alert with echo ".."Oracle error handling before compilation time
if [ $VERROR != 0 ]
then
echo "value of VERROR are:$VERROR"
echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME" >> $VLOG 2> /dev/null
" Here show VERROR
else #Oracle error handling in compilation time
echo "`date +"$V_FORMATDATE"` DATA EXTRACTION WAS NOT SUCESSFUL ERROR BEFORE COMPILATION TIME " >> $VLOG
" Here show VERROR
else if [ $VERROR = 0 ]
" DATA EXTRACTION WAS SUCESSFUL"
fi
Would apreciate your help its very urgent.
there is no "urgent" here.
"Urgent" means one of two things -
1) people are dying, or
2) you have a customer-facing, revenue-producing production system that is down.
(And to get some perspective on the second case, keep the first in mind.)
For the first, you call whatever civil emergency service seems appropriate.
For the second, you open an SR with Oracle - which requires a paid-up support contract. For them to consider your problem "urgent", you will need to demonstrate that your problem falls under item #2. I seriously doubt your problem fits that criteria.
Best Regards
Antonio -
I want to handle an Oracle Error in my code where the "execute immediate" statement comes to play.
My code goes against several tables
ID_TABLE_08
ID_TABLE_07
ID_TABLE_06
If table does not exist in database (ie: ID_TABLE_05) I get : Oracle Error ORA-0942 table or view does not exist.
How can I capture and handle this error so
1. The code will continue to run getting the next value
2. The bad record still will get written in to a table called bad_table.
v_year := TO_CHAR (pp_eff_dtg (indx), 'yy');
BEGIN
EXECUTE IMMEDIATE
'SELECT DISTINCT ID_number
FROM ID_TABLE_'|| v_year||'
WHERE NAME = :NAME
AND EFFECTIVE_DATE = : EFFECTIVE_DATE
INTO v_ID_number
USING pp_NAME (indx),
pp_eff_dtg (indx);
GOTO END_LOOP;
EXCEPTION
WHEN NO_DATA_FOUND THEN
GOTO INSERT_ADD_RECORD;
END;
Thank you for your help!if you want to handle a specific oracle error number you can also declare an exception, match that exception to the error number and handle it.
Like this (not syntax checked)
declare
e_table_does_not_exist exception;
pragma exception_init (-942,e_table_does_not_exist); -- I hope I got the parameters in the right order
begin
EXECUTE IMMEDIATE('select * from ID_TABLE_'|| v_year||' where ...');
exception
when e_table_does_not_exist then -- handle specific error
raise_application_error(-20001,'The table ID_TABLE_'|| v_year||' could not be found. Next time enter a valid year!');
end; -
Send a email while error handler Oracle Service bus 11g
I need to be send an email while error handler in proxy service message flow.
Error Handler Node -> stage -> report action
before or after report action, I need be to send a email
Could you please help this issue? I appreciate your help.
Thanks,
sdevAdd Alert to your Error Handler and set Alert Destination with your email set in.
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/operations/monitoring.html#wp1108089
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/consolehelp/alertdestinations.html -
When I migrate CLOB datas from Oracle 10g to PostgreSQL 9.0,and the target data type is text,the replicat process abend,and it reports as following:
WARNING OGG-03056 Oracle GoldenGate Delivery, repdb2.prm: Source table SDCMNET.T_INFO_SUPERIOR_PROGRAM column PRO_CONTENT_CLOB data size exceeds the maximum target table sdcmnet.t_info_superior_program column pro_content_clob size. Automatic truncation is enabled for all tables/columns without further warnings.
WARNING OGG-00869 Oracle GoldenGate Delivery, repdb2.prm: [SQL error 0 (0x0)][Oracle][ODBC PostgreSQL Wire Protocol driver]String data, right truncated.
WARNING OGG-01004 Oracle GoldenGate Delivery, repdb2.prm: Aborted grouped transaction on 'sdcmnet.t_info_superior_program', Database error 0 ([SQL error 0 (0x0)][Oracle][ODBC PostgreSQL Wire Protocol driver]String data, right truncated.
But,according to the SEQNO and RBA,I find the records have been migrated,and the length of records is equal to what is in oracle.Then I try to use the odbc driver of postgresql 9.3 to replace,although I can login the database ,but it warns again.
Can anyone help me?This forum is for Oracle Maven Repository. You might have more luck posting your question in an forum for GoldenGate - you are more likely to find someone who knows about that product in its own forums.
-
GGS ERROR 150 Oracle GoldenGate Manager for Oracle, mgr.prm: Addre
Hi,
I am not able to start manager process in golden gate.
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
EXTRACT ABENDED EXT1OP0 00:00:00 19:20:29
EXTRACT ABENDED PMP1OP0 00:00:00 19:17:36
ES option not used.).
2012-08-12 23:19:55 GGS ERROR 150 Oracle GoldenGate Manager for Oracle, mgr.prm: Address already in use.
2012-08-12 23:19:55 GGS ERROR 190 Oracle GoldenGate Manager for Oracle, mgr.prm: PROCESS ABENDING.
2012-08-12 23:46:36 GGS INFO 399 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (ggs): start EXT1OP0.
2012-08-12 23:55:02 GGS INFO 399 Oracle GoldenGate Command Interpreter for Oracle: GGSCI command (ggs): start MANAGER.
2012-08-12 23:55:02 GGS WARNING 201 Oracle GoldenGate Manager for Oracle, mgr.prm: purgeoldextracts /opt/ggs/data01/op00/trail/sc,usecheckpoints,minkeepdays 6 (MINKEEPFILES option not used.).
2012-08-12 23:55:02 GGS ERROR 150 Oracle GoldenGate Manager for Oracle, mgr.prm: Address already in use.
2012-08-12 23:55:02 GGS ERROR 190 Oracle GoldenGate Manager for Oracle, mgr.prm: PROCESS ABENDING.user23 wrote:
Hi,
I am not able to start manager process in golden gate.
Program Status Group Lag Time Since Chkpt
MANAGER STOPPED
EXTRACT ABENDED EXT1OP0 00:00:00 19:20:29
EXTRACT ABENDED PMP1OP0 00:00:00 19:17:36
2012-08-12 23:19:55 GGS ERROR 150 Oracle GoldenGate Manager for Oracle, mgr.prm: Address already in use.the port number you specified in your dirprm/mgr.prm file is already in use by another process. Change the port number (or kill the other process) and try to restart mgr.
ggsci> view param mgr
PORT 7811
ggsci> edit param mgr
(change to unused port, save)
ggsci> start mgr
ggsci> view report mgr
Maybe you are looking for
-
Can anyone tell me a how to create layers?
I have a page with a flash graphic and I've added a floating image to the page. When the image floats, part of it is behind the flash graphic. I want it to be on top. I think this has to do with layers, but I can't seem to find any documentation t
-
Mavericks and password protected WiFi
I upgraded to Mavericks on early 2011 MacBook Pro 13 inch. My basic WPA(2) is working fine. However I tried to connect to password protected WiFi on inflight GoGo internet and the hotel internet and neither would bring up the webpage to login. The W
-
I am trying to execute a query based on a data block. The data block name is B_STR and it has a item (checkbox) named CB_SELECT When I run this code, it returns an exception saying that it is an invalid table name. Is it possible to execute a query b
-
Last week one of our Data bases was down for a while when some servers which use this DB in their Data sources were bouncing......so the servers would go into ADMIN mode ...i just pushed them to RUNNING mode and after a while the DB was back up ....w
-
Sales Order printing on two pages
Hi Gurus, Our SAP just got upgraded to 8.81 PL07 and since then we are facing printing problems. The thing is all the sales orders and invoices are printing on two pages (when only one page is required); the second page having only the page header. M