Lightswitch 连接到 SQL 问题

发布于 2024-11-26 17:39:37 字数 6339 浏览 1 评论 0原文

我正在尝试从 lightswitch 连接到 sql2008 express。我尝试了一个简单的表单,但每次尝试保存时,都会收到此错误:

底层提供程序在打开时失败。
内部异常消息:
由于启动用户实例进程失败,无法生成 SQL Server 的用户实例。连接将被关闭。

我检查了 SQL 日志,下面是我收到的错误:

2011-07-27 16:48:03.34 Server      Error: 17156, Severity: 16, State: 1.
2011-07-27 16:48:03.34 Server      initeventlog: Could not initiate the EventLog Service for the key 'AE98537F-92A7-41', last error code is 2.
2011-07-27 16:48:03.34 Server      Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) 
    Mar 29 2009 10:11:52 
    Copyright (c) 1988-2008 Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )
2011-07-27 16:48:03.34 Server      (c) 2005 Microsoft Corporation.
2011-07-27 16:48:03.34 Server      All rights reserved.
2011-07-27 16:48:03.34 Server      Server process ID is 11732.
2011-07-27 16:48:03.34 Server      System Manufacturer: 'Sony Corporation', System Model: 'VPCF116FGI'.
2011-07-27 16:48:03.34 Server      Authentication mode is WINDOWS-ONLY.
2011-07-27 16:48:03.34 Server      Logging SQL Server messages in file 'C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log'.
2011-07-27 16:48:03.34 Server      Registry startup parameters: 
     -d C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\master.mdf
     -e C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG
     -l C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2011-07-27 16:48:03.34 Server      Command Line Startup Parameters:
     -U C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Template Data
     -d C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\master.mdf
     -l C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\mastlog.ldf
     -e C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log
     -c
     -S SQLEXPRESS
     -s AE98537F-92A7-41
     -w 60
2011-07-27 16:48:03.36 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2011-07-27 16:48:03.36 Server      Detected 8 CPUs. This is an informational message; no user action is required.
2011-07-27 16:48:03.38 Server      Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
2011-07-27 16:48:03.38 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2011-07-27 16:48:03.42 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff Active CPU mask: 0x00000000000000ff. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2011-07-27 16:48:03.44 spid6s      Starting up database 'master'.
2011-07-27 16:48:03.59 spid6s      Error: 5598, Severity: 16, State: 2.
2011-07-27 16:48:03.59 spid6s      FILESTREAM feature is not supported on user instances.
2011-07-27 16:48:03.59 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'.
2011-07-27 16:48:03.60 spid6s      SQL Trace ID 1 was started by login "sa".
2011-07-27 16:48:03.61 spid6s      Starting up database 'mssqlsystemresource'.
2011-07-27 16:48:03.63 spid6s      The resource database build version is 10.00.2531. This is an informational message only. No user action is required.
2011-07-27 16:48:04.11 spid9s      Starting up database 'model'.
2011-07-27 16:48:04.11 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\AE98537F-92A7-41\tsql\query ].
2011-07-27 16:48:04.11 Server      Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2011-07-27 16:48:04.12 spid6s      Server name is '7LPT-user-name\AE98537F-92A7-41'. This is an informational message only. No user action is required.
2011-07-27 16:48:04.12 spid9s      Error: 17204, Severity: 16, State: 1.
2011-07-27 16:48:04.12 spid9s      FCB::Open failed: Could not open file C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\model.mdf for file number 1.  OS error: 2(The system cannot find the file specified.).
2011-07-27 16:48:04.12 spid9s      Error: 5120, Severity: 16, State: 101.
2011-07-27 16:48:04.12 spid9s      Unable to open the physical file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\model.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
2011-07-27 16:48:04.12 spid9s      Error: 17207, Severity: 16, State: 1.
2011-07-27 16:48:04.12 spid9s      FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2011-07-27 16:48:04.12 spid9s      File activation failure. The physical file name "C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\modellog.ldf" may be incorrect.
2011-07-27 16:48:04.12 spid9s      Error: 945, Severity: 14, State: 2.
2011-07-27 16:48:04.12 spid9s      Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2011-07-27 16:48:04.12 spid9s      Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2011-07-27 16:48:04.12 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

我检查了 SQL Server 代理 (SQLExpress),错误发生后它被关闭。

我正在 Win7 64 位上运行 VS-2010、SQL 2008 和 SQL 2008 Express。

I am trying to connect from lightswitch to sql2008 express. I tried a simple form, but everytime I try to save, I get this error:

The underlying provider failed on Open.
Inner exception message:
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.

I checked the SQL Log and below is the error that I am getting:

2011-07-27 16:48:03.34 Server      Error: 17156, Severity: 16, State: 1.
2011-07-27 16:48:03.34 Server      initeventlog: Could not initiate the EventLog Service for the key 'AE98537F-92A7-41', last error code is 2.
2011-07-27 16:48:03.34 Server      Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64) 
    Mar 29 2009 10:11:52 
    Copyright (c) 1988-2008 Microsoft Corporation
    Express Edition (64-bit) on Windows NT 6.1 <X64> (Build 7600: )
