PowerDesigner establishes a connection with SQL Server collaboration (壹)

There are many descriptions of PD on the Internet, so I won’t repeat them here. PD is very cool to use, but after you are familiar with the tool, if you are not familiar with it, I hope you will like this process of exploration, because every problem solved is progress. The following is about how to make PD work with MS SQL Server.

As for why PD should work with MS SQL Server, this should mention a work scenario. At first, in the company’s DB design process, first the Excel document was entered, then the PD was entered, and then the database was created manually. A disgusting thing, because the focus of the work should be on the DB design, but this will waste a lot of time in the process of file and database synchronization, and there may be spelling errors. Then we must first clarify our thinking, the first “Excel document” is necessary, because we use PD to do DB design, and the power of PD lies in this, which allows us to visually and quickly find the attributes of objects and The relationship between objects, so the existence of Excel documents is trivial, and it takes time to maintain (synchronize PD and Excel documents). Then the next problem lies in the implementation process of the logical database to the database. Manual conversion is definitely not advisable. It is inefficient and has a high risk of problems. What’s more, PD itself carries auxiliary functions. What we need to do is better Use this function to implement the database. From the information on the Internet, it can be seen that many people use PD to generate scripts, and then drag them to SQL Server to execute the scripts. I feel that this is still a bit of a compromise, because these operations can be done directly on the PD.

The next thing to be solved is to connect PD to MS SQL Server. The steps may seem to be a lot, but you will be familiar with the configuration two or three times. In fact, there is nothing, and this configuration only needs to be done once. You can connect directly next time, which is too convenient for the situation where the DB design is frequently changed at the initial stage of development. If only one data source is configured, then when operating on different databases, either change the configuration, or add “USE DB_Name” before the script, or configure a data source for each database. This depends on your own situation.

Next to the topic, PD needs to configure a data source to connect to SQL Server, and there are two ways to configure a data source: configure the data source through PD; configure the data source through the operating system;

Configure the data source through PD

  • Run PowerDesigner as an administrator (because configuring through PD is also calling some of the system permissions to operate, which is equivalent to the system’s agent);

  • Click “Database” and select “Configure Connections…”;

    < /li>

  • Click the “Add Data Source” button;

  • Select “System Data Source” and then ” Next”;

  • Select the type of database to be linked, here is “SQL Server”, then “Next”;

  • Select “Finish” to create the data Source;

  • Fill in the configuration information of the data source, and then “Next”;
    < /p>

  • Select “SQL Server authentication”, fill in the login ID and password, and then “Next”;

  • Check “Change the default data to”, then drop down to select the database you want to connect to (provided that the database you want to connect to has been created), and then “Next”;

  • Select “Finish”;

  • Click “Test Data Source”, if it says “Test Successful”, there is nothing wrong with the configuration, then click “OK”;
    < span class="img-wrap">

  • You can view the data source you just configured, select the data source, and then click the green triangle button in the toolbar to test the data source;

  • Go to “Database”-“Connection” again, you can select the data source you just configured in the data source list, and click “Connect” ;

Configure the data source through the system

  • Locate to “Control Panel” -“System and Security”-“Management Tools”, double-click to open “ODBC Data Source (64-bit)”;

  • Select the “User DSN” tab and click Add;

  • Following steps and PD configuration The process is basically the same, fill in the configuration information, and then “Next”;

  • Select the verification method, and then the next step (in fact, if the DBMS It is on this machine, these two methods can be connected);

  • You can view the newly created Then you can select the data source, click the green triangle button to test the data source (mentioned above, here is the screenshot below);

  • Fill in the DBMS management account and password, click “OK”, if it prompts “Connection test successful.” No problem;

  • In order to illustrate another method of manually specifying the database to be operated, it is not here anymore Check the “Change the default database to” option, but directly “Next”;

  • Click “Finish”;

  • Test data source;

  • Connect to the database;

  • Select the configured data source;

  • Fill in the DBMS management account and password, and click “Connect”;

  • If you want to view or configure connection information, you can use The following functions, from top to bottom, are: execute SQL text, configure connection, connect, disconnect, and connect information;

  • The following figure shows the connection information:

willem September 13, 2016 14:30:58 finishing

Leave a Comment

Your email address will not be published.