Hi,
I want to create a msi that installs a new DB on an existing sql server (without DBs installed on it).
in the aip file I created a script that creates the new DB (Phone). I created the script by a generated script of the DB from another environment.
While running the exe in the target machine, I get the following error:
"Directory lookup for the file "E\ProgramFiles\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\...\Phone.mdf" failed with the operating system error 3(The system cannot find the path specified).)"
Of course the file won't be found because I run the query on a new machine.
How can I create the DB with all its tables instead of mdi file?
Thanks
The script is:
USE [master]
GO
/****** Object: Database [Phone] Script Date: 04/19/2015 14:22:49 ******/
CREATE DATABASE [Phone] ON PRIMARY
( NAME = N'Phone', FILENAME = N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Phone.mdf' , SIZE = 1189248KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
LOG ON
( NAME = N'Phone_log', FILENAME = N'E:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\Phone_1.ldf' , SIZE = 2304KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [Phone] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [Phone].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [Phone] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [Phone] SET ANSI_NULLS OFF
GO
ALTER DATABASE [Phone] SET ANSI_PADDING OFF
GO
.
.
.
.
FOLLOW US
Get the latest news in Application Packaging