Quantcast
Channel: Planet MySQL
Viewing all articles
Browse latest Browse all 18766

Adapting Diagram File to Another Database

$
0
0

Some of our users have faced the situation when they need to change the connection details of the existing Database Diagram file.

Let’s assume the situation when you have several databases with identical schemas which are only located on different MySQL servers and you have created a database model that was saved in a Database Diagram file. Now, you want to avoid redesigning the database model from scratch and only reassign the existing database model to another MySQL server.

Here are some steps you can follow to achieve this:

1. Create a database diagram.

2. Arrange objects on the diagram so you can easily read them (create containers, notes, etc).

3. Save the diagram and close dbForge Studio for MySQL.

4. Open the Database Diagram file using a third-party text editor, for instance, notepad.

Open Database Diagram as XML

Open Database Diagram as XML

5. Find the <Connection></Connection> tag that may look as follows:

...
<Connection>
    <Name>MyConnectionToDB</Name>
    <ConnectionString>User Id=root;Host=db;Port=3310;Database=sakila;Ping Interval=120;Character Set=utf8;</ConnectionString>
</Connection>
...

and make the following changes:

...
<Connection>
    <Name>new_connection_name</Name>
    <ConnectionString>User Id=new_user_id;Host=new_host;Port=new_port;Database=new_db_name;Ping Interval=120;Character Set=utf8;</ConnectionString>
</Connection>
...

i.e. modify the <Name></Name> tag (change it to something different) and the <ConnectionString></ConnectionString> tag (connection details for another server).

6. Find all the <DbOid></DbOid> tags that may look as follows:

...
<DbOid>
    <Path>sakila.actor</Path>
    <TypeName>Table</TypeName>
</DbOid>
...

and change the database name to the new one:

...
<DbOid>
    <Path>new_db_name.actor</Path>
    <TypeName>Table</TypeName>
</DbOid>
...

7. Save the modified file with the new name.

Now, you have a new Database Diagram file adjusted to another server.

 

NOTE: The article applies to dbForge Studio for MySQL, dbForge Studio for SQL Server, and dbForge Studio for Oracle.


PlanetMySQL Voting: Vote UP / Vote DOWN

Viewing all articles
Browse latest Browse all 18766

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>