Bugs item #1513198, was opened at 2006-06-27 10:56
Message generated for change (Comment added) made by vgebrev
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1513198&group_id=105970

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: documentation
Group: v3.0
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Mike Goatly (mikegoatly)
Assigned to: Rob Mensching (robmen)
Summary: SqlDatabase default server not working

Initial Comment:
When using ., (local) or localhost as the server name 
in the SqlDatabase element, the generated MSI hangs 
for a while while installing (it looks like a SQL 
connect timeout) and then reports:

Error -2147467259: failed to create SQL database:x, 
error default: unknown error.

If you explicitly set the server name, the database 
is correctly created.

Note that I also tested this on a WinXP box with a 
named SQL Server instance, and using . or (local) as 
the server name with the instance name specified 
worked fine.

Here's a snippet of code that I use:

<Directory Id='TARGETDIR' Name='SourceDir'>
        <Component Id='ClientDatabase' Guid='xxxxxxxx-
xxxx-xxxx-xxxx-xxxxxxxxxxxx' DiskId='1'>
                <SqlDatabase 
        Id='ClientDatabase' 
        Database='[DATABASENAME]' 
        Server='[SQLSERVER]'  
        Instance='[SQLINSTANCE]'
        CreateOnInstall='yes' 
        ConfirmOverwrite='yes' >
                        <SqlScript 
Id='ExecuteStructureSql' ExecuteOnInstall='yes' 
BinaryKey='StructureSql' Sequence='1' />
                        <SqlScript 
Id='ExecuteGeneratedSql' ExecuteOnInstall='yes' 
BinaryKey='GeneratedSql' Sequence='2' />
                </SqlDatabase>
        </Component>
</Directory>

----------------------------------------------------------------------

Comment By: Velislav Gebrev (vgebrev)
Date: 2007-04-23 17:40

Message:
Logged In: YES 
user_id=1689124
Originator: NO

I ran into the same problem - The database would not be created on the
default instance, whether I used ., localhost or (local), while a named
instance would work just fine. (For reference - I tried SQL Server 2005, w/
SP1, w/ SP2 and Express)

Eventually I found a solution:

Run the SQL Server Surface Area Configuration (You should have a shortcut
in Start > All Prorgams > SQL Server 2005 > Configuration Tools, the EXE
should be at %ProgramFiles%\Microsoft SQL Server\90\Shared\SqlSAC.exe)

Go to 'Surface Area Configuration for Services and Connections', go to
MSSQLSERVER > Database Engine > Remote Connections) and make sure the
'Local and remote connections' radio button is checked and select the
appropriate option that applies to you ('Using both TCP/IP and names pipes'
should ensure that localhost, (local) and . are all resolved correctly)

Hope this helps someone, because it frustrated me immensely :)

----------------------------------------------------------------------

Comment By: Rob Mensching (robmen)
Date: 2007-01-09 02:36

Message:
Logged In: YES 
user_id=991639
Originator: NO

The following works for me just fine:

<SqlDatabase Id="LocalMasterDB" Server="(local)" Database="master" />

----------------------------------------------------------------------

Comment By: Scott Kurtzeborn (scotk)
Date: 2006-12-20 06:42

Message:
Logged In: YES 
user_id=1296992
Originator: NO

Please be more specific.  In the second scenario you call out WinXP.  What
OS was the first scenario on?  A different OS?

What tools support ., (local) or localhost?  What would this be valid? 
Have you tried [ComputerName]?

Because this isn't blocking, we'll address this in WiX v3.

----------------------------------------------------------------------

Comment By: Willem Meints (willemm)
Date: 2006-10-16 21:12

Message:
Logged In: YES 
user_id=636503

I get the same problem, while trying to install a database 
on the local MSDE installtion with the instance name 
configured.

Snippet:

<SqlDatabase Id="ProgramDB" Database="WinkelManagement" 
Server="[SQLSERVER]" User="SqlUser"
                         CreateOnInstall="yes" 
DropOnUninstall="no" Instance="[SQLINSTANCE]">
              <SqlScript BinaryKey="SqlInstallFile" 
Id="InstallationScript"
                         ExecuteOnInstall="yes" 
ContinueOnError="yes"/>
            </SqlDatabase>

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=642714&aid=1513198&group_id=105970

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-devs

Reply via email to