33
Add Month 2000 Progress Administration Dec,12, 2011 SoftSpeed Consultant Ltd.

Progress Administration

  • Upload
    elyse

  • View
    79

  • Download
    0

Embed Size (px)

DESCRIPTION

Progress Administration. Dec,12, 2011 SoftSpeed Consultant Ltd. Agenda 日程安排. 1. Progress Background (Progress 环境) Environment variables ( 环境变量) Database Structure ( 数据库结构) 2. Database Management ( 数据库管理) Backup ( 备份) - PowerPoint PPT Presentation

Citation preview

Page 1: Progress Administration

Add Month 2000

Progress Administration

Progress Administration

Dec,12, 2011SoftSpeed Consultant Ltd.

Dec,12, 2011SoftSpeed Consultant Ltd.

Page 2: Progress Administration

www.softspeed.com.hk

Agenda日程安排 1. Progress Background (Progress 环境 )

Environment variables ( 环境变量 ) Database Structure ( 数据库结构 )

2. Database Management ( 数据库管理 ) Backup ( 备份 ) Delete/Archive Load/Dump ( 删除 / 归档 装载 / 下载 )

3. Administration Tools Utility Tools ( 实用管理工具 )

4. General Administration Compile ( 编译 ) MFG/PRO Script Create ( 生成连接脚本 )

5. Progress common statement (Progress 语法 )

Page 3: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

System Administration Tasks(System Administration Tasks( 系统管理的任务系统管理的任务 ))

Task Task 任务 任务 Frequency Frequency 实施频率实施频率--------------------------------------------- ---------------------------------------------------------------------------------------- -------------------------------------------• System Backup System Backup 系统备份 系统备份 Daily Daily 每天每天• Client setup Client setup 客户端设定 客户端设定 Setup for New User Setup for New User • Performance Monitoring Performance Monitoring 性能监视性能监视 Weekly or as neededWeekly or as needed• Delete/Archive Delete/Archive 数据删除数据删除 // 归档 归档 After financial closeAfter financial close• Dump/Load Dump/Load 下载下载 // 装载 装载 After delete/ArchiveAfter delete/Archive• Compile source file Compile source file 编译 编译 As need As need • Setup Server Setup Server 设定服务器 设定服务器 As needAs need

Page 4: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

Progress Environment Variables Progress Environment Variables 系统变量系统变量

1. TERM - Specifies the type of terminal used 2. DLC - Specifies the directory where PROGRESS is installed 3. PATH - A list of directories to search for programs and commands needed to execute 4. PROPATH - Specifies a list of directory paths in order lists when running an external procedure 5. PROMSGS - Specifies the pathname of the PROGRESS error messages file 6. PROTERMCAP - Specifies the pathname of the terminal definition file.

Page 5: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

Main directory Main directory 主目录 主目录 /DLC – Empty DB, “Sports” DB,Default Startup Parameter File, “PROMSGS” File, PROGRESS configure file Progress.cfg ----- > Progress Version Sub-Directory Sub-Directory 子目录子目录 /DLC/bin – Mainly executable file _mprosrv.exe ----- > Startup Database Command /DLC/prolang – Contain installed languages empty DB and startup file

Progress Database Architecture Progress Database Architecture 数据库结构数据库结构 1. Database (.db) file 1. Database (.db) file 数据库数据库 Including Table , Field , Index Including Table , Field , Index 包含表包含表 ,, 字段字段 ,, 索引索引 2. Before-image (.bi) file 2. Before-image (.bi) file 映像文件映像文件 Roll-backward when transaction failure Roll-backward when transaction failure 数据回滚数据回滚 Like buffer to store temp records. Like buffer to store temp records. 缓冲作用缓冲作用

Page 6: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

3. Log file (.lg) file ( 日记文件 )

Containing a Database event history. Startup , shutdown….

4. Lock file (.lk) file ( 锁定文件 )

System AUTO-create when connect to database

You must delete lk file when database shutdown abnormally.

The Parameter File : .Pf The Parameter File : .Pf 参数文件参数文件 Connect Database / Startup Parameter. 连接数据库

E.g. : E:\DLC\bin\PROWIN32.EXE –pf (Startup MFG/PRO) E:\QADCLI\L90CH\Training.pf –ininame (Connect DB) E:\QADCLI\L90CH\PROGRESS.SVG (Configure Environment)

Page 7: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

