PowerDesigner 15 How to export SQL schema

Source: Internet
Author: User
Tags bulk insert powerdesigner

PowerDesigner Exporting all SQL scripts

Action: Database=>generate Database

PowerDesigner How to export a SQL script to build a table

1 Switch the database according to the database type.

Database-> Change-current DBMS ...

2 Generating SQL scripts

Preview tab of database Generation

Click the Save button to save the generated SQL script locally.


1 I use the PowerDesigner is version 15.2.

2 The resulting SQL script will typically have a drop TABLE statement, which can be run without the need to report an error that the table does not exist.

PowerDesigner exporting Oracle SQL stripped quotes

Today, the data table, using the Oracle 9i database, with the Powerdesinger 12 model, the conceptual model into a physical model, I look at preview, it is strange to find all the drop, create and other operations to the table name, field name, foreign key name, all add double quotation marks, This is really amazing.

Open the database, edit current DBMS, an editing interface appears, in the box to the right, locate the script node, and then locate the SQL---format node,

Here is a property of the name: Casesensitivityusingquote, set the value of this property to "no", and then look at the generated script, all the double quotes are removed.

How to extract the beautiful pictures in PowerDesigner 15?
Path: C:\Sybase\PowerDesigner 15\icons
Picture library Files:
Enterprise Architecture.piclib
Objects and Concepts.piclib
PowerDesigner Icons.piclib
As piclib files, each file contains several pictures, the picture is quite beautiful
How can I extract them into separate ico/png/bmp and so on?

Use QQ pictures to intercept
Iconsextract v1.xx
There is no good way to do this at present. Because this piclib does not store the icon file, but the index of the icon file, it is not possible to extract the icon from it to
Don't know
Use the Extract icon software on the line, many online
Extract exe, dll pictures of a lot of programs, from any type of file to extract the picture seems to have not seen ....

PowerDesigner how to generate SQL files
First time with PowerDesigner
After the table and the field is done, how should it generate SQL file?
Is there anyone who can write a detailed process.
Thank you, brother.

Database->generate database:, click OK in the dialog box
Create a new Physicaldatamodel, and then build the database model, and then database->generate in the menu bar above

PowerDesigner How to export er pictures
I have a data structure diagram, how can I save the exported picture.

Copy to a Word document, and then save as a picture!

PowerDesigner 15 master come and see! Plugin not available!
According to a tutorial, the Visio plug-in for PowerDesigner 15 adds an item to the Visio menu after it's installed, why didn't I respond when I loaded it?
and PowerDesigner corresponding to VisualStudio and Eclipse plug-ins also can not be used, error! Hero, Help!

Plugins in Visio, when you open any of the Visio documents, you see a new menu option: PowerDesigner

How do I get powerdesigner to generate SQL statements without a user name?

Look at this: red these do not want ah, or not universal AH

CREATE TABLE Darlingdd.table1  (   ID number not                          null,   name           VARCHAR2 () is not                   null,   Password          VARCHAR2, createtime number not                          null, updatetime number is   not                          null,   constraint pk_darlingdd_id primary KEY (ID)         using index       pctfree       Initrans 2       storage       (           initial 64K           minextents 1           maxextents unlimited       )       tablespace USERS        logging)

The property of the table properties is set to None and no user name is generated.

You seem to be getting it from PL/SQL from Oracle, and PowerDesigner defaults to building the table.
or delete the user information in PowerDesigner directly, there is no problem when generating SQL.
Set the property of table properties to none in Owner

How to export SQL Server data. sql file
I'm using SQL Server2005 Express, how to export data from a SQL Server table, which means I'll just execute this. sql file to insert data into the database, thank you!


