Käynnissä

Korn Shell SCript

the Only part that needs to be coded is the conversion of the query to html

Created html report from output

1. add title and date

2. add columns to report

3. add output rows to html table

4. If LastBackupFailed column contains 1 then highlight row in red to indicate failure

5. if BackupStartTime = NULL highlight row in yellow to indicate a warning to check database for backup

6. Save HTML file

Convert sql query output to html

Query

`isql -Usa -Pmy_sa_password_goes_here <<EOF

select @@servername, DBName, BackupInProgress, LastBackupFailed, BackupStartTime, LastTranLogDumpTime

from master, monopendatabase

go

EOF`

Column Names

Server Name DBName, BackupInProgress, LastBackupFailed, BackupStartTime, LastTranLogDumpTime from master, monopendatabase

Output of query

Server1 master 0 0 Feb 17 2013 5:01PM NULL

Server1 sybsystemdb 0 0 NULL NULL

Server1 model 0 0 Feb 17 2013 5:01PM NULL

Server1 tempdb 0 0 NULL NULL

Server1 sybsecurity 0 0 NULL NULL

Server1 sybsystemprocs 0 0 Feb 17 2013 5:02PM NULL

Server1 twist_t_tables2 0 0 Feb 17 2013 6:28PM NULL

Server1 twist_hist 0 0 Feb 17 2013 5:58PM Feb 18 2013 2:15PM

Server1 twist_cswrkr_nts_txt 0 0 Feb 17 2013 5:48PM Feb 18 2013 2:30PM

Server1 twist_t_tables 0 0 Feb 17 2013 6:13PM NULL

Server1 ChangeRequest 0 0 Feb 17 2013 6:14PM NULL

Server1 h_twist 0 0 Feb 17 2013 6:14PM NULL

Server1 twist 0 0 Feb 17 2013 5:02PM Feb 18 2013 2:30PM

Server1 tpcs 0 0 Feb 17 2013 5:00PM Feb 18 2013 2:45PM

Server1 au_arch 0 0 NULL NULL

Server1 cc_broker 0 0 Feb 17 2013 6:29PM Feb 18 2013 2:30PM

Server1 cc_conv 0 0 NULL NULL

Server1 sybpcidb 0 0 NULL NULL

HTML Report Structure

Report Title: Database Backup Report

Date of Report Date Report Run:Current Date

Columns in HTML Table

Server Name DBName, BackupInProgress, LastBackupFailed, BackupStartTime, LastTranLogDumpTime from monopendatabase

Taidot: Shell Script

Näytä lisää: korn shell, shell script, korn , eof, script warning, html table save, html conversion report, shell add file, convert master, 2013 query, convert sql backup file, database query failure, save table file, save html sql database, save html sql, script sql table, shell column, save html database, sql select script, backup sql script, script backup, convert sql query sql query, convert sql query sql, Model Conversion, convert sql file file

Tietoa työnantajasta:
( 1 arvostelu ) Pflugerville, United States

Projektin tunnus: #4264058

Myönnetty käyttäjälle:

gajan1985

Hi, I have experience in shell scripting and i periodically write this kind of scripts to send email reports. I just have to change the column headings and adjust to your color preference. I can take this up and fin Lisää

30 $ USD 1 päivässä
(0 arvostelua)
0.0

4 freelanceria on tarjonnut keskimäärin 30 $ tähän työhön

necloli

Hi! I have a lot of experience writing shell scripts. I will do everything you need and a little more. Thanks!

30 $ USD 1 päivässä
(2 arvostelua)
1.0
iizke

I am glad to help you.

30 $ USD 1 päivässä
(1 arvostelu)
1.0
vanev

Hi, I can do this for you!

30 $ USD 1 päivässä
(0 arvostelua)
0.0