Creating Scripts Folder with Static Data

The topic describes how to creat Script Folder with Static Data.

Creating Scripts Folder with Static Data in dbForge Studio for MySQL

A scripts folder is a set of scripts that represents a database schema. The scripts folder can be used for:

  • Version-controlling databases.
  • Comparing database schemas.

To create a new scripts folder:

1. On the Database menu, go Tasks > Create Scripts Folder.

The Create Scripts Folder dialog box opens.

2. Select Database from Type drop-down menu. If you want to change the path, click three dots and select a necessary file:

3. To create Static Data, select Include data checkbox under the Path field. If you do not need to create Static Data, skip this step.

4. Click Create. If you have not changed the path, you will be asked to confirm the creation of a new folder.

5. After you have clicked Yes, you will see the folllowing notification:

In case you choose a folder that already has existing files, you will be prompted with the following notification:

If you select No, the script folder will not be created. However, if you click Yes, all the existing contents of the selected folder will be overwritten by the new files and folders.

Creating Scripts Folder using the Command Line

1. Click Start, type ‘cmd’ in the Search programs and files text box, and press ENTER. The Command Prompt opens.

2. Specify the operation you want to perform and the required parameters and arguments (actions you want to run) in the Command Prompt, for example as follows:

dbforgemysql.com /scriptsfolder [/switch1[:value | [parameter1:value parameter2:value ..]] /switch2 ..]

3. Press ENTER to run the process.

4. Select corresponding command line switches to perform the required operations.

Creating Static Data using the Command Line

1. Open Command Prompt by pressing Win+R, and typing ‘cmd’ in the Open line.

2. Run the command below, but customize the variables:

"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /scriptsfolder /connection:"User Id=yourusername;Password=yourpassword;Host=hostname;port=port;Database=databasename;Character Set=utf8" /database:yourdatabase /path:"C:\Test\my_database" /includedata:Yes

3. Press ENTER to run the process.

Tip: To see a quick help on the switches available for the /scriptsfolder operation, type the following:

"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /scriptsfolder /?

Arguments Used in Command Line

Select a corresponding command line switch to perform a required operation:

Argument Action and Usage
/connection Use the switch to specify a full connection string with additional parameters. This argument is required.
Command usage looks like: /connection:<connection_string>
/database Use this switch to specify a database you want to create a script folder from.
/exitcodes Use this switch to get the list of possible exit codes.
/includedata Use this switch to specify whether you want to include data, which is in tables of a database.
Command usage looks like: /includedata:[value].
If you want to include, enter one of the following options: Yes, Y, On, True, T.
If you do not want to include, enter one of the following options: No, N, Off, False, F.
/password Use the switch to specify a server password. Define this argument to override the password specified in the connection string.
Command usage looks like: /password:<pw>.
/path Use this switch to specify a destination path for a script folder.
Command usage looks like: /path:<folder_path>.
/clearfolder Defines if the existing folder should be cleared before saving data.
Command usage looks like: /clearfolder:[value].
To turn on the option, specify: Yes, Y, On, True, T.
To turn off the option, specify: No, N, Off, False, F.
In case the option is turned off and the selected folder is not empty, you will see Exit Code = 113.

Command line used to create Static Data looks like:

"C:\Program Files\Devart\dbForge Studio for MySQL\dbforgemysql.com" /scriptsfolder /connection:"User Id=yourusername;Password=yourpassword;Host=Webdev;Character Set=utf8" /path:"C:\Users\Documents\Devart\dbForge Studio for MySQL\mysql" /includedata:Yes

Download dbForge Studio for MySQL Server and try it absolutely free for 30 days!

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?