Related Progress File Related Progress File 相关文件相关文件 1. Database Definition (.df) file 数据库结构文件 An ASCII text file . 文本文件 Dump/load form Progress Administration 来自于 下载 / 装载 2. Data file (.d) file 数据文件 ASCII text file containing database records to be dumped and load 3. The Object code (.r) file. 目标文件 4. Source code (.p) file, You can run directly 源文件 Encrypted code : Can Compile , Not for customization 加密源文件 No-Encrypted : Can Compile, Can Customization 不加密源文件

Page 8: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background Empty Database Empty Database 空数据库空数据库 1. You Can load .d Data file to empty database. 装载数据文件 2. Including following empty database Mfg/Pro 空数据库 mfgempty Source database for mfg , test, and Production hlpempty Source database for mfghelp. admempty Source database for adm

Main MFG/PRO DatabaseMain MFG/PRO Database 1. Production, Test, YourProductionDB 2. Copy from mfgempty and Load relative .d file

Page 9: Progress Administration

www.softspeed.com.hk

1. Progress background 1. Progress background

Database sequence (Database sequence ( 数据内部序号数据内部序号 )) 1. System Auto-create , sequence identified a transaction 系统自动生成 2. Sample: In Tr_hist , without same sequence for two transactions. 不会出现重复的事务号码 Multiple and Custom Database (Multiple and Custom Database ( 客户化数据库客户化数据库 )) 1. Support 5 databases connect in the same time . ( 支持 5 个数据库 ) 2. You must startup the side-Database in client/server script. ( 在启动数据库脚本中启动客户化数据库 )

Page 10: Progress Administration

www.softspeed.com.hk

2. Database Management 2. Database Management 数据库管理 数据库管理 Large Scale Data Movements Large Scale Data Movements 数据转移数据转移

1. Backup 1. Backup 备份备份 i) Regularly (Daily midnight ) 每天午夜进行有规律备份 ii) Highly commend full backup Procopy FromDB ToDB 完整备份 iii) Backup correspond .bi 备份相应的 .bi 文件 iv) Truncate the bi file 整理 bi 文件 Syntax: PID\bin\_proutil.exe DB –C truncate bi v) Shutdown Database 关闭数据库 vi) You Can Run Backup Using NT Schedule Task 定时备份数据库

Control Panel --- > Schedule Tasks --- > Add a Job Control Panel --- > Administration Tool -- > Services --- > Startup Services “ Tacks Schedule”.

Page 11: Progress Administration

www.softspeed.com.hk

2. Database Management 2. Database Management

Large Scale Data MovementsLarge Scale Data Movements 2. Delete/Archive 2. Delete/Archive 删除删除 // 存档存档 When data is no longer needed 不需要的数据 Frees space by removing records 释放 , 将产生数据库碎片 In MFG/PRO 5.23 Close PO Delete/Archive 5.13.23 Receive Delete/Archive

3. Dump/Load 3. Dump/Load 下载 下载 / / 装载装载 IT will integrate the Database and Re-Index Index . 重组数据库 , 索引 Dump / Load Table structure And Save to .df File 结构存于 .df 文件 Dump / Load Table Data And Save to .d File 数据存于 .d 文件 << See MFG/PRO Data Administrator >> Data Administration -- > Admi --- > Dump/Load Data

Page 12: Progress Administration

www.softspeed.com.hk

2. Database Management2. Database Management Startup Parameters Startup Parameters 数据库启动参数数据库启动参数

1. Parameter List 1. Parameter List 参数清单参数清单

Option

Effect Apply Notes

-B Database buffer 缓冲 Server start 2000 = 8 M

-L Lock Table 锁记录 (_mprosrv) How many record

To be locked.

-N #of Users Server start

-H Host name 主机名 NT\system32\

Drivers\etc\

Setup in file hosts

-S Services name

服务名NT\system32\

Drivers\etc\

Setup in file services

-By Bypass

停止所有访问Server shut

(_mprshut)

Setup in file services

Page 13: Progress Administration

www.softspeed.com.hk

2. Database Management2. Database Management Startup ParametersStartup Parameters 1. Parameters List1. Parameters List

Option Effect Apply Notes-cpstream Stream code type Server start BIG-5,GB2312

-cpinternal Internal code type (_mprosrv)

-cprcodein Server start

Sample :Sample :E:\DLC\bin\_mprosrv.exe E:\DATABASE\Training –cpstreamGB2312 –cpinternal GB2312 -cprcodein GB2312 -cpcoll basic -B 60000 -L 40000 -n 8 –H Softspeed -S Training90ch -N TCP

