MAIL AFTER DUMP

This is a discussion on MAIL AFTER DUMP within the sybase forums in Other Databases category; Hi, all how can I send automatically a email with the log, after full dump database ? TIA Henry...

Go Back   Database Forum > Other Databases > sybase

Database Forums

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 07-08-2008, 05:53 AM
Default MAIL AFTER DUMP

Hi, all
how can I send automatically a email with the log, after full dump database
?
TIA
Henry


Reply With Quote
  #2  
Old 07-08-2008, 11:17 AM
Default Re: MAIL AFTER DUMP

write a shell script that does the database dump, then sends the email.

"Henry" wrote in message
news:48732b21-at-forums-1-dub...
> Hi, all
> how can I send automatically a email with the log, after full dump
> database ?
> TIA
> Henry
>
>



Reply With Quote
  #3  
Old 07-08-2008, 11:21 AM
Default Re: MAIL AFTER DUMP

For example:

#!/bin/sh
$SYBASE/$SYBASE_OCS/bin/isql -U.. -S.. -P.. << EOF
dump database to ...
go
EOF
cat $SYBASE/$SYBASE_ASE/install/ | mailx -s "Database Dump
Complete" myemail-at-mycompany.com




You could also use "xp_cmdshell" to accomplish this all within an isql
prompt or stored procedure as well.


"Sherlock, Kevin" wrote in message
news:4873770d$1-at-forums-1-dub...
> write a shell script that does the database dump, then sends the email.
>
> "Henry" wrote in message
> news:48732b21-at-forums-1-dub...
>> Hi, all
>> how can I send automatically a email with the log, after full dump
>> database ?
>> TIA
>> Henry
>>
>>

>
>



Reply With Quote
  #4  
Old 07-08-2008, 11:44 AM
Default Re: MAIL AFTER DUMP

thank you for suggestion.
I'm using Window 2003 not Unix / lynux.
Any other suggestions under windows ?


"Sherlock, Kevin" ha scritto nel messaggio
news:487377fb$1-at-forums-1-dub...
> For example:
>
> #!/bin/sh
> $SYBASE/$SYBASE_OCS/bin/isql -U.. -S.. -P.. << EOF
> dump database to ...
> go
> EOF
> cat $SYBASE/$SYBASE_ASE/install/ | mailx -s "Database Dump
> Complete" myemail-at-mycompany.com
>
>
>
>
> You could also use "xp_cmdshell" to accomplish this all within an isql
> prompt or stored procedure as well.
>
>
> "Sherlock, Kevin" wrote in message
> news:4873770d$1-at-forums-1-dub...
>> write a shell script that does the database dump, then sends the email.
>>
>> "Henry" wrote in message
>> news:48732b21-at-forums-1-dub...
>>> Hi, all
>>> how can I send automatically a email with the log, after full dump
>>> database ?
>>> TIA
>>> Henry
>>>
>>>

>>
>>

>
>



Reply With Quote
  #5  
Old 07-08-2008, 12:18 PM
Default Re: MAIL AFTER DUMP

Well, my first suggestion would be to download and run cygwin which is a
unix/linux shell substitution under dos.

As for scripting in DOS goes, I'm no expert, but this conversion should be
pretty straight forward. The trick is having a command line interface to
send an email from a dos script.

%SYBASE%\%SYBASE_OCS%\isql -U... -S... -P... << EOF
dump database to ...
go
EOF

type $SYBASE/$SYBASE_ASE/install/ | your_CLI_command_to_email

"Henry" wrote in message
news:48737d5d-at-forums-1-dub...
> thank you for suggestion.
> I'm using Window 2003 not Unix / lynux.
> Any other suggestions under windows ?
>
>
> "Sherlock, Kevin" ha scritto nel messaggio
> news:487377fb$1-at-forums-1-dub...
>> For example:
>>
>> #!/bin/sh
>> $SYBASE/$SYBASE_OCS/bin/isql -U.. -S.. -P.. << EOF
>> dump database to ...
>> go
>> EOF
>> cat $SYBASE/$SYBASE_ASE/install/ | mailx -s "Database Dump
>> Complete" myemail-at-mycompany.com
>>
>>
>>
>>
>> You could also use "xp_cmdshell" to accomplish this all within an isql
>> prompt or stored procedure as well.
>>
>>
>> "Sherlock, Kevin" wrote in message
>> news:4873770d$1-at-forums-1-dub...
>>> write a shell script that does the database dump, then sends the email.
>>>
>>> "Henry" wrote in message
>>> news:48732b21-at-forums-1-dub...
>>>> Hi, all
>>>> how can I send automatically a email with the log, after full dump
>>>> database ?
>>>> TIA
>>>> Henry
>>>>
>>>>
>>>
>>>

>>
>>

>
>



Reply With Quote
  #6  
Old 07-08-2008, 12:38 PM
Default Re: MAIL AFTER DUMP

After looking further into this topic, this section of the manual might be
of interest to you:

http://infocenter.sybase.com/help/to...fig/X36476.htm

This goes into how to configure ASE to process email. I've never used it,
so I am not at all familiar with this feature.

