Today I had to create a report from an online database.
Below is the script used. It took about 5 to 6 hours to process the 48766 records on the database using the SSH - Secure SHell.
The SSH Secure Shell for Workstations Windows client (SSH2 client) is a program that allows secure network services over an insecure network.
The SSH Secure Shell for Workstations Windows client replaces other, insecure terminal applications, such as Telnet and FTP. It allows you to securely remote login to remote host computers, to execute commands safely in a remote computer, and to provide secure encrypted and authenticated communications between two untrusted hosts. X11 connections and arbitrary TCP/IP ports can also be forwarded over the secure channel.
It is a powerful guardian against the numerous security hazards that nowadays threaten network communications.
Here the script
#! /bin/bash
HERE=/var/www/html/cfl/utils
HOST=dbms.m1group.com.au
ME=DBMS
TEMPLATE=template1
DATA=/var/www/html/cfl
SCRIPT=dbms_gen.sql
BPD_DATA=${DATA}/export
FLSD_DATA=${DATA}/export
C21_DATA=${DATA}/export
HS_DATA=${DATA}/export
TR_TO_CSV=${DATA}/utils/tr_to_csv.pl
#
#
cd ${HERE}
# Make BPD and HS reports
#
# Generate BPD and HS mail out files
${TR_TO_CSV} ${BPD_DATA}/BPD`date -I`_all.csv -a --c BPD
#${TR_TO_CSV} ${FLSD_DATA}/FLSD`date -I`_all2.csv -a --c FLSD
#${TR_TO_CSV} ${C21_DATA}/C21`date -I`_all2.csv -a --c C21
#
# 2005/01/28 not used anymore HS no longer customer
#${TR_TO_CSV} ${HS_DATA}/HS_`date -I`_all2.csv -a --c HS
#
Wednesday, May 30, 2007
Subscribe to:
Post Comments (Atom)
1 comment:
Hello. This post is likeable, and your blog is very interesting, congratulations :-). I will add in my blogroll =). If possible gives a last there on my blog, it is about the Smartphone, I hope you enjoy. The address is http://smartphone-brasil.blogspot.com. A hug.
Post a Comment