E:\DLC\bin\_mprshut.exe E:\DATABASE\Training -cpstream GB2312 -cpinternal GB2312 -cprcodein GB2312 -cpcoll basic -by

Page 14: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsPROMON ---- Progress MonitorStart PROMON by TypingStart PROMON by Typing

\bin\Promon \bin\Promon DBName DBName

1.1. User Control User Control 用户控制用户控制2.2. Locking And Waiting Statistics Locking And Waiting Statistics 锁锁 // 等 统计 等 统计 3.3. Block Access Block Access 块访问块访问4.4. Record locking table Record locking table 5.5. ActivityActivity6.6. Shared ResourcesShared Resources7.7. Database statusDatabase status

T.T. Transactions Control Transactions Control 事务控制 事务控制 U.U. Resolve Limbo Transactions Resolve Limbo Transactions 解决出错事务解决出错事务V.V. Coordinator InformationCoordinator Information

M. Modify DefaultsM. Modify Defaults

Page 15: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsPROMON ---- Progress Monitor 1. User Control1. User Control

Shows All/Specific users logged on to the Database. Type:Shows All/Specific users logged on to the Database. Type:Broker, Monitor, Self-services etc.Broker, Monitor, Self-services etc.

2. Locking and Waiting Statistics 2. Locking and Waiting Statistics Shows All/Specific users that are holding, Or have held,waiting recordsShows All/Specific users that are holding, Or have held,waiting records

3. Block Access3. Block AccessShows All/Specific users requests users have made , along with total requests.Shows All/Specific users requests users have made , along with total requests.The The DB ReadsDB Reads and and DB ReqstDB Reqst is a critical determining the –B parameter. is a critical determining the –B parameter.

Type Usr Name DB Reqst DB Read ……………………Type Usr Name DB Reqst DB Read ……………………------ ---- ---------- ----------- -------------------- ---- ---------- ----------- --------------ACC 999 TOTAL 804590 72152ACC 999 TOTAL 804590 72152

Page 16: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsPROMON ---- Progress Monitor

4. Record locking table4. Record locking tableShow the exact record ID and lock TypeShow the exact record ID and lock Type

Usr Name Chian # Rec-id Lock FlagsUsr Name Chian # Rec-id Lock Flags---- ---------- -------- ------- --------- -------- ----------- ---------- -------- ------- --------- -------- -------1212 Admin REC 123 12345 EXEC Admin REC 123 12345 EXEC 1313 Sam REC 321 54321 SHRSam REC 321 54321 SHR1414 Admin REC 132 12345 EXEC QAdmin REC 132 12345 EXEC Q

5. Activity 5. Activity Show large amount of data for DB statusShow large amount of data for DB status

6. Shared Resources 6. Shared Resources Show the setting of the current system parametersShow the setting of the current system parameters

Page 17: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsPROMON ---- Progress Monitor

7. Database Status7. Database StatusShow physical characteristics about the databaseShow physical characteristics about the database

8. Shut Down Database8. Shut Down Databasei) Disconnect a Useri) Disconnect a User Selecting 1 give the result , Kill User according User Number.Selecting 1 give the result , Kill User according User Number.

ii) Unconditional Shutdownii) Unconditional Shutdown This is a normal shutdown , Any Pending transactions are rolled backward fromThis is a normal shutdown , Any Pending transactions are rolled backward from the .bi file as the users are disconnected.the .bi file as the users are disconnected.

iii) Emergency shutdown.iii) Emergency shutdown. It will Kill all users , can not roll-back from the .bi file. As next server startup, ItIt will Kill all users , can not roll-back from the .bi file. As next server startup, It will integrate the database.will integrate the database.

T. Transactions ControlT. Transactions ControlShow all transaction which submit to database. ------- Show all transaction which submit to database. ------- Transaction NOTransaction NO

Page 18: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsPROMON ---- Progress Monitor

L. Resolve Limbo Transactions (L. Resolve Limbo Transactions ( 解决出错事务解决出错事务 ))i) Abort a Limbo Transaction ----- Kill Transactionsi) Abort a Limbo Transaction ----- Kill Transactionsii) Commit a Limbo Transaction ---- Submit Transactionsii) Commit a Limbo Transaction ---- Submit Transactions

C. Coordinator InformationC. Coordinator Information

M. Modify DefaultM. Modify Default

Page 19: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsUtility Tools 实用工具 1. Create a New Database 1. Create a New Database 生产新数据库 生产新数据库

2. Copy a New Database from an existing database 2. Copy a New Database from an existing database 复制数据库复制数据库 $DLC\bin\procopy <source DB_Name> <destination DB_Name>

