Sunday, October 4, 2015

Adding Printer via samba

5:12 AM Posted by Unknown No comments
if you ever wondered how to add printer on Linux machine which your printer server is windows you might wanted to follow the instruction below :

1. Connect to the CUPS:
      in your browser type : localhost:631
2.Enter you administrator USER/PASSWORD
3.After pressing the add printer use the following structure for samba like this:
    smb://workgroup\User.Name:passwd@domain.local/asistentfelie/HPLaserJ
    smb://workgroup\printer:printer@10.5.11.52/Sharp
then enjoy

OGG “ABEND” process Troubleshoot

4:56 AM Posted by Unknown No comments
if you are using oracle golden gate(OGG) and in your log encounter a similar error like that : 


2014-01-27 11:51:19 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, REP1.prm: REPLICAT REP1 started.
2014-01-27 11:51:19 WARNING OGG-03504 Oracle GoldenGate Delivery for Oracle, REP1.prm: NLS_LANG character set WE8MSWIN1252 on the target is different from the source database character set AL32UTF8. Replication may not be valid if the source data has an incompatible character for the target NLS_LANG character set.
2014-01-27 11:51:19 WARNING OGG-01004 Oracle GoldenGate Delivery for Oracle, REP1.prm: Aborted grouped transaction on 'TEST.CT1', Database error 1403 (OCI Error ORA-01403: no data found, SQL <UPDATE "TEST"."CT1" SET "OBJECT_NAME" = :a1 WHERE "RNO" = :b0>).
2014-01-27 11:51:19 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, REP1.prm: Repositioning to rba 1216 in seqno 2.
2014-01-27 11:51:19 WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, REP1.prm: SQL error 1403 mapping CTEST.CT1 to TEST.CT1 OCI Error ORA-01403: no data found, SQL <UPDATE "TEST"."CT1" SET "OBJECT_NAME" = :a1 WHERE "RNO" = :b0>.
2014-01-27 11:51:19 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, REP1.prm: Repositioning to rba 1216 in seqno 2.
2014-01-27 11:51:19 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, REP1.prm: Error mapping from CTEST.CT1 to TEST.CT1.
2014-01-27 11:51:19 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, REP1.prm: PROCESS ABENDING.


and simply cant start it u might wanted to try the method below:




1. connect via ssh to the source Database
export ORACLE_SID=${ORACLE_SID}
2. query FLASHBACK_SCN
sqlplus / as sysdba
SQL> select dbms_flashback.get_system_change_number from dual or select current_scn from v$database;
GET_SYSTEM_CHANGE_NUMBER
------------------------
17262230 --ID is your select result
SQL> exit
3. export dump
Note : FLASHBACK_SCN is upper shown number.
exp system@${ORACLE_SID} owner=ABEND_process file=ABEND_process.dmp grants=n statistics=none triggers=n compress=n FLASHBACK_SCN=17262230 log=ABEND_process.log
4. Copy the dump to Staging Database
5. connect via ssh to the staging Database
export ORACLE_SID=${STAGING_ORACLE_SID}


6. Drop table
sqlplus / as sysdba
SQL>set linesize 999
SQL>set pagesize 999
SQL>select 'drop table '||owner||'.'||object_name||' cascade constraint;' from dba_objects where object_type='TABLE' and owner in ('ABEND_process');


Note : after running the query above copy the the prompted results and run to make sure the table is dropped.


7. import dump
  • go to the dump directory
imp system@${ORACLE_STAGING_SID} file=ABEND_process.dmp fromuser= ABEND_process touser= ABEND_process ignore=y log=ABEND_process.log
8. Disable Foreign key
SQL> sqlplus / as sysdba
SQL>set linesize 999
SQL>set pagesize 999
SQL>select 'alter table '||owner||'.'||table_name||' disable constraint '||constraint_name||';' from dba_constraints where owner in ('ABEND_process') and constraint_type='R';
SQL>exit
Note : after running the query above copy the the prompted results and run to make sure the table is dropped.
9. Go to stg_goldengate_home
  • ./ggsci
SQL>START RP_ ABEND_process aftercsn $FLASHBACK_SCN
SQL>exit
Note : $FLASHBACK_SCN is query in source database .