Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2004
    Posts
    3

    Unanswered: BCP from within Sybase??

    All:

    I need a way to bcp out data from a Sybase auditing table when they reach a certain threshold. I was going to use sp_thresholdaction to trigger the BCP routine, but I can't find anything on triggering BCP from within Sybase.

    My goal is to get the auditing data output to a flat file without user intervention. Does anyone have any good ideas on how to proceed?

    Thanks,

    Warren

  2. #2
    Join Date
    Feb 2004
    Posts
    28
    Well, there is no easy way to achieve this. Instead, you can start a database backup of the entire syssecurity database using "dump database" cmd in sp_threholdaction proc.
    Must you need to to BCP out the audit table, then you will have to write some sort shell script, which will run from cron (assuming you are on a unix platform). It may not be a straightforward approach, but might work for you.

    Another way is, try calling xp_cmdshell proc from sp_thresholdaction. With xp_xmdshell proc, you can execute OS commands. Try it and let us know.


    Quote Originally Posted by wwhitby
    All:

    I need a way to bcp out data from a Sybase auditing table when they reach a certain threshold. I was going to use sp_thresholdaction to trigger the BCP routine, but I can't find anything on triggering BCP from within Sybase.

    My goal is to get the auditing data output to a flat file without user intervention. Does anyone have any good ideas on how to proceed?

    Thanks,

    Warren

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •