cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting/Importing Events (backup events) in SybaseCentral

huber1
Participant
4,356

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

Accepted Solutions (0)

Answers (3)

Answers (3)

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

Note: in the left pane (treeview), only a single selection is possible. However, in the right pane (listview), multiple selection does work as Siger Matt described. SC 5.0.0.3311 under WinXP/32.

huber1
Participant
0 Kudos

Same behavior on OS X, thanks

@Robert, Yes you can select multiple events by using ctrl when clicking to multi-select individuals or shift to select a range. I often lose my selections trying to ctrl-C or right click so when I am doing this I make all of my selections highlighted and then use the safe but slow Edit>Copy from the menu.

You can also do this for data within tables. Make your selections highlighted in Sybase Central and in the file or right-click menu there is a Generate function to make Insert, Update, or Delete statements for your selection. Very handy.

huber1
Participant
0 Kudos

Your tip works as you describe, thanks. It's not so obvious that on one window you can multiple select, on others it's not possible. But may be in a future release it's possible in any window.