SQL Code
BCP dbname. Tbname out C:\data.sql-T-cbcp dbname. Tbname in C:\data.sql-T-C
SQL Code
BCP dbname. Tbname out C:\data.sql-T-cbcp dbname. Tbname in C:\data.sql-T-C
SQL Code
--A stored procedure that generates SQL scripts for table data
CREATE PROCEDURE dbo. uspoutputdata @tablename sysname as declare @column varchar (DECLARE @columndata varchar) DECLARE @sql varchar (4  DECLARE @xtype tinyint declare @name sysname declare @objectId int declare @objectname sysname declare @ident int set Nocount ON set @objectId =object_id (@tablename) If @objectId is null--Determines whether an object exists begin print ' The object Not exists ' retur N End Set @objectname =rtrim (object_name (@objectId)) if @objectname is null or CHARINDEX (@objectname, @tablename) =0-- This judgment is not closely preceded by the print ' object ' in the current database ' return End If OBJECTPROPERTY (@objectId, ' istable ') < > 1--The judging object is No is table begin print ' The object was not table ' return End Select @ident =status&0x80 from syscolumns where [email p Rotected] and status&0x80=0x80 if @ident is isn't null print ' SET identity_insert ' [email protected]+ ' on ' Declare Syscolumns_cursor cursor FOR select C.name,c.xtype from syscolumns c where [email protected] ORDER by c.colid Open Sy Scolumns_Cursor Set @column = ' Set @columndata = ' fetch NEXT from Syscolumns_cursor to @name, @xtype while @ @fetch_status < ; -1 BEGIN IF @ @fetch_status < >-2 begin if @xtype not in (189,34,35,99,98)--timestamp no processing required, Image,text,ntext,sql_vari Ant temporarily does not process begin set @[email protected]+case when Len (@column) =0 then ' Else ', ' [email protected] set @[email&nb Sp;protected]+case when Len (@columndata) =0 then ' Else ', ' ', ' ', ' end +case if @xtype in (167,175) Then ' "" + [email  protected]+ ' + ' "--varchar,char when @xtype" and "N" "" "+" [email protected]+ ' + ' "" ""] "--nvarchar,nchar when @xtype =61 and then" "" +convert (char), ' [email protected]+ ', 121 ' + ' "'"-- datetime when @xtype =58 then "" "+convert (char), ' [email protected]+ ', ' + ') + '" '--smalldatetime When @xtype =36 and then "" "+convert (char), ' [email protected]+ ') + '" ' "'--uniqueidentifier else @name end End end fetch NEXT from Syscolumns_cursor to @name, @xtYpe End Close Syscolumns_cursor deallocate syscolumns_cursor Set @sql = ' Set NOCOUNT on select ' ' Insert ' [email protect ed]+ ' (' [email protected]+ ') VALUES (' as '--', ' [email protected]+ ', ') ' from ' [email protected] print '--' [email protected] EXEC (@sql) If @ident is not null print ' SET identity_insert ' [email protected]+ ' OFF  ' GO


SQL Code
/******* Export to Excel */exec master: xp_cmdshell ' bcp SettleDB.dbo.shanghu out c:\temp1.xls-c-q-s "Gnetdata/gnetdata"-u "sa"-P "" '/*********** import Excel */sel ECT * from OpenDataSource (' microsoft.jet.oledb.4.0 ', ' Data source= ' C:\Test.xls "; User id=admin; password=;  Extended properties=excel 5.0 ') ... xactions/* dynamic filename declare @fn varchar, @s varchar (+) Set @fn = ' C:\Test.xls ' Set @s = ' microsoft.jet.oledb.4.0 ', ' Data source= ' ' [email protected]+ '; User id=admin; password=; Extended properties=excel 5.0 "Set @s = ' SELECT * from OpenDataSource (' [email protected]+ ') ... sheet1$ ' EXEC (@s) */
SQL Code
/** export Text file */exec master: xp_cmdshell ' bcp dbname. TableName out c:\DT.txt-c-sservername-usa-ppassword ' or EXEC master. xp_cmdshell ' bcp ' select * from dbname. TableName "Queryout c:\DT.txt-c-sservername-usa-ppassword '/** exported to txt text, separated by commas */exec master. xp_cmdshell ' bcp ' Library name: Table name "Out" D:\tt.txt "-c-t,-u sa-p password ' BULK INSERT library name: Table name from ' C:\test.txt ' with (fieldterminator = '; ', rowterminator = ' \ n ')

To export a chart of a data table using PowerDesigner


First, the PowerDesigner model is generated according to the table structure:

The import work is divided into several steps, and the work is simple, as follows:
The first step: the table structure of all tables of the library that will be imported (do not table data, as long as the table structure) is exported as a. sql file.
Step two: Find File >> Reverse Engineer >> Database in Powerdesinger and then come out with a

Select "Share the DBMS definition" and click OK. Note that the database should also choose their own database corresponding to, my database is mysql5.0, all I also chose the mysql5.0.

Select "Using scriptFiles", point to the left of the Add button, speak Test.sql file Add, and then choose OK. In this way, the MySQL data table structure is fully imported into the PowerDesigner.

Second, then, select All, Edit->export image

PowerDesigner 15 How to export SQL schema

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.