Reverse-engineering a database is to convert an existing database into a model that can be represented either by an ERD diagram or a schema containing database objects (tables, views, stored procedures, etc.) and/or data. With dbForge Schema Compare, you can reverse-engineer a database using the following methods:
The Generate Scripts Wizard allows you to create a single SQL file containing objects and data.
Pros
Cons
1. In the Database menu, select Tasks > Generate Scripts.
2. In the Generate Scripts Wizard that opens, on the General tab, do the following:
Click Next.
3. On the Script content tab, select a database structure, data, and/or database objects for scripting, and click Next.
4. Optional: On the Options tab, select options that define how the script generation should be processed, and click Next.
5. Optional: On the Errors handling tab, set up processing behavior of errors and logging options, and click Generate.
After the script generation is completed, you can open the output file in the editor by selecting the Open script option. Then, click Finish to close the wizard.
The Create Scripts Folder or Snapshot Wizard allows you to import database objects and data to separate SQL files.
A scripts folder is a set of scripts representing a database schema and data.
Peculiarities
Pros
Cons
1. In the Database menu, select Tasks > Create Scripts Folder or Snapshot.
2. In the Create Scripts Folder or Snapshot wizard that opens, select the Database source type, specify a server connection, and select a database. If you want to decipher database encrypted objects, select the Decrypt encrypted objects option.
3. Select Scripts Folder as the destination type. Set a path to the empty folder that will contain SQL scripts for objects and data. To customize a structure for the script folder, click Scripts Folder Structure, select the types of objects you want to script, and then click OK. Optionally, select the check box to Include data.
4. Click Create.
A snapshot is an .xml file containing information about the database structure without table data.
Pros
Cons
1. On the Database menu, select Tasks > Create Scripts Folder or Snapshot.
2. In the Create Scripts Folder or Snapshot wizard that opens, select the Database source type, specify a server connection, and select a database. If you want to decipher database encrypted objects, select the Decrypt encrypted objects option.
3. Select Snapshot as the destination type. Specify a name for the output file. Optionally, select the Compress check box to compress the output file.
4. Click Create.
The Schema Synchronization Wizard allows you to import database objects, data, or objects by names either to the single or separate .sql files.
Pros
Cons
1. On the standard toolbar, click New Schema Comparison.
2. In the New Schema Comparison wizard, select a source database and a connection, and an empty target scripts folder and a connection. Then, click Next.
3. Optional: On the Options tab, select schema comparison options and click Compare.
4. In a SQL document that opens, view the schema comparison results and click Synchronize objects to the target database.
5. In the Schema Synchronization Wizard that opens, on the Output tab, select either of the following:
6. To launch the synchronization, click Synchronize.