Category: Tools

Oct 25 2011

Dos batch to send email with Attachment

Command syntax:

  • febootimail -ATTACH image.jpg
  • febootimail -ATTACH *.doc -ATTACH 20??-file.gif
  • febootimail -FILE document.doc -ATTACH "C:\my music\music.mp3"
  • febootimail -FILE "image.jpg | C:\my music\music.mp3 | data.txt"

-ATTACH or -FILE switch specifies which files will be added to message when sending email from command line. If attachment file path is not specified, attachments are taken from the folder in which Febootimail is executed.

Since Febooti Command line email version 3.0 it is possible to use file masks (e.g. “*.*” or “files*.jp?”) with -ATTACH (or -FILE) parameter thus cancelling the need for batch files.

Pay attention that if spaces are used either in file name or folder name, expression has to be put in quotes. If many files are sent, -ATTACH switch must be repeated before each file or separate filenames by using | (pipe).

 
C:\>febootimail -SERVER smtp.server.com -FROM jack@sender.com -TO john@recipients.com -ATTACH "c:\My Presentations\presentation.ppt | c:\terms\terms.txt" -TEXT DOS mailing out presentation and term files as attachments

Text files can be sent out either as plain message or as attachment. In the latter case text file formatting will not be interpreted arbitrary by email clients, so that it is useful to send text files as attachments if every byte has to be preserved as is.

 
C:\>febootimail *other mail parameters* -ATTACH plaintextfile.txt -TEXT "send e-mail from DOS with text file attachment"

If many files are to be sent as attachments with command line mail utility, it is most convenient to create batch file.

 
@echo off
rem send all files as attachments. one attach per email...

for %%i in (*.*) do Febootimail *other params* -ATTACH %%i

Note that (*.*) stands for file mask where (*.*) means that all files will be sent as attachments. If (*.doc) is used, all files with extension .doc will be sent. If (??-dec*.d?c) is specified, only files that have “-dec” in their names as 3rd to 6th characted and extension that starts with “d” and ends with “c” (with 2nd character being any) are to be sent.

Also, note that in example above every file is sent as separate email. If all files have to be attached to single email message, use the batch files from example given below.

 
@echo off
rem this is batch file - do.bat
rem will call batch file - send.bat

cmd /v /c send.bat

rem /v - delayed environment variable expansion
rem /c carries out the command specified by string
rem Call this file from Windows 2000 / XP / 2003 / Vista

 
@echo off
rem batch file - send.bat must be called from file do.bat

rem Gathering all files in current folder with mask specified...
dir *.doc /A-D /B > tmp

rem Expand environment variable attach as long as needed...
for /F "tokens=*" %%i in (tmp) do set attach=!attach! -ATTACH %%i

rem Send all files / attachments in single email...
febootimail <standard params excluding -ATTACH> %ATTACH%

rem Cleaning temporary file...
del tmp

 
Download febootimail from following Link.

http://www.febooti.com/products/command-line-email/online-help/commands/dos-e-mail-automate-attachment-sending.html

Nov 18 2010

Windows Backup

I have used this Backup and it is working fine in Windows.

http://www.argentuma.com/backup/software/windows-backup.html

Jan 27 2010

Export – Import Very Large Database

Export – Import Very Large Database

Step 1:

EXP FULL=Y ROWS=N from the source-db then IMP FULL=Y ROWS=N INDEXES=N CONSTRAINTS=N into the target-db

The idea is to lay down the tablespaces and table definitions in the target-db. Depending on similarities (or the lack thereof) between the two dbs, you may or may not be able to create tablespaces using IMP, but the goal is to import tables DDL and the DDL for other objects (but not indexes and constraints) using IMP
Don’t forget to disable all DML triggers created in target-db before going on to the next step…

Step 2:
Disable Logging on All segment Level (Table & Table Space)

Step 3:
Run as many concurrent exp/imp streams as you can between the source-db and target-db to copy the table data across Goal is to keep as many streams running concurrently as possible. For smaller tables, one exp/imp stream per table. For larger tables, one exp/imp stream per partition or one exp/imp stream per section of the table specified using EXP QUERY=

Step 4:
Create indexes and constraints using previously-obtained EXP FULL=Y ROWS=N in step #1 Usually I just extract the DDL using IMP INDEXFILES= and create SQL*Plus scripts for this, so I can break the task up into many concurrently running jobs for speed…

Step 5:
Enable Logging and Trigger

Jan 26 2010

Oracle Database Job Scheduler UI

1. Oracle APEX
Oracle Application Express (Oracle APEX), formerly called HTML DB, is a rapid web application development tool for the Oracle database.
APEX can be used as GUI/UI for Oracle Database Job Scheduler.
APEX
2. Database Control / Grid Control

Alibi3col theme by Themocracy