Multi-homed system in MS SQL Serverby Frank G. Vandervelpen
Whitepaper SQL_DRV How to make programs dynamic for several MS SQL Databases with the same database structure
Installation of SQL Server 6.5 The installation of SQL Server 6.5 was a standard installation. We have loaded support pack 5a on it, and we have increased the master database device to 1.25 GB. (i.e. the master.dat)
Installation of the SQL_DRV We have installed Mertech's Flex2SQL version 2.0 for DataFlex 3.1d Console mode and the Visual DataFlex Flex2SQL version 2.0 for Visual DataFlex version 6.
We have seen some conflicts with msvcrt.dll with vdf6. It should not give any problems with VDF5.1. The conversion We have migrated the DataFlex files from the filelist towards SQL Server through the standard migration utility. Therefore, we have used the account sa and the appropriate password. We have selected a filelist and an environment file (cfg) to determine the source path.
Ways of converting a multi-homed system Suppose following directory structure when migrating from DataFlex:
When we migrate these towards SQL Server 6.5 we can't place these things into databases. So the tables will be placed in separate tables. We have tested relationships over several SQL Databases and this works because we have defined them in the .int file. However, the DATABASE_SPACE_NAME is not defining which SQL-database to use. This is defined in the .td file. However, these are necessary to open the convenient SQL Database.
Therefore, making it dynamic was not the easiest part. What we have done is first open all mutual (shared tables). Once that we have done this, we are defining the new SQL-Database to use for the company-dependent tables.
This leads to the situation where we have the following code:
where sValue is the name of the SQL-Database. All files opened after the Set_database_name will try to open the table in the SQL-Database indicated, rejecting the parameter in the .td file. Don't forget to close the file before reopening it to get the new SQL-Database.
On the left hand site is the layout from a point of view of the SQL Server |
||||||||||||
Copyright © 1999 - 2024 VDF-GUIdance on all material published, for details see our Disclaimer. |