Page 1 of 1
Generate script of full database
Posted: Fri 16 Jun 2017 18:07
by terrydiederich
Is there a way with dbForge Studio for MySQL to generate a complete SQL script for a database? By complete I mean tables, stored procedures, functions, etc. Currently I'm creating an empty database and doing a Schema Comparison against the empty database and the differences script generated contains everything. It seems like there should be an easier way.
Also, is there a way to not include the Delimiter and $$ lines in the script? I'm taking the script and then running it through some .Net code in my application at run time and the Delimiter and $$ lines cause problems. I manually delete them from the script and everything is fine.
Thanks
Terry
Re: Generate script of full database
Posted: Mon 19 Jun 2017 12:03
by alexa
Is there a way with dbForge Studio for MySQL to generate a complete SQL script for a database? By complete I mean tables, stored procedures, functions, etc. Currently I'm creating an empty database and doing a Schema Comparison against the empty database and the differences script generated contains everything. It seems like there should be an easier way.
This can be performed with the Database Backup feature.
You can invoke it by right-clicking a database in Database Explorer and selecting 'Backup and Restore -> Backup Database...' from the popup menu. On the 'Backup content' page, you can select the objects to backup along with table data. Please refer to the following topic for details
https://www.devart.com/dbforge/mysql/st ... tabase.htm
Also, is there a way to not include the Delimiter and $$ lines in the script? I'm taking the script and then running it through some .Net code in my application at run time and the Delimiter and $$ lines cause problems. I manually delete them from the script and everything is fine.
There is no such a possibility. This is done to separate statements.
Re: Generate script of full database
Posted: Mon 19 Jun 2017 14:30
by terrydiederich
Also, is there a way to not include the Delimiter and $$ lines in the script? I'm taking the script and then running it through some .Net code in my application at run time and the Delimiter and $$ lines cause problems. I manually delete them from the script and everything is fine.
There is no such a possibility. This is done to separate statements.
If I can't remove them, is there any way to change the $$ to ;?
Re: Generate script of full database
Posted: Wed 21 Jun 2017 11:30
by alexa
You could use the 'Find and Replace' feature for this (select 'Edit -> Find and Replace' from the main menu).