2011-07-27 16:48:03.34 Server      (c) 2005 Microsoft Corporation.
2011-07-27 16:48:03.34 Server      All rights reserved.
2011-07-27 16:48:03.34 Server      Server process ID is 11732.
2011-07-27 16:48:03.34 Server      System Manufacturer: 'Sony Corporation', System Model: 'VPCF116FGI'.
2011-07-27 16:48:03.34 Server      Authentication mode is WINDOWS-ONLY.
2011-07-27 16:48:03.34 Server      Logging SQL Server messages in file 'C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log'.
2011-07-27 16:48:03.34 Server      Registry startup parameters: 
     -d C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\master.mdf
     -e C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Log\ERRORLOG
     -l C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA\mastlog.ldf
2011-07-27 16:48:03.34 Server      Command Line Startup Parameters:
     -U C:\Program Files\Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\Template Data
     -d C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\master.mdf
     -l C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\mastlog.ldf
     -e C:\Users\user-name\AppData\Local\Microsoft\Microsoft SQL Server Data\SQLEXPRESS\error.log
     -c
     -S SQLEXPRESS
     -s AE98537F-92A7-41
     -w 60
2011-07-27 16:48:03.36 Server      SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.
2011-07-27 16:48:03.36 Server      Detected 8 CPUs. This is an informational message; no user action is required.
2011-07-27 16:48:03.38 Server      Perfmon counters for resource governor pools and groups failed to initialize and are disabled.
2011-07-27 16:48:03.38 Server      Using dynamic lock allocation.  Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node.  This is an informational message only.  No user action is required.
2011-07-27 16:48:03.42 Server      Node configuration: node 0: CPU mask: 0x00000000000000ff Active CPU mask: 0x00000000000000ff. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.
2011-07-27 16:48:03.44 spid6s      Starting up database 'master'.
2011-07-27 16:48:03.59 spid6s      Error: 5598, Severity: 16, State: 2.
2011-07-27 16:48:03.59 spid6s      FILESTREAM feature is not supported on user instances.
2011-07-27 16:48:03.59 spid6s      FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'SQLEXPRESS'.
2011-07-27 16:48:03.60 spid6s      SQL Trace ID 1 was started by login "sa".
2011-07-27 16:48:03.61 spid6s      Starting up database 'mssqlsystemresource'.
2011-07-27 16:48:03.63 spid6s      The resource database build version is 10.00.2531. This is an informational message only. No user action is required.
2011-07-27 16:48:04.11 spid9s      Starting up database 'model'.
2011-07-27 16:48:04.11 Server      Server local connection provider is ready to accept connection on [ \\.\pipe\AE98537F-92A7-41\tsql\query ].
2011-07-27 16:48:04.11 Server      Dedicated administrator connection support was not started because it is disabled on this edition of SQL Server. If you want to use a dedicated administrator connection, restart SQL Server using the trace flag 7806. This is an informational message only. No user action is required.
2011-07-27 16:48:04.12 spid6s      Server name is '7LPT-user-name\AE98537F-92A7-41'. This is an informational message only. No user action is required.
2011-07-27 16:48:04.12 spid9s      Error: 17204, Severity: 16, State: 1.
2011-07-27 16:48:04.12 spid9s      FCB::Open failed: Could not open file C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\model.mdf for file number 1.  OS error: 2(The system cannot find the file specified.).
2011-07-27 16:48:04.12 spid9s      Error: 5120, Severity: 16, State: 101.
2011-07-27 16:48:04.12 spid9s      Unable to open the physical file "C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\model.mdf". Operating system error 2: "2(The system cannot find the file specified.)".
2011-07-27 16:48:04.12 spid9s      Error: 17207, Severity: 16, State: 1.
2011-07-27 16:48:04.12 spid9s      FileMgr::StartLogFiles: Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.
2011-07-27 16:48:04.12 spid9s      File activation failure. The physical file name "C:\Program Files (x86)\Microsoft SQL Server\MSSQL.1\MSSQL\Template Data\modellog.ldf" may be incorrect.
2011-07-27 16:48:04.12 spid9s      Error: 945, Severity: 14, State: 2.
2011-07-27 16:48:04.12 spid9s      Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.
2011-07-27 16:48:04.12 spid9s      Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.
2011-07-27 16:48:04.12 spid9s      SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

I checked the SQL Server Agent (SQLExpress) and it is getting turned off after the error occurs.

I'm running VS-2010, with SQL 2008 and SQL 2008 Express on Win7 64 bit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

禾厶谷欠 2024-12-03 17:39:37

我怀疑这与我遇到的问题类似。我安装了 Visual Studio,但没有安装 SQL Server Express,因为我的开发计算机上已经安装了 SQL Server 2008。后来我安装了 SQL Server Express,但我无法让 Lightswitch 完全像您所描述的那样工作。我删除了两个版本的 SQL Server。重新安装 SQL Server Express 和 Lightswitch 之后可以正常工作。我没有再次重新安装SQL Server 2008。我正在使用网络上的真实服务器来完成这项工作。

I suspect this is similar to the issue I ran into. I installed Visual Studio without installing SQL Server Express because I already had SQL Server 2008 installed on my development computer. Later I installed SQL Server Express but I was unable to get Lightswitch to work at all similarly to what you describe. I removed both versions of SQL Server. Reinstalled SQL Server Express and Lightswitch worked correctly after that. I have not re-installed SQL Server 2008 again. I'm using a real server on the network for that work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文