Frage

I'm trying to create a setup file using InstallShield 2010 for my project which uses SQL Server 2008

Everything is ok all necessary programs are being installed but when I try to install my project it will give this error

Error 27506. Error executing SQL script dbName.sql Line 9
Create Database failed. some file names listed could not be created Check related errors (1802)

I searched it says that my path in SQL script does not exist but how to make database to be created in installation folder of program itself?

Here first few lines of my SQL script

USE [master]
GO

/****** Object:  Database [InventoryDB]    Script Date: 08/11/2012 19:01:00 ******/
CREATE DATABASE [InventoryDB] ON  PRIMARY 
( NAME = N'InventoryDB', FILENAME = N'C:\Inventory\DB\InventoryDB.mdf' , SIZE = 2048KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'InventoryDB_log', FILENAME = N'C:\Inventory\DB\InventoryDB_log.ldf' , SIZE = 2816KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO

ALTER DATABASE [InventoryDB] SET COMPATIBILITY_LEVEL = 100
GO

please help

War es hilfreich?

Lösung

I think that your setup app should create the path C:\INVENTORY\DB before trying to create the database there.

Andere Tipps

I got the same problem. I rename the old .mdf and .ldf files and work.

Please make sure InventoryDB.mdf' and InventoryDB_log.ldf' file does not exist already.

Also make sure that sql account have below persmission

securityadmin dbcreator db_owner database role membership

I resolved mine by checking the installation log files i had available. Mine was that the Log and MDF files already existed in the directory. Deleted these files, and installed successfully.

Regards, Kiran

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top