Attach database in Windows Vista

Got a problem you cannot solve? Try here.
dhouse
Posts: 5
Joined: Fri Sep 14, 2007 11:25 pm
Contact:

Attach database in Windows Vista

Postby dhouse » Fri Nov 16, 2007 5:32 am

Hi,
I am using IA7 to create an installer that needs to attach sql database to sql express. The installer works well in Windows 2003 and XP Prof but the database fails to attach in Windows Vista.

Below is the sql script that i use:

USE [master]
GO
CREATE DATABASE [TEST] ON
( FILENAME = N'$TARGETDIR$\\DataFiles\\EEMS2007.mdf' ),
( FILENAME = N'$TARGETDIR$\\DataFiles\\EEMS2007_Log.ldf' )
FOR ATTACH
GO


Is there any advise from the IA team?

Gizm0
Posts: 339
Joined: Wed Nov 09, 2005 8:47 pm

Postby Gizm0 » Fri Nov 16, 2007 4:29 pm

Verify that the MSSQL.1 (default instance folder) is accessible from the user you're trying to make the attach.
Panagiotis Kefalidis
Software Design Team Lead
\"In order to succeed, your desire for success should be greater than your fear of failure\"
InstallAware Software Corporation

dhouse
Posts: 5
Joined: Fri Sep 14, 2007 11:25 pm
Contact:

Postby dhouse » Sat Nov 17, 2007 2:15 am

The data files are created on the $TARGETDIR$\\DataFiles\\ and not the default locations (which i am not sure how can it be done). I have assigned Everyone to Read and Write permission to this folder $TARGETDIR$\\DataFiles.

I can manually attached the files using SQL studio management express. Is there anything else that i miss out?


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 21 guests