要多连接其他计算机上的.mdf文件 [英] To multi connected the .mdf file from other computers

查看:56
本文介绍了要多连接其他计算机上的.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文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