PowerDesigner 15 How to Export SQL Schema

PowerDesigner exports all SQL scripts

Operation: Database=>Generate Database

How PowerDesigner exports table building sql scripts

1 According to database type , Switch the database.

Database-> Change Current DBMS…

2 Generate sql script

Database -> Preview tab of Database Generation

Click the save button to save the generated sql script to the local.

[Note]:

1 The powerDesigner I use is version 15.2.

2 The generated sql script usually has a drop table statement, which can be omitted at runtime to prevent an error that the table does not exist.

powerdesigner export oracle sql remove the quotation marks

To build a data table today, use the Oracle 9i database, and use PowerDesinger 12 to build the model , The conceptual model was converted to the physical model. When I watched Preview, I was surprised to find that all drop, create, etc. operations were added with double quotation marks when the table name, field name, and foreign key name were added. This is really amazing.

Open Database -> Edit Current DBMS, an editing interface appears, in the right box, find the script sub-node, and then find the sql -> format node in turn,

There is one below The attribute of this name: CaseSensitivityUsingQuote, set the value of this attribute 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 file:
Enterprise Architecture.piclib
Objects and Concepts.piclib
PowerDesigner Icons.piclib
is a piclib file, each file contains several pictures, the pictures are quite beautiful
How can I extract them into separate ico/png/bmp files?

——Solution————————————– ——————
Use QQ pictures to intercept
——Solution————– ——————————————
google –> eXeScope650
——Solution————————————— —————–
IconsExtract v1.xx
——Solution————— —————————————–
There is currently no good way to do this. Because this piclib is not the icon file, but the index of the icon file, so the icon cannot be extracted from it.
——Solution————– ——————————————
I don’t know
– —–solution——————————————- ————-
Just use the software that extracts the icon, there are many on the Internet
——Solution———— ——————————————–
Extract EXE, There are many programs for pictures in DLL, and I have never seen pictures from any type of file. . . . .

How does powerdesigner generate sql files?
The first time you use powerdesigner
after you get the tables and fields, how should you make it generate sql files?
Is there any Who can write a detailed process.
小弟先谢谢了

——解决方案—————————– —————————
database->Generate database.., click OK in the dialog box
– —–solution——————————————- ————-
Create a new PhysicalDataModel, then create a database model, and then in the upper menu bar database->Generate database

How to export ER pictures from PowerDesigner
I have a data structure diagram, how can I save the exported pictures?

——解决方案———————————— ——————–
Copy to word document, and then save as picture!

Master PowerDesigner 15 come in and have a look! The plug-in cannot be used!
According to a tutorial, the Visio plug-in of PowerDesigner 15 will add an item to the Visio menu after installation. Why is there no response after I installed it?
Moreover, the plug-ins of PowerDesigner corresponding to VisualStudio and Eclipse cannot be used, and an error is reported! Heroes help!

——解决方案———————————— ——————–
Plug-in in VISIO, after opening any VISIO document, you will see a new menu option: PowerDesigner

怎么让powerdesigner 生成sql语句的时候 不带用户名?

看下面这个:红色这些都不想要啊,不然不通用啊

1

2

3

< p>4

5

6

7

8

9

10

11

12

13

14

15

16< /p>

17

18

19

create table< /code> darlingdd.table1 (

ID NUMBER NUMBER notull /code>,

name VARCHAR2(256) notnot code> null,

password VARCHAR2(256), code>

CREATETIME NUMBER not null,

UPDATETIME NUMBER NUMBER not null,

constraint PK_darlingdd_ID primary key (ID)

using < /code>index

pctfree 10

initrans 2

storage

(

initial 64K

minextents 1

>

maxextents unlimited

)

< code> tablespace USERS

logging

)

code>

------Solution---- -------------------------------------------------- --
Set OWNER in the properties of Table properties to NONE, and the user name will not be included when it is generated.

你这种像是从PL/SQL从ORACLE中弄来的,Powerdesigner默认建表的话好像是没有的。
------Solution--------------------------------------- -----------------
Or directly delete the USER information in PowerDesigner, there will be no problem when generating SQL.
------Solution--------------------------------------- -----------------
Set OWNER in the properties of Table properties to NONE

How to export sqlserver data. sql file
I use SQL Server2005 Express, how do I export the data in the sqlserver table to a .sql file, which means that I can insert data into the database by executing this .sql file in the future, thank you!

------解决方案------------------------------------ --------------------

SQL code

bcp dbname..tbname out c:\data.sql -T -c

bcp dbname..tbname in c:\data.sql -T -c

------Solution-------- ------------------------------------------------

SQL code

bcp dbname..tbname out c:\data.sql -T -c

bcp dbname..tbname in c:\data.sql -T -c

------Solution------------------------------ --------------------------

SQL code

--Generate SQL script from table data Of stored procedures

< /table>

  

exec UspOutputData your table name
------solution------------------- -------------------------------------

SQL code

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48< /p>

49

50

51

52

53

54

55

56

57

58

59

60

< p>61

