Skip to content

Instantly share code, notes, and snippets.

@klascano
klascano / oracle.sql
Created August 4, 2014 15:48
remover caracter salto de lines #oracle
update eeasa_tra_comentario
set etco_comentario = replace(replace(etco_comentario,chr(10),' '),chr(13),' ')
where (instr(etco_comentario,chr(10))>0 OR instr(etco_comentario,chr(13))>0)
@klascano
klascano / oracle_backup_docker.sh
Created June 23, 2022 21:00
oracle backup from docker
#!/bin/bash
FECHA=`date +%Y%m%d%H%M`
rm -rf respaldo.log
docker exec oracle122c_prod /bin/bash -c "rm -rf /u02/app/oracle/oradata/sgd$FECHA.dmp"
docker exec oracle122c_prod /bin/bash -c "rm -rf /u02/app/oracle/oradata/sgd$FECHA.log"
echo "**********borrado de archivo respaldo anteriores**********"
echo " "
docker exec oracle122c_prod /bin/bash -c "ORACLE_HOME=/u01/app/oracle/product/12.2.0/dbhome_1 ORACLE_SID=ORCLCDB /u01/app/oracle/product/12.2.0/dbhome_1/bin/expdp system/UZrC3Z schemas=seguridad directory=TEST_DIR dumpfile=sgd$FECHA.dmp logfile=sgd$FECHA.log"
echo "**********fin de respaldo**********"
echo " "