要多连接其他计算机上的.mdf文件

编程入门 行业动态 更新时间:2024-10-08 13:35:43
本文介绍了要多连接其他计算机上的.mdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的sql2005 configure设置为用户实例true 如何从局域网中的其他远程计算机多重连接到指定的.mdf文件? 请以任何方式帮助我....

My sql2005 configure is set to user instance true How can i multiple connect to the specifying .mdf file from remote other computers in LAN???? Please Please help me any ways....

推荐答案

简短的回答是您不能这样做.用户实例仅在本地连接上可用. 阅读此 [ ^ ],尤其是从其他客户端连接到用户实例"下的部分. 您最好使用普通的SQL Server实例,而不是用于多用户应用程序的用户实例. 答案很长,这是可能的,但是在屁股上却是巨大的痛苦.您必须向远程客户端提供启动用户实例时创建的命名管道的确切名称.每次启动用户实例时,此命名管道标识符都不同,因此您无法将其硬编码到应用程序中.一旦获得了命名管道标识符,其他客户端就可以在其连接字符串中使用非名称连接到服务器. 因此,根本不使用数据库,每天如何将命名管道字符串获取给其他客户端? 立即放弃此操作,并将其转换为普通实例数据库,如上面链接上方文章底部所述. The short answer is you can''t do that. User Instances are only available on the local connections. Read this[^], especially the part under "Connecting to User Instances from Other Clients". You''re better off using a normal SQL Server instance, not User Instances for multiuser applications. The long answer is it''s possible, but a huge pain in the ass. You have to supply the remote clients the exact name of the Named Pipe that is created when the user instance is started. This named pipe identifier is different every time the user instance is started so you can''t hard-code it into your application. Once you have the Named Pipe identifier, other clients can use than name in their connection strings to connect to the server. So, without using the database at all, how are you going to get the named pipe string to the other clients every day?? Abandon this now and convert this to a normal instance database, as spelled out at the bottom of the article at the above link.

更多推荐

要多连接其他计算机上的.mdf文件

本文发布于:2023-10-16 14:06:58,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1497788.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:要多   文件   其他计算机   mdf

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!