Run Sql script after installing SQL Server 2008 Express SP2 - Advanced Installer Community
advhope
Posts: 1
Joined: Thu May 12, 2016 7:38 am

Run Sql script after installing SQL Server 2008 Express SP2

Dear Advanced Installer Software company,

I used Installaware to build our Setup project but it costs the disk memory ( > 20GB) so I want to switch to your software. I just download your software and test something. It seems your product is lighting weight and outperforms Installaware about compress speed and prerequisites installation, easier to set sql script prameters... In out testing, i need to install SQL 2008 Express SP2 then install a sql script on the SQL Server 2008 Express Sp2 have installed.
Sql server 2008 Express SP2 was successfully installed with install command lines (Basic UI and progress - Bootstrapper UI Level ):

/q /IACCEPTSQLSERVERLICENSETERMS /ACTION=Install /FEATURES=SQLEngine /INSTANCENAME=SQLEXPRESS /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE"

But when installer runs Sql script, i got the message: ODBC Connect: timeout exceeded. I couln't manage to fix this error.

Note, with this script, the installer can install it successful if SQL Server 2008 Express SP2 was installed by manual
The content of Sql script is:

Code: Select all

USE [master]
GO

CREATE DATABASE [EMS] ON  PRIMARY 
			( NAME = N'EMS', FILENAME = N'D:\EMS DATA CENTER\EMS.mdf' , SIZE = 3328KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
			LOG ON 
			( NAME = N'EMS_log', FILENAME = N'D:\EMS DATA CENTER\EMS_log.LDF' , SIZE = 6272KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO


ALTER DATABASE [EMS] SET COMPATIBILITY_LEVEL = 100
GO

IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [EMS].[dbo].[sp_fulltext_database] @action = 'enable'
end
GO

ALTER DATABASE [EMS] SET ANSI_NULL_DEFAULT OFF 
GO

ALTER DATABASE [EMS] SET ANSI_NULLS OFF 
GO

ALTER DATABASE [EMS] SET ANSI_PADDING OFF 
GO

ALTER DATABASE [EMS] SET ANSI_WARNINGS OFF 
GO

ALTER DATABASE [EMS] SET ARITHABORT OFF 
GO

ALTER DATABASE [EMS] SET AUTO_CLOSE OFF 
GO

ALTER DATABASE [EMS] SET AUTO_CREATE_STATISTICS ON 
GO

ALTER DATABASE [EMS] SET AUTO_SHRINK OFF 
GO

ALTER DATABASE [EMS] SET AUTO_UPDATE_STATISTICS ON 
GO

ALTER DATABASE [EMS] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO

ALTER DATABASE [EMS] SET CURSOR_DEFAULT  GLOBAL 
GO

ALTER DATABASE [EMS] SET CONCAT_NULL_YIELDS_NULL OFF 
GO

ALTER DATABASE [EMS] SET NUMERIC_ROUNDABORT OFF 
GO

ALTER DATABASE [EMS] SET QUOTED_IDENTIFIER OFF 
GO

ALTER DATABASE [EMS] SET RECURSIVE_TRIGGERS OFF 
GO

ALTER DATABASE [EMS] SET  DISABLE_BROKER WITH ROLLBACK IMMEDIATE 
GO

ALTER DATABASE [EMS] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO

ALTER DATABASE [EMS] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO

ALTER DATABASE [EMS] SET TRUSTWORTHY OFF 
GO

ALTER DATABASE [EMS] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO

ALTER DATABASE [EMS] SET PARAMETERIZATION SIMPLE 
GO

ALTER DATABASE [EMS] SET READ_COMMITTED_SNAPSHOT OFF 
GO

ALTER DATABASE [EMS] SET HONOR_BROKER_PRIORITY OFF 
GO

ALTER DATABASE [EMS] SET  READ_WRITE 
GO

ALTER DATABASE [EMS] SET RECOVERY FULL 
GO

ALTER DATABASE [EMS] SET  MULTI_USER 
GO

ALTER DATABASE [EMS] SET PAGE_VERIFY CHECKSUM  
GO

ALTER DATABASE [EMS] SET DB_CHAINING OFF 
GO
	
USE [EMS]
GO
/****** Object:  Table [dbo].[Data]    Script Date: 11/25/2015 15:50:22 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Data]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Data](
	[DataID] [int] IDENTITY(1,1) NOT NULL,
	[DataTime] [datetime] NOT NULL,
	[DataT1] [float] NULL,
	[DataH1] [float] NULL,
	[DataT2] [float] NULL,
	[DataH2] [float] NULL,
	[DataT3] [float] NULL,
	[DataH3] [float] NULL,
	[DataNo] [float] NULL,
	[DataNo2] [float] NULL,
	[DataT1Hi] [float] NULL,
	[DataT1Lo] [float] NULL,
	[DataT2Hi] [float] NULL,
	[DataT2Lo] [float] NULL,
	[DataT3Hi] [float] NULL,
	[DataT3Lo] [float] NULL,
	[DataNoHi] [float] NULL,
	[DataNoLo] [float] NULL,
	[DataNo2Hi] [float] NULL,
	[DataNo2Lo] [float] NULL,
 CONSTRAINT [PK_Data] PRIMARY KEY CLUSTERED 
(
	[DataID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]
END
GO
And with Installaware, it allows to install custom .net assemblies from anywhere to GAC, not only assemblies from Application folder like Adavanced Installer. Does your software support this feature?

Pls tell me, the price for Enterprise version is Fixed?

Thank you in advance and best regards,
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Run Sql script after installing SQL Server 2008 Express SP2

Hello and welcome to our forums,

Thank you for your positive words about Advanced Installer.

You may get the ODBC timeout error if the ODBC parameters (server name, user, password, etc) you have configured, for your SQL Connection in our "SQL Database" page, are not correctly. Therefore the ODBC connection will fail. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?
And with Installaware, it allows to install custom .net assemblies from anywhere to GAC, not only assemblies from Application folder like Adavanced Installer. Does your software support this feature?
We also support installing assemblies to GAC from every folder contained in our "Files and Folders" page. Just make sure when you try to add the assembly file, you set the"Feature filter" combo box to "All features" in the select file dialog.
Pls tell me, the price for Enterprise version is Fixed?
Yes. However, if you are interested in multiple Advanced Installer licenses of the same edition you can benefit from our volume discount. You can check our volume discounts on our "Purchase" page.

If there is anything we can assist you with just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”