简体   繁体   English

当我尝试使用WIX安装数据库时出现错误0x80004005

[英]Error 0x80004005 when I tried to install a database with WIX

I'm trying to install a database with WIX. 我正在尝试使用WIX安装数据库。

I've already installed SQL Server 2008 express on my Windows7 (32 Bit). 我已经在Windows7(32位)上安装了SQL Server 2008 Express。 On this installation, TCP/IP is enabled, SQL Server service is running. 在此安装上,启用了TCP / IP,SQL Server服务正在运行。

I'm using SQL Server and Windows authentication for SQL Server. 我正在使用SQL Server和Windows Server的Windows身份验证。 I tried both in the code - I added a user in the component. 我在代码中都尝试过-我在组件中添加了一个用户。

The code is very basic : 该代码非常基本:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" 
     xmlns:sql="http://schemas.microsoft.com/wix/SqlExtension">
    <Product Id="*" Name="NewDatabaseInstaller" Language="1033" 
             Version="1.0.0.0" Manufacturer="My Company" 
             UpgradeCode="17ef693b-3ab5-4788-a6b5-70eeabc13497">
        <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
        <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
        <MediaTemplate EmbedCab="yes" />
        <Feature Id="ProductFeature" Title="NewDatabaseInstaller" Level="1">
            <ComponentGroupRef Id="ProductComponents" />
        </Feature>
    </Product>
    <Fragment>
        <Directory Id="TARGETDIR" Name="SourceDir">
            <Directory Id="ProgramFilesFolder">
                <Directory Id="INSTALLFOLDER" Name="NewDatabaseInstaller" />
            </Directory>
        </Directory>
    </Fragment>
    <Fragment>
        <ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
            <Component Id="cmpSqlDatabase" Guid="{F950605D-AA59-43E6-AB19-9452F6BEC649}" KeyPath="yes">
                <sql:SqlDatabase Id="sqlDatabase_MyDatabase" Server="localhost"
                     Instance="MSSQLSERVER" Database="MyDatabase"
                     CreateOnInstall="yes" DropOnUninstall="yes"
                     ContinueOnError="no" />
            </Component>
        </ComponentGroup>
    </Fragment>
</Wix>

I had the instance name by taping this query in the Management studio : 通过在Management Studio中点击以下查询,我获得了实例名称:

SELECT @@servicename

However, I get an error : 但是,我得到一个错误:

CreateDatabase: Error 0x80004005: failed to create to database: 'MyDatabase', error: unknown error CreateDatabase:错误0x80004005:无法创建到数据库:'MyDatabase',错误:未知错误
Error 26201. Error -2147467259: failed to create SQL database: MyDatabase, error detail: unknown error. 错误26201。错误-2147467259:创建SQL数据库失败:MyDatabase,错误详细信息:未知错误。
MSI (s) (FC!74) [17:43:27:786]: Product: Test -- Error 26201. Error -2147467259: failed to create SQL database: MyDatabase, error detail: unknown error. MSI(s!)(FC!74)[17:43:27:786]:产品:测试-错误26201。错误-2147467259:创建SQL数据库失败:MyDatabase,错误详细信息:未知错误。

CustomAction CreateDatabase returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox) CustomAction CreateDatabase返回了实际错误代码1603(请注意,如果在沙箱中发生翻译,则此错误可能不是100%准确)
Action ended 17:43:27: InstallFinalize. 动作结束17:43:27:InstallFinalize。 Return value 3. 返回值3。

Did I miss something? 我错过了什么?

Thanks ! 谢谢 !

I found my problem. 我发现了问题。 I'm ashamed of my error : I put a instance 我为自己的错误感到as愧:我放了一个实例

Instance="MSSQLSERVER" Instance =“ MSSQLSERVER”

I did not need it. 我不需要 I thought it was the 我以为是

SELECT @@servicename 选择@@ servicename

So, I don't know when we need it... Did someone know? 所以,我不知道我们什么时候需要...有人知道吗?

Thanks Yan for your help! 感谢Yan的帮助!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SSIS 包停止使用错误代码:0x80004005 - SSIS Package stopped working with Error code: 0x80004005 SSIS 错误代码 DTS_E_OLEDBERROR 0x80004005 - SSIS Error Code DTS_E_OLEDBERROR 0x80004005 “ Microsoft Access数据库引擎”结果:0X80004005说明:“外部表不是预期的格式。” - “Microsoft Access database Engine” Hresult: 0X80004005 Description: “External Table is not in expected Format.” Azure SQL服务器数据库[Win32Exception(0x80004005):访问被拒绝] - Azure SQL server database [Win32Exception (0x80004005): Access is denied] SQL Server 2016 R 服务:sp_execute_external_script 返回 0x80004005 错误 - SQL Server 2016 R Services: sp_execute_external_script returns 0x80004005 error SQL Server批量插入转换错误MSG 4864 HRESULT 0x80004005 - SQL Server Bulk Insert conversion error MSG 4864 HRESULT 0x80004005 SSIS 包创建 Hresult:0x80004005 说明:“登录超时已过期”错误 - SSIS package creating Hresult: 0x80004005 Description: “Login timeout expired” error 有人知道为什么 SQL Server 2005 抛出“&#39;SQLOLEDB&#39; failed with no error message available, result code: E_FAIL(0x80004005).”? - Anybody know why SQL Server 2005 throws "'SQLOLEDB' failed with no error message available, result code: E_FAIL(0x80004005). "? SSIS Excel源错误:[Excel源[1]]错误:SSIS错误代码DTS_E_OLEDBERROR。 发生OLE DB错误。 错误代码:0x80004005 - SSIS Excel Source error: [Excel Source [1]] Error: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80004005 [Win32Exception(0x80004005):系统找不到指定的文件] - [Win32Exception (0x80004005): The system cannot find the file specified]
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM