如何让局域网上的PC可以访问sql server数据库? [英] How make sql server database accessible to pcs on LAN?

查看:527
本文介绍了如何让局域网上的PC可以访问sql server数据库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好...



我们在服务器机器上使用microsoft sql server 2008 r2 express,实例名称为'abc12'。这个实例包含两个数据库,如下所示

1.报警

2.报告



但是当我们连接到来自局域网上其他电脑的'abc12'实例。在这种情况下,它只显示一个数据库'警报'。它没有在局域网上显示报告数据库。

如何让局域网上其他电脑可以访问报告数据库。

please帮帮我

hello...

we are using microsoft sql server 2008 r2 express on server machine with instance name 'abc12'. this instance contains two databases as follows
1. alarm
2. report

but when we connect to 'abc12' instance from other pc on local area network. it shows only one database 'alarm' in this instance. it doesn't shows 'report' database on local area network pc.
how do i make that 'report' database accessible to other pcs on local area network.
please help me

推荐答案





显然你的权限有些问题。



您是否使用其他登录名从其他PC连接到 SQL Server ?如果是这样,可能是您在报告数据库中没有所需的用户。试试这个:

1.连接到服务器机器上的 SQL Server Management Studio

2.输入并执行以下语句(替换 YourUser ,其中包含您用于从其他PC连接到 SQL Server 的登录名:)

Hi,

Apparently you have some issues with the permissions.

Are you using a different login to connect to SQL Server from the other PC? If so, it might be that you don't have a required user in the "report" database. Try this:
1. Connect to SQL Server Management Studio on server machine.
2. Type and execute the following statements (replacing YourUser with the name of the login you're using to connect to SQL Server from the other PC):
USE [report];
GO

CREATE USER [YourUser] FOR LOGIN [YourUser];
GO



如果用户已经存在,那么你应该尝试重新登录数据库用户:


If the user already existed, then you should try to remap the login with the DB user:

USE [report];
GO

sp_change_users_login 'UPDATE_ONE', 'YourUser', 'YourUser';
GO



3.连接到 SQL Server Management Studio 另一台PC并检查它。



另外,看看这个:用户无法在SQL Server 2008 R2中看到数据库 [ ^ ]



如果您需要进一步的帮助,请告诉我。


3. Connect to SQL Server Management Studio from the other PC and check it.

Also, take a look at this: User can't see database in SQL Server 2008 R2[^]

Please let me know if you need further assistance.


这篇关于如何让局域网上的PC可以访问sql server数据库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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