Generate script of full database

Discussion of open issues, suggestions and bugs regarding database management and administration tools for MySQL
Post Reply
terrydiederich
Posts: 11
Joined: Fri 27 Jan 2017 21:53

Generate script of full database

Post by terrydiederich » Fri 16 Jun 2017 18:07

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

alexa

Re: Generate script of full database

Post by alexa » Mon 19 Jun 2017 12:03

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.

terrydiederich
Posts: 11
Joined: Fri 27 Jan 2017 21:53

Re: Generate script of full database

Post by terrydiederich » Mon 19 Jun 2017 14:30

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 ;?

alexa

Re: Generate script of full database

Post by alexa » Wed 21 Jun 2017 11:30

You could use the 'Find and Replace' feature for this (select 'Edit -> Find and Replace' from the main menu).

Post Reply