Documente Academic
Documente Profesional
Documente Cultură
DIgSILENT GmbH Heinrich-Hertz-Strasse 9 D-72810 Gomaringen Tel.: +49 7072 9168 - 50 Fax: +49 7072 9168 - 88 http://www.digsilent.de
PowerFactory Installation Manual Published by DIgSILENT GmbH, Germany Copyright 2008-2011. All rights reserved. Unauthorised copying or publishing of this or any part of this document is prohibited. 06th July 2011
Table of Contents
Table of Contents
1 INTRODUCTION ......................................................................................... 5 1.1 TYPOGRAPHIC CONVENTIONS ........................................................................ 5 1.2 OVERVIEW ..................................................................................................... 5 1.3 HARDWARE AND SOFTWARE REQUIREMENT ................................................... 7 2 DEMO VERSION .......................................................................................... 8 3 LICENSE...................................................................................................... 9 3.1 LICENSE OPTIONS .......................................................................................... 9 3.2 NETWORK LICENSE AND LICENSE SERVER .................................................... 10 3.2.1 License Server Installation .......................................................................... 10 3.2.2 License Server Upgrade - Hardlock with floating license feature enabled ....... 12 3.2.3 License Server Functionality ....................................................................... 13 3.2.4 License Server Settings .............................................................................. 14 3.2.5 Client Settings ........................................................................................... 15 3.2.6 Firewall Settings ........................................................................................ 15 3.2.7 Function Management ................................................................................ 15 3.3 LICENSE ACTIVATION .................................................................................. 16 4 DATABASE ................................................................................................ 18 4.1 SINGLE-USER DATABASE/LOCAL DATABASE .................................................. 19 4.1.1 Backup ...................................................................................................... 20 4.2 ORACLE ....................................................................................................... 20 4.2.1 Server Installation ...................................................................................... 21 4.2.1.1 Server Requirements ............................................................................... 21 4.2.1.2 Install Oracle server software .................................................................. 21 4.2.1.3 Prepare the server for PowerFactory ........................................................ 21 4.2.1 Client Installation ....................................................................................... 23 4.2.1.1 Install and configure Oracle Instant Client ................................................ 24 4.2.1.2 Install and configure Oracle Client ............................................................ 24 4.2.1.3 PowerFactory Configuration ..................................................................... 25 4.2.2 Backup ...................................................................................................... 27 4.3 MICROSOFT SQL SERVER ............................................................................. 28 4.3.1 Windows Installer 4.5 and .NET Installation ................................................. 29 4.3.2 SQL Server 2005 Installation ...................................................................... 30 4.3.3 SQL Server 2008 Installation ...................................................................... 32 4.3.4 Server Configuration (all Editions) ............................................................... 34 PowerFactory Installation Manual 3
Table of Contents
4.3.4.1 Configure the SQL Server services............................................................ 34 4.3.4.2 Power Factory Configuration .................................................................... 36 4.3.5 Backup ...................................................................................................... 36 4.3.5.1 Create a Backup...................................................................................... 36 4.3.5.2 Restore a Backup .................................................................................... 38 5 INSTALLATION AND CONFIGURATION.................................................... 39 5.1 INSTALLATION ............................................................................................. 40 5.2 CONFIGURATION FOR FILE SERVER .............................................................. 43 5.3 CONFIGURATION FOR APPLICATION SERVER ................................................ 44 5.3.1 Using a shared configuration ...................................................................... 44 5.3.2 Using individual configurations (deprecated) ................................................ 48 6 MULTI-USER DATABASE MANAGEMENT .................................................. 50 6.1 ADMINISTRATION PASSWORD ...................................................................... 50 6.2 USER CREATION .......................................................................................... 51 7 UPDATE AND DATABASE MIGRATION ..................................................... 54 7.1 MIGRATION FROM VERSION 14.0.X OR 14.1.X............................................... 54 7.2 MIGRATING FROM VERSION 13.2.................................................................. 55
1 Introduction
1 Introduction
1.1 Typographic Conventions
Products of DIgSILENT GmbH are printed in bold italic. Third party products are printed in bold. Values given as example or ones the user can chose according to his needs are written in italic. File names, directories, listings and values the user is asked to enter are written in fixed width font. Button and window captions or menu entries the user is asked to click or select are written in bold fixed width font. Menus and submenu structures are denoted by an arrow () in front of the first element and all following subentries. Internet addresses are written in underlined fixed width font.
1.2 Overview
The delivery of the software includes: CD-ROM with PowerFactory setup and License Server setup License Key(s) Manual(s)
License Agreement Depending on the installation type, a PowerFactory system can have several components which have to be installed and configured separately. Figure 1.1 provides an overview of these installation steps. Installing the PowerFactory Demo version is quite simple, read chapter 2 (Demo Version). The further installation options hold only for the Full version. If a network license is to be used the License Server must be installed and configured. This step is not required for a single-user license. Chapter 3 (License) explains the different ways to install license keys. Especially the setup of the License Server is covered. If you are using PowerFactory with a multi-user database (e.g. Oracle or MS SQL Server) the database server must be configured. The various database options are covered in chapter 4 (Database).
1 Introduction
Then the PowerFactory application itself is installed. Chapter 5 (Installation and Configuration) shows different installation types (on local machine, on an application server, or a file server). For a multi-user database additionally the PowerFactory users have to be configured. This is explained in chapter 6 (Multi-User Database Management).
full version:
network license: install and configure license server single-user license: demo version:
multi-user database:
single-user database:
multi-user database:
1 Introduction
SVGA graphic card with a resolution of at least 1280x1024 pixels DIgSILENT PowerFactory is a standard Windows application. Both a 32-bit and a 64-bit version are available. Some parts of the PowerFactory documentation are available only in PDF format. In order to read these documents a separate viewer application (e.g. Adobe Acrobat Reader) is required.
2 Demo Version
2 Demo Version
The demo version can run most implemented options and features, but will not allow calculations to take place (besides the prepared tutorials and examples). It comes with a full tutorial net, accompanied with an online do-it-yourself tutorial. This tutorial explains the principles and functionality of PowerFactory by letting you build the tutorial net yourself, step by step. The tutorial net contains all the major features of PowerFactory, and calculations for this network configuration are permitted by the program. Place the installation CD into your CD-ROM-drive. The setup will start automatically. If this does not occur then the setup may be manually started using PreInstall.exe, located in the CD-ROMs root directory.
During the installation select PowerFactory - Demo. After completion of the installation start the program: Start the PowerFactory application A Log on dialog will appear (see figure 2.1). Insert Demo as Name in the Log on dialog page. No Password is required. The License page of this dialog should read as shown in figure 2.2. On the other dialog pages leave the default settings. Press OK . When youre starting PowerFactory for the first time, the database is initialized which may take several minutes.
3 License
3 License
3.1 License Options
Figure 3.1 shows different configuration models using different license keys, where the license key is denoted by the symbol.
The top row shows three Demo installations where no license keys are required. Demo installations are explained in chapter 2 (Demo Version). The middle row shows three independent Single-user clients. At the bottom, the usage of a Network license for three users is displayed. Section 3.2 (Network License and License Server) covers this installation mode. Depending on whether the license key (also known as a dongle or hardlock) is connected to DIgSILENT PowerFactory or not, PowerFactory will either be a full runtime version or a restricted demo version. DIgSILENT provides license keys for the USB port as well as for the parallel port. The license key can either be individually connected to each computer where PowerFactory is running, or a special license key, the network license key, may be employed to allow access by several users over a network. This key is plugged to one computer in the computer network, e.g. to a server or another machine that runs continuously (the license server). The number of users that the key will allow at any one time depends on the number of user licenses purchased. Simultaneous use, up to the number of permissible users, is catered for.
3 License
Windows Server: Additionally the installation has to be done on the console. A remote administrator session will not work correctly. If a previous version of the license server is already installed remove it completely: Stop the License Server service in the Windows control panel or, if exists for new versions, startup the License Server Service Configuration application diglsvc32.exe.
If the License Server hardlock is configured with the "Floating License" module, the file getlicense.bin out of the existing installation directory should be backed up to import it to the new installation directory. The floating license parity is synchronized with the file getlicense.bin within the installation directory. If synchronizing fails the license server stops working properly and must be activated manually. In this case DIgSILENT must be contacted. Copy getlicense.bin to a backup directory. Stop and uninstall the License Server service: In the installation directory of the license server start diglsvc32.exe 10
3 License
Stop and uninstall the service. Now the new License Server can be installed. Remove all existing USB license keys. Place the installation CD into your CD-ROM-drive. The setup will start automatically. If this does not occur then the setup may be manually started using PreInstall.exe, located in the CD-ROMs root directory. During the setup procedure, please select PowerFactory - Server. Then select which component to be installed: Hardlock Device Drivers, Network License Server and PowerFactory. After completion of the installation attach your network license key to your computer Fig. 3.2 License Server Installation Directory
If the License Server hardlock is configured with the "Floating License" module, the file getlicense.bin must be overwritten by the previously backed up file. Copy getlicense.bin to the installation directory and overwrite the existing file. First run the license server application diglise.exe directly as Windows application (not as windows service). Error messages will then pop up in case of any installation problems (c.f. figure 3.3). The option Menu About shows more details.
11
3 License
After a successful diglise.exe run and test, the diglise.exe Windows application may be closed and the service can be installed and started. Run the License Server Service Configuration application diglsvc32.exe. Stop and Uninstall an existing service. Install and start the license server service. Verify that the service process is really started automatically at the Windows startup. Note that it can take up to one minute until the process diglise.exe is up and running. Check for existence of the processes diglise.exe Note: After installation of a license server which is softkey protected, the license server has to be started as a Windows application first. A dialog box will pop up, please follow the instructions.
3.2.2 License Server Upgrade - Hardlock with floating license feature enabled
During a reinstallation or an upgrade of the License Server using a hardlock including the floating license functionality, the following steps have to be done to make available the license after the installation: Do not uninstall the previous instance of the License Server.
12
3 License
After installing the new License Server the file getlicense.bin has to be copied from the old to the new installation directory. If the License Server using the floating license hardlock is expired because of some reasons please contact DIgSILENT support (support@digsilent.de) to provide an activation file. This activation file has to used via the menu entry Menu Upgrade License... The application has to be restarted afterwards.
13
3 License
accompanied by a message to the client/ user that the license connection has been lost. Hint: At any time the current license status may be checked by looking at Help/About DIgSILENT...
RPC-Protocol=ncacn_ip_tcp RPC-Endpoint=4000
Working directory (default: subdirectory Run) request files are read from, and user license files are written to this directory. The network license key cannot be used as a local key for DIgSILENT PowerFactory Workstation. It can only be accessed using the license server (PowerFactory Server). However DIgSILENT PowerFactory and the license server may be installed and run on the same machine, so that a network license key may be used on a local machine as long as the license server is also running.
Note:
14
3 License
15
3 License
A right mouse click on a certain user in the data manager offers the menu entry Edit. Selecting this entry opens the users dialog box, which appears as figure 3.7 shows.
The License page includes a list of all PowerFactory functions. Each function can be enabled or disabled for this user. The standard setting enables the base package only. Hint: Only the PowerFactory Administrator (default password: Administrator) has the right to modify these settings in a multiuser database environment. In a single-user environment the user may override these settings.
If there are not enough licenses available the user will get an appropriate message when logging on. The Help About PowerFactory dialog box then includes a list of all remaining functions the user occupies.
3 License
Therefore the executable digactivate.exe is to be started out of the installation directory (PowerFactory or License server) that offers an automatic online activation or an offline mode by merging the file separately. To get access to the activation server the users credentials must be stated. This information can be reviewed in the customers license agreement. The executable will guide you through the activation process:
Activate directly from the Internet: Download the activation file and merge it to the appropriate installation directories. Download the activation file without installation: Download the file only to distribute it later on to the installations. Activate using a local activation file: Merge a previous downloaded activation file to the installation directories. The path to the previously downloaded activation file must be specified.
17
4 Database
4 Database
DIgSILENT PowerFactory uses a database to store the users project data. There are two ways to use the database: As single-user database which resides locally on each computer. Figure 4.1 shows three PowerFactory instances on three computers with their local databases. The single-user (or local) database is described in section 4.1 (Single-User Database/Local Database).
As multi-user database which resides on a remote server computer, where all users have access to the same data simultaneously. Figure 4.2 shows three PowerFactory clients (THORIN, GLOIN, and BALIN) accessing the same multi-user database on FEANOR. DIgSILENT PowerFactory provides drivers for two multi-user database systems: Oracle (c.f. section 4.2 (Oracle)), and Microsoft SQL Server (c.f. section 4.3 (Microsoft SQL Server)). Note: One of the cardinal rules in using computers is: Back up your files regularly! Even the most reliable computer is apt to break down eventually. So it is highly recommended to make daily backups of your database. To be especially safe, you should keep backups on a secure medium. Backup instructions for each database system are given below.
18
4 Database
Note:
A daily database backup is highly recommended. The backup procedure for a local database is explained in section 4.1.1 (Backup).
19
4 Database
4.1.1 Backup
The local database is stored in the DB subfolder of your working directory which may reside on the local hard disk, or the file server or application server depending on the network installation mode (see section 5 (Installation and Configuration)) you are using. To create a backup: Close PowerFactory. Archive the DB folder and its sub folders with an archiver/zipper utility.
Move the archive to a secure place e.g. another hard disk. Restoring the database is as easy as creating the backup: Close PowerFactory if its running. Rename the existing DB folder in your PowerFactory working directory to DBOLD. Create a new empty DB folder. Extract the archive into it.
4.2 Oracle
PowerFactory uses Oracles OCCI/OCI programming interface to communicate PowerFactory supports Oracle versions as shown below:
Server: 10.2 or higher Client: 11.2: o PowerFactory 32bit (x86) requires the 32bit Oracle Client o PowerFactory 64bit (x64) requires the 64bit Oracle Client This chapter describes the installation and usage of the Oracle database server and client. We assume you want to set up three clients and the server as shown in figure 4.2. Before you set up and configure the client computers in section 4.2.2 (Client Installation), the server must be prepared as explained in section 4.2.1 (Server Installation). with the server. OCCI/OCI itself uses a proprietary communication scheme on top of TCP/IP.
20
4 Database
High network bandwidth (100 Mbit/s or higher) connection between the Oracle server and the machines where PowerFactory is running. Depending on the number of users and projects the above numbers have to be adapted. 4.2.1.2 Install Oracle server software Install the Oracle server software on the server computer (FEANOR being the server computer name used in this section). Please follow the Oracle installation instructions. 4.2.1.3 Prepare the server for PowerFactory
FEANOR be accessible as feanor.domain.com in the network. In order to use the Oracle server for PowerFactory you have to do the steps as follows:
Create a new Oracle instance with the SID PFSERVER (stands for: PowerFactory Server) or use an existing one. The character set for the Oracle instance should be WE8MSWIN1252. Adjust the Oracle Listener (SQLNET) configuration file
ORACLE_HOME/network/admin/listener.ora
Add an entry for the new instance PFSERVER. Heres an example for the listener.ora file:
21
4 Database
# LISTENER.ORA Network Configuration File LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP) (HOST = feanor) (PORT = 1521) ) ) (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) ) ) ) SID_LIST_LISTENER = (SID_LIST = [...] (SID_DESC = (SID_NAME= PFSERVER) (ORACLE_HOME = /opt/oracle/product/10.2.0) ) )
The default Oracle port 1521 and the TCP protocol is used. The server has the host name feanor. You can use the full DNS name e.g. feanor.company.com instead.
PowerFactory needs a place to store its data. Oracle stores data in so-
called tablespaces. It is suggested to create a new tablespace where PowerFactory (and only PowerFactory) stores its data. You can adapt the following SQL statement to your purposes:
CREATE TABLESPACE POWERFACTORYTABLESPACE LOGGING DATAFILE D:\ORACLE\ORADATA\DIGSI\POWERFACTORYTABLESPACE.ora SIZE 5000M REUSE EXTENT MANAGEMENT LOCAL
The statement creates a new tablespace named POWERFACTORYTABLESPACE which is stored in a POWERFACTORYTABLESPACE.ora file in the given directory. The file size is restricted to 5000M i.e. about 5GB.
22
4 Database
In order to use the Oracle instance for PowerFactory one new Oracle schema is required. Create a new schema with the default profile. We suggest the schema name PF. Define a password for PF. In this example we use aPasswordForPf. Associate Default and Temporary tablespaces to schema PF. It is assumed that a temporary tablespace TEMP is available. Grant the roles CONNECT and RESOURCE and the system privilege UNLIMITED TABLESPACE to PF. You may use this small SQL script to create the schema:
PROFILE DEFAULT IDENTIFIED BY aPasswordForPf DEFAULT TABLESPACE POWERFACTORYTABLESPACE TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;
CREATE USER PF
GRANT UNLIMITED TABLESPACE TO PF; GRANT CONNECT TO PF; GRANT RESOURCE TO PF;
Start the Oracle instance process and Oracle listener process if they are not already started. Note: The amount of tablespace space PowerFactory requires depends heavily on how PowerFactory is used. The space is almost proportional to the number of objects in PowerFactory. Observe the tablespace fill-state regularly (e.g. once per month) and increase the size limit accordingly. It is highly recommended to backup the Oracle schema on a daily basis. The backup procedure is explained in section 4.2.3 (Backup).
Note:
Oracle Client: This package includes many Oracle tools (e.g. management
console, management tools, networking services, utilities etc.) which are not actually required for using PowerFactory; supports TNS names.
Oracle Instant Client: This package contains only the files required for using PowerFactory; doesnt support TNS names.
23
4 Database
Both Oracle Client and Oracle Instant Client are available for 32bit applications and 64bit applications. PowerFactory 64bit requires a 64bit Oracle Client; PowerFactory 32bit requires a 32bit Oracle Client. Note: The Windows version is not relevant: if you install PowerFactory 32bit on Windows 7 64bit, youll have to install Oracle client 32bit. 4.2.1.1 Install and configure Oracle Instant Client Oracle Instant Client: This is a package of DLL files which can be downloaded freely from the Oracle website. The package names are:
The packages are ZIP archives that can be extracted anywhere e.g. to
c:\instantclient_11_2:
4.2.1.2 Install and configure Oracle Client Please use the newest version of the 11.2 client and follow the installation documentation. It is assumed that the client software is installed in
c:\app\product\11.2.0\client_1
24
4 Database
configuration
PFS = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = feanor)(PORT = 1521)) ) (CONNECT_DATA = (SERVICE_NAME = PFSERVER) ) )
Then the PFS TNS name can be used in the PowerFactory configuration. 4.2.1.3 PowerFactory Configuration Starting PowerFactory the Database page of the Log On dialog should have settings as shown below:
25
4 Database
Database driver: On the Database page select Oracle (Client Version 11.2) as
Database driver.
service
//host[:port][/servicename
With the values used above (host=feanor, port=1521 (default port), and SID=PFSERVER) the connection name is
//feanor/PFSERVER
//feanor:2521/PFSERVER
If youve installed a full Oracle client and made an entry (e.g. PFS) in the TNSNAMES.ORA configuration file, you can use the TNS name instead. Then the Database service is just
PFS
PATH
C:\instantclient_11_2\vc9;C:\instantclient_11_2
C:\app\product\11.2.0\client_1):
C:\app\product\11.2.0\client_1\oci\lib\msvc\vc9;C:\app\product\11.2.0\client_1\BIN
26
4 Database
4.2.2 Backup
Describing Oracles backup facilities is far beyond the scope of this installation manual. In this section only a simple technique is described. Please consult the Oracle documentation for detailed information or other backup strategies. One backup method is the creation of database dumps. The exp.exe and imp.exe tools are part of the Oracle distribution. To export all data of the schema PF run the exp.exe tool:
exp.exe PF/aPasswordForPf@PFS \ file=d:/tmp/database.dump \ owner=PF
where PF is the schema, aPasswordForPf is his password, PFS is the TNS name, and d:/tmp/database.dump is the filename of the dump file. Note: During the export or import process no PowerFactory client should may be active.
27
4 Database
Oracle also supports so-called hot backups where clients can still use the database during the backup process. Please consult the Oracle documentation for this backup strategy. To re-import a database dump, first drop and re-create the Oracle schema PF. Then run the imp.exe tool:
imp.exe PF/aPasswordForPf@PFS \ file=d:/tmp/database.dump \ fromuser=PF touser=PF
If you import the dump into another Oracle instance ensure that there is a tablespace with the same name as the source instance.
DIgSILENT PowerFactory is capable to use all editions as database engine. The free Express Edition provides almost the same functionality as the other editions but limits database size to 4 GB and lacks some of the more advanced administration tools. For a complete list of features for all editions consult the official SQL Server Homepage. SQL Server 2005 and SQL Server 2008 operate as a service. Services are applications that run as background processes. The behavior of services differs from that of other applications. For example, while most applications are executed only when a user launches the application from the Start menu, services such as SQL Server are generally started and stopped by the operating system environment. A service runs in the background and waits for processing requests. In the case of SQL Server, these requests are for database operations. All actions described in this section are to be done on the server computer. Throughout this section FEANOR is used as computer name. This chapter describes the installation and usage of MS SQL Server. The installation instructions cover the Express Editions of SQL Server 2005 and SQL Server 2008. Installation of the other editions is done accordingly. After the server is
28
4 Database
installed and running, it has to be configured before it can be used by PowerFactory. Section 4.3.4 covers this topic. Both SQL Server 2005 and SQL Server 2008 require you to install the Windows Installer 4.5 and the .NET framework, which is covered in section 4.3.1 (Windows Installer 4.5 and .NET Installation). SQL Server 2008 also requires the installation of Microsoft PowerShell, which is covered in Section 4.3.3.
An installation wizard is shown. Click Next. Read and accept the license agreement. Click Next. Click Continue.
Windows may ask you to restart your system to complete the installation. Now the .NET framework can be installed. The current version is 3.5, so we use this. You can download it for free. Open your browser and navigate to http://www.microsoft.com/downloads/details.aspx?familyid=333325FD-AE524E35-B531-508D977D32A6&displaylang=en Download the file via the Download button above the Quick Details section. Double click the file you downloaded.
4 Database
To install SQL Server 2005 continue with section 4.3.2 (SQL Server 2005 Installation). To install SQL Server 2008 continue with section 4.3.3 (SQL Server 2008 Installation).
In the SQL Server 2005 Express Edition SP2 column, download both SQL Server 2005 Express Edition and SQL Server Management Studio Express. Double click the file SQLEXPR32.EXE to install SQL Server 2005.
The End User License Agreement is shown. Read and accept it. Click Next. On the Installing Prerequisites dialog click Install. Click Next.
The system configuration check should have passed without any errors. If not make sure to correct them. Click Next. On the Registration Information page enter the information requested and click Next. On the Feature Selection page click the hard drive Symbol next to Database
Services
30
4 Database
Select Entire feature will be installed on local hard drive from the popup menu. Click Next. On the Authentication Mode page chose Mixed Mode authentication Specify a password for the sa user.
The sa user is an administration account built into SQL Server 2005. We will need this password later. Make sure to select a secure password, as this user has full administration privileges over the database service. Click Next. On the Configuration Options page, activate both checkboxes and click Next. On the Error and usage Report Settings page, uncheck both checkboxes and click Next. On the Ready to install page click Install. After the installation completed click Next. Click Finish.
SQL Server 2005 is now installed on your system. In the next steps an advanced administration tool is installed, SQL Server Management Studio Express. Double click the file SQLServer2005_SSMSEE.msi you downloaded earlier.
A Welcome dialog is shown. Click Next. Read and accept the license agreement. Click Next. On the Registration Information page enter the information requested and click Next. On the Feature Selection page click Next. Click Finish.
31
4 Database
You can now continue with section 4.3.4 to configure SQL Server 2005 for PowerFactory.
Read and accept the license agreement and click Next. Click Finish.
After the installation of PowerShell is finished you can install SQL Server 2008. Microsoft provides the Express Edition as free download. You can download the package from the Microsoft web site. Open the download page http://www.microsoft.com/downloads/details.aspx?FamilyId=7522A683-4CB2454E-B908-E805E9BD4E28&displaylang=en Select the package according to your system and save it to disk. Double click the file you just downloaded to begin the installation.
The SQL Server Installation Center is shown. On the left side, select Installation. Select New SQL-Server stand-alone installation or add features to an existing installation on the right side.
32
4 Database
On the Setup Support Rules page click OK. Enter the product key in case you are not installing the Express Edition. Click Next. Read and accept the License Terms and click Next. On the Setup Support Files page click Next. On the Setup support Rules page click Next. Note that you have to correct all errors on this page before setup can continue. On the Feature Selection page make sure to select the following options:
Click Next.
The Instance Configuration page is now shown. It allows you to change the Instance Root directory, the Instance Name and the Instance ID used by SQL Server 2008. The Instance Root directory is used by SQL Server to store its system databases. Those databases tend to grow with time and also impact performance of SQL Server. You should select an appropriate location on your server. You cannot change this setting later on. Additionally, every new database will have its default file location set to this directory. identifies your SQL Server 2008 installation. This is useful as you are allowed to have more then one installation of SQL Server 2008 running in parallel on the same machine. In most cases the default value is fine. Just make sure that the option is set to Named Instance.
The Instance Name
The Instance ID is used to identify installation directories and registry keys for your instance of SQL Server. Use the same value as for the Instance Name. The Disk Space Requirements page is shown. Click Next. On the Server Configuration page choose NT AUTHORITY\SYSTEM as Account Name in the service list and click Next.
33
4 Database
On the Database Engine Configuration page Choose Mixed Mode authentication and enter a password for the sa account. The sa user is an administration account built into SQL Server 2008. We will need this password later. Make sure to select a secure password, as this user has full administration privileges over the database service. Click Add Current User to add yourself as SQL Server administrator Click Next. On the Error And Usage Reporting page, uncheck both checkboxes and click Next. On the Installation Rules page click Next. On the Ready to Install page click Install. Click Next. Click Close.
34
4 Database
On the right side, right click the SQL Server (SQLEXPRESS) entry and select Restart from the context menu. The value in braces is the instance name, so make sure to select the correct one. On the right side, right click the SQL Server Browser entry and select Start from the context menu if its not already running.
Your newly installed instance is now configured to allow network connections. With the next steps a database for PowerFactory is created. Again, from the Start Menu select: Microsoft SQL Server 2005 SQL Server Management Studio Express Change Authentication to SQL Server Authentication Enter the login name sa and enter the Password for sa, chosen during installation Select File New Query with Current Connection Enter the following lines in the Query Window to the right:
sp_addlogin pf, aPasswordForPf GO CREATE DATABASE pfdb GO ALTER DATABASE pfdb SET ALLOW_SNAPSHOT_ISOLATION ON GO USE pfdb GO sp_grantdbaccess pf GO GRANT CREATE TABLE TO pf GO
Click Execute in the toolbar You have now created a database named pfdb with a corresponding login named pf which uses the password aPasswordForPf. Feel free to change the values according to your needs. Note: It is highly recommended to create daily backups of the database. The backup procedure for SQL Server is described in section 4.3.5. 35
4 Database
4.3.4.2 Power Factory Configuration After starting PowerFactory, switch to the Database tab on the Log On dialog shown below.
Select Microsoft SQL Server as Database driver. The Database service uses the format server_name\instance_name. If you used the default values SQL Server provides, it would be FEANOR\SQLEXPRESS for the 2008 edition. FEANOR is our virtual server name during this manual, as stated earlier. Note that the 2005 edition uses something called default instance, which must be accessed by omitting the instance name in the Database service. So its just FEANOR for the 2005 edition. Username, Password and Database correspond to the values used in 4.3.4.1, so for this manual it would be pf as username, aPasswordForPf as password and pfdb as database name.
4.3.5 Backup
4.3.5.1 Create a Backup As with Oracle, SQL Servers backup facilities are far beyond the scope of this documentation. It is highly suggested you consult the official Microsoft documentation for detailed backup strategies. We present a very simple method to PowerFactory Installation Manual 36
4 Database
backup a database and must stress that this method only satisfies the most basic needs. A full SQL Server database backup can be easily created from a DOS console on the server computer. Open a command prompt and enter (all in one line):
This dumps the database named pfdb to a file d:\backupdir\pfdb.dump, sa and aSecurePasswordForSa are username and password of the database administrator user. It is suggested to create a batch script which performs this task. To do so: Open a new batch file e.g. d:\backupdir\backup.bat with a text editor (e.g. Windows Notepad editor). Insert the above text into the file (all in one line!).
Close the file. Windows Scheduled Tasks utiltiy allows you to run this batch script automatically, for example every day at midnight. Open the scheduler manager Windows Start menu Start Programs Accessories System Tools Scheduled Tasks Add a new scheduler task PowerFactory backup and configure it as follows (see the Windows documentation for further information) Enter the backup script d:\backupdir\backup.bat to be run.
Select the daily option and 00:00 as start time. This configuration creates nightly backups. The pfdb.dump file is overwritten each time. If you want to keep the latest three backup dumps enhance the above backup.bat script as follows. Open the batch script created earlier Replace its contents with the following lines (again, the sqlcmd command in one line)
copy d:/backupdir/pfdb2.dump d:/backupdir/pfdb3.dump copy d:/backupdir/pfdb1.dump d:/backupdir/pfdb2.dump copy d:/backupdir/pfdb.dump d:/backupdir/pfdb1.dump sqlcmd S FEANOR\SQLEXPRESS -U sa -P aPasswordForSa e -Q BACKUP DATABASE pfdb TO DISK=d:/backupdir/pfdb.dump WITH INIT
37
4 Database
4.3.5.2 Restore a Backup The RESTORE_DATABASE command recovers a database from a dump file. To restore a database backup on the same database server where it was created follow the instructions below. Run sqlcmd from the command promt
GO
DROP DATABASE pfdb RESTORE DATABASE pfdb FROM DISK=c:/backupdir/pfdb.dump WITH RECOVERY GO
Restoring the database on a different SQL Server installation is more complicated. Let c:\msde2 be the installation folder of the target SQL Server. All commands are to be run inside sqlcmd.
GO
GO
GO
38
The Working Directory (denoted by the symbol ) contains some temporary data, an error log file, and the local database (c.f. section 4.1) is stored within. DIgSILENT PowerFactory can be installed in three different ways which are shown in figure 5.1. Locally on individual computers. On one File server, where only the working directory of each client resides on the local hard disk (c.f. section 5.2) On an Application server (e.g. terminal server), where the installation and working directories reside on the server (c.f. section 5.3) Note: PowerFactory (i.e. the Windows user) requires read access rights to the installation directory (including subdirectories), and additionally write access rights to the installation and the working directory and its subfolders. For Application server additionally write access to the installation directory is required.
Section 5.1 describes the local installation which must be performed for all installation types. The further configuration for application server or file server usage is explained in the corresponding sections.
39
5.1 Installation
Before installing the hardlock drivers for a single-user license, please ensure that the requirements as follows are fulfilled (they do not apply for a network license): Windows XP/Vista only To install the full version you must have administrator rights. Without these, setup will fail.
USB license keys can only be used if USB ports are enabled Settings Control Panel System Hardware Device Manager Universal Serial Bus controllers The actual installation procedure runs as follows: If you are using a single-user license: remove all existing USB license keys. Insert the PowerFactory installation CDROM. The setup application will start automatically. If this does not occur then setup may be started manually by running the setup application (PowerFactory\setup.exe). Follow the instructions during the setup. During the installation procedure please select the Full Version option. Later you will be asked for your serial number. The serial number can be found in the license agreement.
40
The setup application copies the files to an installation directory, e.g. C:\DIgSILENT\pf140b501. The PowerFactory application file digpf.exe is stored in this folder. You can start PowerFactory by double-clicking this file in Windows explorer. The file digpf.exe is the English version. For the German version use
digpf.exe /lang:de digpf.exe /lang:es
If youre using a single-user license: attach your license key to your computer now.
Start the PowerFactory (digpf.exe) application. A Log On dialog pops up. Insert the settings as follows: Insert Demo as Name in the Log on dialog page. No Password is required (see figure 5.2).
Enter the license settings on the License page: Single-user license: select the option on local port and enter your Serial Number (see figure 5.3). The serial number can be found in the license agreement. Network license: Enter the settings as described in section 3.2.5.
41
Leave the default settings on the Network page (see figure 5.4) (i.e. on local machine) for now.
On the Database dialog page single-user database: Leave the default settings (Local Database). 42
multi-user database: Adapt the parameters on the Database page according to the database server (Oracle: section 4.2; MS SQL Server: section 4.3).
Press OK. When you are starting PowerFactory for the first time, the database is initialized automatically. This may take several minutes. Close PowerFactory PowerFactory is now configured for the usage on the local machine. If you want to configure PowerFactory for file server follow the instructions in section 5.2. The configuration for PowerFactory on an application server is described in section 5.3. If you are using a multi-user database proceed with the User Creation in section 6.2.
Start PowerFactory using the shortcut. Insert the Network page of the Log on dialog is shown in figure 5.5. Every time the program is started the executable file and its libraries will be loaded via network from the file server. The process will however run on the local machine.
43
The installation directory contains PowerFactory application binaries as well as the configuration file set.dz. The set.dz file contains all logon parameters (e.g. license server and database connection settings) and is to be used for all PowerFactory users. Each PowerFactory user requires an own working directory which holds temporary data. The directory structure for three users (additional to the built-in Administrator and Demo users) may have the structure as shown below:
44
C: +- DIgSILENT + pf140 +- digpf.exe +- set.dz +- ... D: +- PowerFactoryData +- Administrator +- Demo +- Frodo +- Sam +- Pippin // Installation directory
Note:
The working directories may reside on a network drive on a different machine e.g. on \\SERVER\Data\PowerFactoryData. Then define a mapped drive e.g. d: for \\SERVER\Data. PowerFactory is not able to handle raw network paths directly.
The configuration takes several steps: Create a root working directory e.g. D:\PowerFactoryData manually. Within this root directory create directories for the built-in users Administrator and Demo and for the users Frodo, Sam and Pippin. Now the Log on configuration can be defined. Start PowerFactory in configuration mode:
c: cd c:\DIgSILENT\pf140b501
digpf.exe /config
45
Insert Demo as Name in the Log on dialog page. Insert in the License and the Database dialog pages the license and database configuration parameters as described in section 5.1. In the Network page insert the settings as follows (c.f. figure 5.8). Select the option on application server. Enter C:\DIgSILENT\pf140b500 as Installation Directory. Insert D:\PowerFactoryData\%USER% as Working Directory. (The %USER% part is to be replaced by the intended username, e.g. D:\PowerFactoryData\Frodo.) Finally on the Advanced dialog page do as follows (c.f. figure 5.9): Enable the option Hide User Name of last Session.
Enable Restricted Log On. The Restricted Log On switch disables most of the other settings and prevents the PowerFactory users from changing the settings accidentally. Note: When later the configuration changes (e.g. the database server is migrated to another computer) you have to re-run the configuration tool digpf.exe /config. First disable the option Restricted Log On, make the required modifications, and finally enable Restricted Log On again.
Having configured all settings press the OK button to save the settings to the set.dz configuration file.
46
Now check if PowerFactory runs smoothly: Start the PowerFactory application (digpf.exe). A Log On dialog pops up as shown in figure 5.7. The settings on the License, Network, Database, and Advanced dialog page are visible but cannot be modified. Insert the Log On settings as follows:
47
Press OK and verify that PowerFactory starts without errors. If you are using a multi-user database proceed with section 6.2.
48
49
Double-click the Administrator.IntUser object in the data manager. A user dialog pops up (figure 6.1). Click on the Change Password button. Enter a new Password. Repeat the password in the Confirm Password field. Press OK to save the changes.
50
51
Click the button Add User... . In the User dialog insert at least the field User name. Click Change Password and fill out the New Password and Confirm Password fields.
Create the new user by pressing OK. A new user object (e.g. Frodo.IntUser) is created and shown in the data manager. Assign the function rights to the new user. Edit the Frodo.IntUser object (figure 6.3). On the License page of the dialog enable the functions the user is allowed to use. Enable at least the Multi-User Database option. Press OK.
52
53
A warning dialog is shown The existing database is now migrated to the new PowerFactory database structure. Depending on the size of the database this may take several minutes up to hours. Please don't interrupt the migration process. Note: The migration resets all changes in these top-level objects: System Library Demo Administrator
Before you migrate, please make sure that these folders dont contain any data you need afterwards. Note: Since the existing database is migrated in-place, after the migration the database can be accessed exclusively by the new PowerFactory version.
54
55