cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Exporting/Importing Events (backup events) in SybaseCentral

huber1
Participant
4,408

Hi I would like to export the events in SybaseCentral, so I can import them into another database via SybaseCentral. I didn't find any way to export und import the events separately from/to SybaseCentral. Regards, Robert

View Entire Topic
thomas_duemesnil
Participant

You can copy the event with CTRL+C in Sybase Central. When you paste it in your Texteditor of choice you can see the SQL Commands to rebuild the Event in a different Database.

HTH

huber1
Participant
0 Kudos

Thanks, that's a way to go. Are you able to select multiple events to copy? I am on Mac OS X Server, and I can only select 1 event to copy.

thomas_duemesnil
Participant
0 Kudos

I never felt the need to do. I have all my SQL procedures, triggers, ... as text files. Sometimes when i need to define something I use rarely is build it with the help of Sybase Central. Then I copy it to my Texteditor.

VolkerBarth
Contributor
0 Kudos

Me, too... and besides that, one can usually use queries against the system tables to output the definition of the desired database objects.

Interestingly enough, for events it's not that simple (at least more difficult than for views, procedures or triggers):

It seems that the system table SYSEVENT does not store the original CREATE EVENT statement (even not in column "source") but splits the definition of the schedule, location and the handler code into different columns. E.g. the following will just select event's name and the handler's definition - but it might be a starting point:

select "name", "source" from SYSEVENT
where "name" like '%YourFavoriteSearchString%'
order by 1;
output to 'MyTextFile.txt';
huber1
Participant
0 Kudos

Thanks to Thomas and Volker for the explanations and details, very helpful

Coming back to the original question, I need to save and reimport the (backup) events, because we prepare the database in the office and deploy it afterwards. This is for several reasons very practical, for testing, calculating all calculations (takes many hours for our school administration software, and not last, for making the deployment in a short time).

Best regards, Robert

Ask a Question