Problem creating database & access it during same install.
Posted: Tue Jul 21, 2009 8:41 am
Hi,
I have an issue in an installer I've made dealing with the creation of a database and failure to access it later in the same install run. The installer is developed using IA 9. The installer has different feature selections for the user, one is to install a database; another is to install files and an NT service. For the database, the installer runs SQL scripts using the Microsoft SQL Server against a SQL Server instance. It successfully creates a database and, using another script, successfully populates specified tables with default values. There are two separate Microsoft SQL Server statements to do this database work. They work every time, providing permissions are correct.
The trouble happens further along during the installation if the user also had selected to install a service in this execution of the installer. During this operation, when executing a custom program that also tries to write to a table in this database, it fails as if it can't make a connection. When investigating the custom program's access from the database side with SQL Profiler, no SQL statements appear, and no login problems are logged.
If the installation is done in 2 passes, i.e the database alone is installed first, then the installer is run again and the service is selected alone and installed (installer is run twice), everything is installed successfully and the service and DB all work afterward.
My question is; does IA 9 do something with a database that it creates, and/or its connection, that would present a problem to a program that tries to also access the same database shortly after it in the same installer run? (some database optimization techniques, etc.)
I've been looking at this and have no good leads.
Any ideas?
Thanks in advance,
ab
I have an issue in an installer I've made dealing with the creation of a database and failure to access it later in the same install run. The installer is developed using IA 9. The installer has different feature selections for the user, one is to install a database; another is to install files and an NT service. For the database, the installer runs SQL scripts using the Microsoft SQL Server against a SQL Server instance. It successfully creates a database and, using another script, successfully populates specified tables with default values. There are two separate Microsoft SQL Server statements to do this database work. They work every time, providing permissions are correct.
The trouble happens further along during the installation if the user also had selected to install a service in this execution of the installer. During this operation, when executing a custom program that also tries to write to a table in this database, it fails as if it can't make a connection. When investigating the custom program's access from the database side with SQL Profiler, no SQL statements appear, and no login problems are logged.
If the installation is done in 2 passes, i.e the database alone is installed first, then the installer is run again and the service is selected alone and installed (installer is run twice), everything is installed successfully and the service and DB all work afterward.
My question is; does IA 9 do something with a database that it creates, and/or its connection, that would present a problem to a program that tries to also access the same database shortly after it in the same installer run? (some database optimization techniques, etc.)
I've been looking at this and have no good leads.
Any ideas?
Thanks in advance,
ab