3. Database Index Re-build 3. Database Index Re-build 数据库重索引数据库重索引 $DLC\bin\Proutil <Database> -C idxbuild -T <Temp_dir> i) Space required for rebuild all index is 75% of the DB size ii) Repairs corrupted indexes in the database iii) You must shut down database before you rebuild index iv) You can rebuild index for specify table

$DLC\bin\Prodb database Name Enter the name of the database copy from Copy Structure ONLY

Page 20: Progress Administration

www.softspeed.com.hk

3. Administration Tools3. Administration ToolsUtility Tools

4. Display Database storage4. Display Database storage

$DLC\bin\Prostrct statistics Database_Name i) Shutdown server

Page 21: Progress Administration

www.softspeed.com.hk

4. General Administration4. General AdministrationMaintaining MFG/PRO Scripts and Database set 产生脚本

1. 1. Open MFG/UTIL utility and icons are based on database setsOpen MFG/UTIL utility and icons are based on database sets

2. 2. Setup Database sets[Training]Setup Database sets[Training] Configure Configure Any Database set Any Database set Training Training Setup DB Setup DB i) DB start Parameter : i) DB start Parameter :

-d dmy --------d dmy ------- Date Format Date Format -yy 1920 --------yy 1920 ------- Min Year Min Year -p mf.p --------p mf.p ------- Startup Program eg. RUN mf.p in progress editor Startup Program eg. RUN mf.p in progress editor Active -------Active ------- Yes/No Yes/No

ii) Component Setupii) Component Setup Physical database : Really Name for databasePhysical database : Really Name for database logical database : Let It BANK for production DBlogical database : Let It BANK for production DB Connect Parameter: -trig TRIGGERSConnect Parameter: -trig TRIGGERS Connect Type : (a) Local (b) Client/ServerConnect Type : (a) Local (b) Client/Server Host/Services : Host Name and Services Name (FOR Client/server Only)Host/Services : Host Name and Services Name (FOR Client/server Only) Path : Physical Path for DB ( FOR Local ONLY)Path : Physical Path for DB ( FOR Local ONLY)

Page 22: Progress Administration

www.softspeed.com.hk

4. General Administration4. General AdministrationMaintaining MFG/PRO Scripts and Database set

3. 3. Generate Startup scriptsGenerate Startup scripts

Scripts Scripts Generate Startup scripts Generate Startup scripts Select Database set Select Database set

Page 23: Progress Administration

www.softspeed.com.hk

4. General Administration4. General AdministrationCompiling Programs1.1. Use to compile a custom program or recompile an existing programUse to compile a custom program or recompile an existing program2.2. Create object file .r and save it to sub-directory using the first twoCreate object file .r and save it to sub-directory using the first two letters of the program nameletters of the program name3.3. This Program will be copied to language directory.This Program will be copied to language directory. xxsosomt.p -- xxsosomt.r -- Save to xx sub-directoryxxsosomt.p -- xxsosomt.r -- Save to xx sub-directory

File in source directory ------- > Compile all source program in specify directory.File in source directory ------- > Compile all source program in specify directory.Files listed in work file ------- > Compile program which list in work file.Files listed in work file ------- > Compile program which list in work file.Source Directory -------- > The Source Program which locate .Source Directory -------- > The Source Program which locate .Work file Name -------- > The Work file Name and directory .Work file Name -------- > The Work file Name and directory . ONLY use for option “Files listed in WF” be selected.ONLY use for option “Files listed in WF” be selected.Save New r-code -------- > Select this OptionSave New r-code -------- > Select this OptionLanguage ------- > Language Code . TW CH USLanguage ------- > Language Code . TW CH US System will Auto Create sub-directory CHSystem will Auto Create sub-directory CH

Page 24: Progress Administration

www.softspeed.com.hk

4. General Administration4. General AdministrationCompiling Programs

r-code to MFG/PRO default ------- > r-code will save to MFG/PRO default directory.r-code to MFG/PRO default ------- > r-code will save to MFG/PRO default directory.R-code to flat destination dir ------- > Directly save to destination directory.R-code to flat destination dir ------- > Directly save to destination directory.Destination Directory -------- > Where r-code will be savedDestination Directory -------- > Where r-code will be savedUsing The Database set -------- > Which DB set will be used to compileUsing The Database set -------- > Which DB set will be used to compileCompile Propath -------- > The order of search source programCompile Propath -------- > The order of search source program It must including “/ch/src”It must including “/ch/src”

