copy procedure

BubikolRamios's profile image BubikolRamios posted 12 years ago in General Permalink
Have a proc in one db and want to make same in another.
In first I can copy create code, and now ?
Can't find a way to paste that somewhere and execute in another db.
ansgar's profile image ansgar posted 12 years ago Permalink
Just use the "Export database" dialog: Set output to "Database" and select target database below.
BubikolRamios's profile image BubikolRamios posted 12 years ago Permalink
Thanks. Was playing with that but was not going anywhere until you extra told me (-:
[expired user #6671]'s profile image [expired user #6671] posted 11 years ago Permalink
This option works perfect!

But i cannot understand Why copying the code doesn't work!
[expired user #6671]'s profile image [expired user #6671] posted 11 years ago Permalink
anse:
After a few test, could you add this in the procedure code:
DELIMITER //
CREATE DEFINER .......
.....
END //
DELIMITER ;


With this extra code at the beginning and at the end, everything works fine!
ansgar's profile image ansgar posted 11 years ago Permalink
The DELIMITER is not part of the code physically required for creating the procedure, so it should not be contained in the "CREATE CODE" tab. For this purpose, HeidiSQL has a button (the one on the main toolbar with the red semikolon on it). If that was part of the CREATE CODE, that would also *implicitely* kill any delimiter you have set before via that button. That's not a good idea.
[expired user #6671]'s profile image [expired user #6671] posted 11 years ago Permalink
I tried what you told me in the previous meessage. Now, i understand!

I think you're right related to the CREATE CODE, but, i wonder Why don't you add this "extra" feature as an option, becasue i think it doesn't cost su much adding this as an option!


ansgar's profile image ansgar posted 11 years ago Permalink
The "make it optional please" argument is such overstressed already, it's used for just every feature request which does not make sense in many users eyes.

But apart from that, as said above: If the delimiter was part of the CREATE CODE, that would also *implicitely* kill any delimiter you have set before via that button.

Please login to leave a reply, or register at first.