网络部件和没有 SQL Express 的用户实例

发布于 2024-08-17 00:34:52 字数 602 浏览 3 评论 0原文

我遇到了 SQL 错误的困难

由于启动用户实例进程失败,无法生成 SQL Server 的用户实例。连接将被关闭。

无论我做什么(是的,我在本地帐户中运行 SQL Express,并删除了本地配置文件上的 SQLExpress 文件夹),Windows 2008 下的用户总是会遇到此问题,有时在 Vista 上也会遇到此问题(不是那么频繁)。

我确实需要找到其他想法!

我正在考虑转向SQLite(因为有一个很棒的Provider),甚至使用 XML 文件代替。

我所做的就是将 WebPart 作为面板进行管理,每个用户都可以修改其可见性和位置。编辑完成后,它会自动保存到用户实例中。

我只需要此功能,但我找不到删除 SQL Express 2005 用户实例的好方法...有什么想法吗?

非常感谢任何帮助,谢谢

I'm having hard times with the SQL Error

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.

No matter what I do (yes, I have the SQL Express running in the Local account and deleted the SQLExpress folder on Local Profile), users under Windows 2008 always get this issue and sometimes on Vista as well (not that frequent).

I do need to find other ideas!

I was thinking move to SQLite (as there is a wonderful Provider) or even use XML file instead.

All I do is manage WebParts as panels that each user can modify their visibility and place. When done editing it saves automatically into the user instance.

I need only this functionality but I can't find a decent way to drop SQL Express 2005 User Instances ... any ideas?

Any help is highly appreciated, Thank you.

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

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

发布评论

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

评论(2

偏爱你一生 2024-08-24 00:34:52

我在网络托管公司工作,其中 SQL Express 用于免费托管用户。我们从未遇到过这个问题,所以它一定是一些奇怪的参数组合。

我建议进行一些探测

  • 使用进程监视器进行跟踪发生错误时 SQL Express 尝试访问哪些文件/目录/注册表项。使用此实用程序您还可以找到访问权限问题。

  • 查看位于 C:\Documents and Settings\user_name\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS 中的 SQL Express 日志以获取一些其他信息

  • 确保您启用了在 SQL Express 默认实例上运行此操作的用户实例
    sp_configure 'userInstancesenabled', '1'

  • 为了确保我会尝试列出所有用户实例并最终尝试连接到一个。

    要列出连接到默认实例(通常名为 COMPUTER\SQLEXPRESS)的用户实例并运行:
    选择实例管道名称
    来自 sys.dm_os_child_instances

    然后通过 sqlcmd 实用程序使用 instance_pipe_name 中的值:
    C:>sqlcmd -S np:\.\pipe\69651E0A-5550-46\tsql\query

    现在您已连接到用户实例。尝试执行一些 DML。

  • 您可能这样做了,但一定要看看 Windows 事件查看器

如果探测没有任何结果,您始终可以使用 snandard 方式创建数据库SQL Express 默认实例(连接到服务器、创建数据库、设置连接字符串并在解决方案中使用它而不是 database.mdf)。

I worked for webhosting company where SQL Express was used for freehosting users. We never experienced this problem so it must be some weird combination of parameters.

I suggest to do some probing

  • Use Process Monitor to trace which files/directories/registry entries is SQL Express trying to access when the error occurs. Using this utility you can also locate problems with access rights.

  • Look into SQL Express log located in C:\Documents and Settings\user_name\Local Settings\Application Data\Microsoft\Microsoft SQL Server Data\SQLEXPRESS for some additional info

  • Make sure you have user instances enabled running this on SQL express default instance
    sp_configure 'user instances enabled', '1'

  • Just for sure I would try to list all user instances and eventually try to connect to one.

    To list user instances connect to default one (usually named COMPUTER\SQLEXPRESS) and run:
    SELECT instance_pipe_name
    FROM sys.dm_os_child_instances
    .

    Then use value in instance_pipe_name with sqlcmd utility:
    C:>sqlcmd -S np:\.\pipe\69651E0A-5550-46\tsql\query.

    Now you are connected to user instance. Try to execute some DML.

  • You probably did this but for sure have a look in Windows Event Viewer

If nothing comes up from probing you can always create database using snandard way on SQL Express default instance (connect to server, create database, setup connection string and use it instead of database.mdf in your solution).

往昔成烟 2024-08-24 00:34:52

使用“microsoft sql server Compact 3.5”为您提供几乎所有正常的 sqlexpress 功能,同时无需安装真正的服务器即可轻松移植。

http://www.microsoft.com/Sqlserver/2005/en/ us/compact.aspx

除非您正在开发大型且复杂的应用程序(大量存储过程、触发器等),否则这是一种很好的工作方式。

以下是一些其他信息:

http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx

Using "microsoft sql server compact 3.5" gives you almost any of the normal sqlexpress functionality while being easily portable without a real server to be put on.

http://www.microsoft.com/Sqlserver/2005/en/us/compact.aspx

Unless you're doing a big and complex application (lots of stored procedures, triggers and such), its a nice way to work.

Here's some other information :

http://blogs.msdn.com/stevelasker/archive/2006/11/27/sql-server-compact-edition-under-asp-net-and-iis.aspx

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