62

63

64

65

66

67

68

69

70

71

72

73< /p>

74

75

76

77

78

79

80

81

82

83

84

85

< p>86

87

CREATE PROCEDURE dbo.UspOutputData

@tablename sysname

AS

declare @column varchar(1000)

declare @columndata varchar(1000)

declare @sql varchar(4000)

declare @xtype tinyint

declare @name sysname

declare @objectId int

declare @objectname sysname

declare @ident int< /code>

set nocount on

set @objectId=object_id(@tablename)

if @objectId is< /code> null -- Determine whether the object exists

begin

print 'The object not exists'

return

end

set @objectname=rtrim(object_name(@objectId))

if @objectname is null or charindex(@objectname,@tablename)=0 -- This judgment is not strict

begin

print 'object not in current database'

code>

return

end< /code>

if OBJECTPROPERTY(@objectId,'IsTable') <> 1 -- Determine whether the object is a table

begin

print 'The object is not table'

return

end

select @ident=status&0x80 from syscolumns where id =@objectid and status&0x80=0x80

if @ident < code>is not null

print 'SET IDENTITY_INSERT'< code>+@TableName+' ON'

declare syscolumns_cursor < code>cursor

for select c.name ,c.xtype from syscolumns c where c.id=@objectid < /code>order by c.colid

open syscolumns_cursor

set @column=''

set @columndata=''

fetch next from

code> syscolumns_cursor into @name,@xtype

while @@fetch_status <>-1

begin

if @ @fetch_status <>-2

begin

if @xtype not in(189,34,35,99,98) --timestamp does not need to be processed, image,text,ntext,sql_variant is not processed temporarily

begin

set @column< /code>=@column+case when len(@ column)=0 then'' else ','end+@name

set @columndata=@columndata+case when len(@columndata)=0 then '' else ','','','

end

+case when @xtype in(167,175) then ''< code>'''''''+'+@name< /code>+'+''''''''' --varchar,char

when @xtype in(231,239) then '''N''' '''+'+@name+'+''''''''' --nvarchar,nchar

when @xtype=61 then '''''''''+convert(char(23),'+ @name+',121)+''''''''' --datetime

when @xtype =58 then '''''''' '+convert(char(16),'+@name+',120)+ ''''''''' --smalldatetime

when @xtype=36 then ''''< /code>'''''+convert(char(36),'+@ name+')+''''''''' --uniqueidentifier

else @name end

end

end

fetch next from syscolumns_cursor into @name,@xtype

end

close syscolumns_cursor

deallocate syscolumns_cursor

set @sql=< /code>'set nocount on select''insert'+@tablename+'('+ @column+') values(''as''--' ','+@columndata+','')'' from ' +@tablename

print '--' +@sql

exec(@sql)

if @ident is not null

print 'SET IDENTITY_INSERT'+@TableName+' OFF'

GO

1

2

3

4

5

6

7

8

9

< p>10

11

12

13

14

15

16

/******* Export to excel */

EXEC master..xp_cmdshell 'bcp SettleDB.dbo.shanghu out c:\temp1.xls -c -q -S"GNETDATA/GNETDATA" -U"sa" -P""'< /code>

/*********** Import Excel */

SELECT *

FROM OpenDataSource( 'Microsoft.Jet.OLEDB.4.0'< /code>,

'Data Sou rce="c:\test.xls";User ID=Admin;Password=;Extended properties=Excel 5.0')...xactions

/*Dynamic file name

declare @fn varchar(20),@s varchar(1000)

< p>set @fn ='c:\test.xls'

set @s =``'Microsoft.Jet.OLEDB.4.0'',

''Data Source="'+@fn+'";User ID=Admin;Password=;Extended properties=Excel 5.0'''

< p>set @s ='SELECT * FROM OpenDataSource ('+@s+')...sheet1$'

exec(@s)

*/

------solution--- -------------------------------------------------- ---

SQL code

1

2

3

4

5

6

7

< p>8

9

10

11

12

13

14

15

/** Export text file*/

EXEC< /code> 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'

/**Export 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'< /p>

BULK INSERT Library name: Table name< /p>

FROM 'c:\test.txt'

WITH (

FIELDTERMINATOR = ';',

ROWTERMINATOR = '\n'

)

Use powerdesigner to export the structure diagram of the data table

http://www.5iphp.com/node/28

1. Generate the powerdesigner model according to the table structure:

< p>

The import work is divided into several steps, the work is very simple, the steps are as follows:
The first step: export the table structure of all tables of the library to be imported (don’t need table data, just table structure) A .sql file.
Step 2: Find File >> Reverse Engineer >> Database in powerdesinger, and then come up with one

Select "share the DBMS definition" and click OK. Note that the database should also correspond to your own database. My database is mysql5.0, so I also chose mysql5.0.

Select "Using script files", click the add button on the left, add the test.sql file, and then select OK. In this way, the mysql data table structure is completely imported into powerdesigner.

Two. Then, select all, Edit->export image

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 272 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.