|
Home > Archive > SQL Anywhere database > May 2005 > Database event question
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Database event question
|
|
| Robert 2005-05-20, 11:23 am |
| Our clients currently use events to schedule daily database backups, which
work great. But, I have been getting request on using a database event for
scheduling database validation to occur prior to the backup event being
triggered. I can do a call to sa_validate and specify a full validation,
but I get an error when the event attempts to create a result set. Is it
possible to use an event to validate an entire database and direct the
result set to a text file so I can capture any errors that might occur?
Thanks,
Robert
| |
| Mark Culp 2005-05-20, 1:23 pm |
| There are a few ways of doing this, one is to do something like
xp_writefile( 'some_file_name.txt',
( select list( messages, '\n' ) from sa_validate() ) );
--
Mark Culp
SQLAnywhere Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
Robert wrote:
>
> Our clients currently use events to schedule daily database backups, which
> work great. But, I have been getting request on using a database event for
> scheduling database validation to occur prior to the backup event being
> triggered. I can do a call to sa_validate and specify a full validation,
> but I get an error when the event attempts to create a result set. Is it
> possible to use an event to validate an entire database and direct the
> result set to a text file so I can capture any errors that might occur?
>
> Thanks,
>
> Robert
>
>
|
|
|
|
|