"Sherlock, Kevin" wrote in message
news:48738543$1-at-forums-1-dub...
> Well, my first suggestion would be to download and run cygwin which is a
> unix/linux shell substitution under dos.
>
> As for scripting in DOS goes, I'm no expert, but this conversion should be
> pretty straight forward. The trick is having a command line interface to
> send an email from a dos script.
>
> %SYBASE%\%SYBASE_OCS%\isql -U... -S... -P... << EOF
> dump database to ...
> go
> EOF
>
> type $SYBASE/$SYBASE_ASE/install/ |
> your_CLI_command_to_email
>
> "Henry" wrote in message
> news:48737d5d-at-forums-1-dub...
>> thank you for suggestion.
>> I'm using Window 2003 not Unix / lynux.
>> Any other suggestions under windows ?
>>
>>
>> "Sherlock, Kevin" ha scritto nel
>> messaggio news:487377fb$1-at-forums-1-dub...
>>> For example:
>>>
>>> #!/bin/sh
>>> $SYBASE/$SYBASE_OCS/bin/isql -U.. -S.. -P.. << EOF
>>> dump database to ...
>>> go
>>> EOF
>>> cat $SYBASE/$SYBASE_ASE/install/ | mailx -s "Database
>>> Dump Complete" myemail-at-mycompany.com
>>>
>>>
>>>
>>>
>>> You could also use "xp_cmdshell" to accomplish this all within an isql
>>> prompt or stored procedure as well.
>>>
>>>
>>> "Sherlock, Kevin" wrote in message
>>> news:4873770d$1-at-forums-1-dub...
>>>> write a shell script that does the database dump, then sends the email.
>>>>
>>>> "Henry" wrote in message
>>>> news:48732b21-at-forums-1-dub...
>>>>> Hi, all
>>>>> how can I send automatically a email with the log, after full dump
>>>>> database ?
>>>>> TIA
>>>>> Henry
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



Reply With Quote
  #7  
Old 07-08-2008, 12:38 PM
Default Re: MAIL AFTER DUMP

OK, now I try to make it.
Thank you for the moment.
"Sherlock, Kevin" ha scritto nel messaggio
news:48738543$1-at-forums-1-dub...
> Well, my first suggestion would be to download and run cygwin which is a
> unix/linux shell substitution under dos.
>
> As for scripting in DOS goes, I'm no expert, but this conversion should be
> pretty straight forward. The trick is having a command line interface to
> send an email from a dos script.
>
> %SYBASE%\%SYBASE_OCS%\isql -U... -S... -P... << EOF
> dump database to ...
> go
> EOF
>
> type $SYBASE/$SYBASE_ASE/install/ |
> your_CLI_command_to_email
>
> "Henry" wrote in message
> news:48737d5d-at-forums-1-dub...
>> thank you for suggestion.
>> I'm using Window 2003 not Unix / lynux.
>> Any other suggestions under windows ?
>>
>>
>> "Sherlock, Kevin" ha scritto nel
>> messaggio news:487377fb$1-at-forums-1-dub...
>>> For example:
>>>
>>> #!/bin/sh
>>> $SYBASE/$SYBASE_OCS/bin/isql -U.. -S.. -P.. << EOF
>>> dump database to ...
>>> go
>>> EOF
>>> cat $SYBASE/$SYBASE_ASE/install/ | mailx -s "Database
>>> Dump Complete" myemail-at-mycompany.com
>>>
>>>
>>>
>>>
>>> You could also use "xp_cmdshell" to accomplish this all within an isql
>>> prompt or stored procedure as well.
>>>
>>>
>>> "Sherlock, Kevin" wrote in message
>>> news:4873770d$1-at-forums-1-dub...
>>>> write a shell script that does the database dump, then sends the email.
>>>>
>>>> "Henry" wrote in message
>>>> news:48732b21-at-forums-1-dub...
>>>>> Hi, all
>>>>> how can I send automatically a email with the log, after full dump
>>>>> database ?
>>>>> TIA
>>>>> Henry
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



Reply With Quote
  #8  
Old 07-09-2008, 12:53 AM
Default Re: MAIL AFTER DUMP

On Jul 8, 1:53*pm, "Henry" wrote:
> Hi, all
> how can I send automatically a email with the log, after full dump database
> ?
> TIA
> Henry


If you are running dump from the Unix script, you can add a line in
the script to mail you the contents of the file

mailx -s "Test Subject" mymail-at-yahoo.com < logfile

Alternatively you can grep for "DUMP is complete (database
mydatabase)" string in backupserver error log file and mail it to you

-HTH
Manish Negandhi
[TeamSybase]
Reply With Quote
  #9  
Old 07-09-2008, 11:44 PM
Default Re: MAIL AFTER DUMP

On Jul 8, 7:44 am, "Henry" wrote:
> thank you for suggestion.
> I'm using Window 2003 not Unix / lynux.
> Any other suggestions under windows ?
>


Migrate to Unix/Linux

>;-)

Reply With Quote
  #10  
Old 07-28-2008, 10:10 AM
Default Re: MAIL AFTER DUMP

> On 2008-07-09 00:44:45 +1000, "Henry" said:
>
> I'm using Window 2003 not Unix / lynux.


For a "server" ?
--
Cheers
Derek
Senior Sybase DBA / Information Architect
Copyright © 2008 Software Gems Pty Ltd
Quality Standards = Zero Maintenance + Zero Surprises
Performance Standards = Predictability + Scaleability

Reply With Quote
Reply


Thread Tools
Display Modes



All times are GMT -4. The time now is 07:57 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Integrated by bbpixel2008 :: jvbPlugin R1013.368.1

Search Engine Friendly URLs by vBSEO 3.1.0
vB Ad Management by =RedTyger=
In an effort to better serve ads to our visitors, cookies are used on Mydatabasesupport.com. For more information, check out our Privacy Policy.