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

asked 15 Dec '11, 12:51

robert's gravatar image

robert
578293748
accept rate: 0%

edited 15 Dec '11, 12:52


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

permanent link

answered 15 Dec '11, 14:56

Thomas%20Duemesnil's gravatar image

Thomas Dueme...
2.6k243561
accept rate: 17%

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.

(16 Dec '11, 11:19) robert
Replies hidden

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.

(17 Dec '11, 12:13) Thomas Dueme...

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';
(17 Dec '11, 15:44) Volker Barth

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

(18 Dec '11, 09:36) robert

@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.

permanent link

answered 16 Dec '11, 11:50

Siger%20Matt's gravatar image

Siger Matt
3.2k496697
accept rate: 13%

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.

(18 Dec '11, 09:41) 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.

permanent link

answered 17 Dec '11, 05:29

Dmitri's gravatar image

Dmitri
1.5k41132
accept rate: 11%

Same behavior on OS X, thanks

(18 Dec '11, 09:42) robert
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×72
×35

question asked: 15 Dec '11, 12:51

question was seen: 1,797 times

last updated: 18 Dec '11, 09:42