4. 4. Following messages will be show after you press “Compile” button.Following messages will be show after you press “Compile” button.

Page 25: Progress Administration

www.softspeed.com.hk

4. General Administration4. General Administration

Preparing for compile... Begin Compile using: c:\temp\a.txt Preparing for compile... Begin Compile using: c:\temp\a.txt at: 11/03/01 12:42:17at: 11/03/01 12:42:17Using Compile PROPATH: .,E:\QADGUI~1,E:\QADGUI~1\Using Compile PROPATH: .,E:\QADGUI~1,E:\QADGUI~1\mfguobj,e:\DLC\gui,e:\DLC,e:\DLC\bin,E:\QADGUIFS90CH\ch\mfguobj,e:\DLC\gui,e:\DLC,e:\DLC\bin,E:\QADGUIFS90CH\ch\SRCSRCConnecting to: e:\database\mfgtrain -trig TRIGGERSConnecting to: e:\database\mfgtrain -trig TRIGGERSLogical Name: mfgtrainLogical Name: mfgtrainSource directory: C:\temp\Source directory: C:\temp\Destination directory: c:\temp\chDestination directory: c:\temp\chCounting number of files to compile.Counting number of files to compile.Starting compile of 1 file(s).Starting compile of 1 file(s).Compile contained 0 Errors.Compile contained 0 Errors.Resetting PROPATH and disconnecting from databases.Resetting PROPATH and disconnecting from databases.End Compile: 11/03/01 12:42:19End Compile: 11/03/01 12:42:19press CLOSE to exit.press CLOSE to exit.

Compiling Programs

Page 26: Progress Administration

www.softspeed.com.hk

A. Common PROGRESS Statements

A. DefineA. Define Variables, Work Files, Buffer,etcB. Example:C. Define variable abc as character. D. Define variable def like pt_part. E. Define buffer aa for pt_mstr.

B. FindA. Find records using criteriaB. Error indicating and Table lockingC. Example:D. Find first pt_mstr no-lock no-error.E. Find last pt_mstr where pt_part = “XXX”.

5. Progress Statement5. Progress Statement

Page 27: Progress Administration

www.softspeed.com.hk

• Common PROGRESS Statements– Form … with frame …

• Define the frame with fields, fields and frame attributes

– Display• Display data in a frame.• Example:

display pt_part pt_um pt_desc1 with frame a with 2 column.

display pt_part pt_um pt_desc1 with frame b 5 down.

display pt_part pt_um pt_desc1 with frame c column 10 row 20.

5. Progress Statement5. Progress Statement

Page 28: Progress Administration

www.softspeed.com.hk

5. Progress Statement5. Progress Statement

• Common PROGRESS Statements

– Output To• Specified the output destination : Printer, File, Terminal• Output Close

– Put• Sends the value of the expressions to an output destination other

than the terminal• Example:

put pt_part at 1 pt_um to 25 skip pt_desc1 pt_prod_line.

– Message• Displays messages in the message area at the bottom of the

window• Example:

message “Part Number: ” pt_part.

Page 29: Progress Administration

www.softspeed.com.hk

5. Progress Statement5. Progress Statement

• Common PROGRESS Statements– Variables Format

• Specifies the attributes for the variables• CHARACTER: x(8)• DATE: 99/99/99• DECIMAL: ->>,>>9.99• HANDLE: >>>>>>9• INTEGER: ->,>>>,>>9• LOGICAL: yes/no

Page 30: Progress Administration

www.softspeed.com.hk

5. Progress Statement5. Progress Statement

• Common PROGRESS Statements– For

• An iterating block that reads a record from each of one or more tables at the start of each block iteration

• An “End” is required to terminate the block• Example:

for each pt_mstr no-lock:

display pt_part.

end.

Page 31: Progress Administration

www.softspeed.com.hk

5. Progress Statement5. Progress Statement

• Common PROGRESS Statements– If … then …

• Makes the execution of a statement or block of statements conditional

• Example:

if pt_part > “A” then

message pt_part.

else

message “Exit”.

Page 32: Progress Administration

www.softspeed.com.hk

5. Progress Statement5. Progress Statement

• Common PROGRESS Statements

– Do … End• Groups statements into a single block• Example:

if pt_part > “A” then do:message pt_part.find next pt_mstr no-lock no-error.display pt_part.

end.else do:

message “Less than ‘A’”.message “Exit”.

end.

Page 33: Progress Administration

Add Month 2000

Thank you !

Sam song Sam song

SoftSpeed Consultant SoftSpeed Consultant LtdLtd