|
16.01.2006 Spaix Inside: How To Connect Spaix Classic V2 to an SQL Server in Five Minutes |
||||||||||||||||||||||||||||||||
|
By default, Spaix V2 comes with Access databases. To achieve higher reliability and performance, a Microsoft SQL server can be applied. The necessary configuration steps are explained here.
1. Data ImportImport the Spaix V2 Databases into the SQL Server instance. There are two ways how to do that. a) Every MDB file can be converted into a database. Each database must be named as the MDB file, for example all tables from vsSpaix2.MDB are imported into database vsSpaix2, and so on. This is the standard case. b) All tables from all three MDB files vsSpaix2.mdb, vsProgram.MDB and vsProjects.MDB are combined into one, single SQL Server database. In some situations, this may be helpful, since it allows more than one Spaix V2 database within the same SQL Server instance. It is a good idea, to check all the indexes now and set them accordingly to the indexes in the MDB file. In order to keep the entire import process as easy as possible, VSX – VOGEL SOFTWARE offers a small tool, the "Spaix® Database Migrator". This wizard-style utility does most of the import, table and index creation stuff for you, without bothering you too much with detailed questions. 2. Edit the Spaix2Aw.INILocate the Spaix2Aw.INI in the folder, where Spaix2Aw.EXE is located. Rename the existing [Path] section into [Path.saved]. Now create a new section as follows: [Path] LocalINI=0 DatDir=path-to-data-directory The DatDir value points to the folder, where vsSpaix2Cfg.MDB (the license file) and where the PICTURE- and DOCS-folders are located. For example, this value can be copied from the original [Path] section. 3. Edit the SpaixLocalSrv.INI fileThe SpaixLocalSrv.INI file can be located in two places: - the Windows System folder - the Spaix installation folder, where Spaix2Aw.exe and Spaix2Db.exe are located Spaix looks into the SpaixLocalSrv.INI and searches a section which is named like the EXE itself. For example, the Pump Selector program Spaix2Aw.EXE will need a section [Spaix2Aw]. The INI file in the EXE folder has precedence. In other words, the application EXE looks first for the section [Spaix2Aw] in the SpaixLocalSrv.INI, located in the same folder as the EXE itself. If it is not there, the SpaixLocalSrv.INI located in the Windows System folder is used. Analogously the same procedure happens with Spaix2Db.exe, which looks for a section [Spaix2Db] For this example, I assume your SQL-Server instance is named SQLSRV. Depending on which case a) or b) has been chosen in step 1, edit that section as follows: Case a) - Every MDB file in it's own database [Spaix2Aw] Replace=Database Provider=SpaixConnString OnlyDatabaseName=1 LockType=0 Licensee=path to license file LicenseFile=full filename of license file [SpaixConnString] Provider=SQLOLEDB Data Source=SQLSRV Database=vsSpaix2 UID=johndoe PWD=topsecret Case b) - All tables in one database [Spaix2Aw] Replace=dummy Provider=SpaixConnString OnlyDatabaseName=1 LockType=0 Licensee=path to license file LicenseFile=full filename of license file [SpaixConnString] Provider=SQLOLEDB Data Source=SQLSRV UID=johndoe PWD=topsecret In both cases, the second section is connected to the first section through the Provider=SpaixConnString line. The difference between the two methods lies in the Replace= line of the first section. In case a), the value is "Database". This value matches a line in the second section (Connection String), that identifies the database name. Now the program knows, how the database name in the connection string can be changed. Case b) uses the exact opposite. The line Replace=dummy is required, but there is no "dummy" entry in the Connection string section. Therefore, Spaix will use the string nearly unchanged. In fact, Spaix does append a value like "dummy=vsSpaix2" to the string, but normally this will be ignored completely. So be a little careful about that "dummy" value. If you own the Spaix V2 Database program, you need to create an identical first section [Spaix2Db]. The connection string can be shared, so you don't need a duplicate. The lines “Licensee=license folder” and “LicenseFile=full license filename” are mutually exclusive. Due to some restrictions on some systems, we recommend the usage of the LicenseFile setting over the Licensee setting. Furthermore, if a valid LicenseFile setting is specified, Licensee will be ignored. Using integrated Windows Authentication Instead of using username and password combination, Spaix also supports Windows Authentication for SQL-Server connections. In this case, you have to change the [SpaixConnString] section as follows: [SpaixConnString] Provider=SQLOLEDB Data Source=SQLSRV Database=vsSpaix2 Integrated Security=SSPI The UID and PWD lines are removed, and the authentication mechanism is specified instead. The Windows Authentication mechanism will use the credentials of the current Windows user. Please note, that the SQL Server must be configured accordingly in order to accept this authentication type. 4. Start Spaix … and everything should workIf you did everything right, that is. If not, please check the folders, the section names and each INI entry mentioned above. It is possible to set up the data server and some other configuration options remotely, but that would clearly extend the range of our five-minute limit. Please refer to the appropriate documents on our website. We hope this information is helpful when working with Spaix. If you have questions on this or other subject matters our expert software support team is here to help you. Simply send an e-mail to: support@vsx.net About Spaix Inside Spaix Inside is a series of white papers by developers, members of software support and power users for the efficient use of the Spaix product family to select and configure pumps and to generate quotes. Spaix® is a product by VSX - VOGEL SOFTWARE GmbH spaix.com |
| |||||||||||||||||||||||||||||||
| [ Home ] [ Pump Magazine ] [ Virtual exhibition ] [ Encyclopedia ] [ PumpSelector ] [ Impressum ] |