ورود

View Full Version : اتصال به ديتابيس از طريق شبكه



araelectronic@ymail.com
شنبه 15 فروردین 1388, 12:47 عصر
با سلام خدمت دوستان
چند سوال در مورد sql در شبكه داشتم كه لطفا راهنمايي فرماييد

1- من از sql 2008 استفاده ميكنم ولي وقتي تنظيمات شبكه انجام ميشود ديگه نميتونم كانكت بشم حتي خود برنامه sql managment هم كار نميكند . مشكل از چي ميتونه باشه؟

2- براي اتصال يه sql در شبكه lan هم نياز هس كه تنظيمات ريموت و ايجاد پورت انجام شود؟

با تشكر

araelectronic@ymail.com
شنبه 15 فروردین 1388, 20:00 عصر
دوستان كسي كمكي نميكه

mom alone
شنبه 15 فروردین 1388, 23:29 عصر
این که برنامه "sql managment"
کار نمی که شاید نام کامپیوتر رو تغییر دادی و یا چیزی شبیه این(90% این جور شده )
راه حلش خیلی آسونه(البته اگه برنامه اجرا میشه ولی لوگین نمی کنه هاااااا)
برای لوگین
در قسمت سرور نام brows رو بزن و در قسمت دیتا بیس انجین نام سرورت رو انتخاب کن و مانند همیشه ادامه کار رو بده(user name و یا ویندوز رو انتخاب و ادامه)

برای تنظیمات اتصال از طریق کامپیوتر دیگه هم اگه جستجو می کردی جواب می گرفتی
در 2005 و 2008 اتصال از شبکه بصورت پیشفرض غبر فعال است
و شما باید در قسمت SQL Server Configuration Manager تنظیماتی که می خای رو فعال کنی
مثلا از طریق ip
(برای اینکار از help sql2008 استفده کن و یا در سسایت جستجو کن
و اگه فایر وال داری باید پورت های مناسب رو باز کنی
و از این کانکشن استرینگ استفاده کنی


curd = "Data Source={0};Initial Catalog={1};Persist Security Info=True;User ID={2};Password={3}";
this.sqlConnection1.ConnectionString = String.Format(curd, "192.168.100.1", "aloneabouzar", "sa", "123123123");


البته اگه لینک این تنظیمات رو دیدم برات میذارم

mom alone
شنبه 15 فروردین 1388, 23:42 عصر
شاید این کارتو رو بندازن
برای باز کردن پورت قایر وال



To open a port in the Windows firewall for TCP access
In Control Panel, open Network Connections, right-click the active connection, and then click Properties.

Click the Advanced tab, and then click Windows Firewall Settings.

In the Windows Firewall dialog box, click the Exceptions tab, and then click Add Port.

In the Add a Port dialog box, in the Name text box, type SQL Server <instance name>.

In the Port number text box, type the port number of the instance of the Database Engine, such as 1433 for the default instance.

Verify that TCP is selected, and then click OK.

To open the port to expose the SQL Server Browser service, click Add Port, type SQL Server Browser in the Name text box, type 1434 in the Port Number text box, select UDP, and then click OK.

البته بهتره از همین پورت های نام برده استفاده کنی و فایر وال رو off نکنی

برای تنضیمات sql



To assign a TCP/IP port number to the SQL Server Database Engine
In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.

In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you want to configure.

If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.

In the IPn Properties area box, in the TCP Port box, type the port number you want this IP address to listen on, and then click OK.

In the console pane, click SQL Server Services.

In the details pane, right-click SQL Server (<instance name>) and then click Restart, to stop and restart SQL Server.


اگه خاستی یه کم تو اینا هم بگرد





To enable a server network protocol
In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration.

In the console pane, click Protocols for <instance name>.

In the details pane, right-click the protocol you want to change, and then click Enable or Disable.

In the console pane, click SQL Server Services.

In the details pane, right-click SQL Server (<instance name>), and then click Restart, to stop and restart the SQL Server service.



How to enable TCP/IP connections from another computer
On the Start menu, point to All Programs, point to Microsoft SQL Server 2008, point to Configuration Tools, and then click SQL Server Configuration Manager.

In SQL Server Configuration Manager, expand SQL Server Network Configuration, and then click Protocols for <InstanceName>.

The default instance (an unnamed instance) is listed as MSSQLSERVER. If you installed a named instance, the name you provided is listed. SQL Server 2008 Express installs as SQLEXPRESS, unless you changed the name during setup.

In the list of protocols, right-click the protocol you want to enable (TCP/IP), and then click Enable.


Configure SQL Server to listen on a specific port
In SQL Server Configuration Manager, expand SQL Server Network Configuration, and then click on the server instance you want to configure.

In the right pane, double-click TCP/IP.

In the TCP/IP Properties dialog box, click the IP Addresses tab.

In the TCP Port box of the IPAll section, type an available port number. For this tutorial, we will use 49172.

Click OK to close the dialog box, and click OK to the warning that the service must be restarted.

In the left pane, click SQL Server 2005 Services.

In the right pane, right-click the instance of SQL Server, and then click Restart. When the Database Engine restarts, it will listen on port 49172.


To open a port in Windows Firewall
On the Start menu, click Control Panel.

In Control Panel, click Network and Internet Connections, and then open Windows Firewall.

In Windows Firewall, click the Exceptions tab, and then click Add Port.

In the Add a Port dialog box, in the Name box, type SQL Server <instanceName>.

In the Port number box, type the port number of the Database Engine instance. Use 1433 for the default instance. Type 1500 if you are configuring a named instance and configured a fixed port in the previous task. Verify that TCP is selected, and then click OK.


To assign a TCP/IP port number to the SQL Server Database Engine
In SQL Server Configuration Manager, in the console pane, expand SQL Server Network Configuration, expand Protocols for <instance name>, and then double-click TCP/IP.

In the TCP/IP Properties dialog box, on the IP Addresses tab, several IP addresses appear in the format IP1, IP2, up to IPAll. One of these is for the IP address of the loopback adapter, 127.0.0.1. Additional IP addresses appear for each IP Address on the computer. Right-click each address, and then click Properties to identify the IP address that you want to configure.

If the TCP Dynamic Ports dialog box contains 0, indicating the Database Engine is listening on dynamic ports, delete the 0.

In the IPn Properties area box, in the TCP Port box, type the port number you want this IP address to listen on, and then click OK.

In the console pane, click SQL Server Services.

In the details pane, right-click SQL Server (<instance name>) and then click Restart, to stop and restart SQL Server.



To open a port in the Windows firewall for TCP access
In Control Panel, open Network Connections, right-click the active connection, and then click Properties.

Click the Advanced tab, and then click Windows Firewall Settings.

In the Windows Firewall dialog box, click the Exceptions tab, and then click Add Port.

In the Add a Port dialog box, in the Name text box, type SQL Server <instance name>.

In the Port number text box, type the port number of the instance of the Database Engine, such as 1433 for the default instance.

Verify that TCP is selected, and then click OK.

To open the port to expose the SQL Server Browser service, click Add Port, type SQL Server Browser in the Name text box, type 1434 in the Port Number text box, select UDP, and then click OK.

araelectronic@ymail.com
یک شنبه 16 فروردین 1388, 00:53 صبح
دوست عزيز خيلي ممنون
دقيقا نام كامپيوتر عوض شده ولي مشكل اينجاس كه جستجو هم ميكنم و نام جديد را ميزنم ولي باز اجرا نميشه .البته كامپيوترها براي كار با نرم افزار ديگه به ديتاسنتر وصلند . نام كامپيوترها به اينصورت هست comutername_xxxxx.com

mom alone
یک شنبه 16 فروردین 1388, 01:30 صبح
ببین نام جدید کامپیوتر رو زدی
یا در قسمت برووز و در قسمت دیتا بیس انجین دنبال نام سرور گشتی
اگه گتی اونجا بود یا به
اگه نام سرور در قسمت دیتا بیس انجین نیست
شاید نام کامپیوتر مناسب نیست
من یه با می خاستم sql نصب کنم به نام کامپیوتر گیر داد
شاید شما هم ایجور باشه
از کاراکتر خاص تو نام کامپیوتر استفاده نکن
در در قسمت دیتا بیس انجین دنبال سرور بگرد نه اینکه در سرور نام ، نام کامپیوتر رو وارد کنیااااااا
اگه مطالب مفید بود می تونب یه تشکر کوچک بکنی(آخه نمیدونم چرا وقتی به کسی کمک میکنی اون جواب نمی ده آدم دلسرد میشه برای کمک به افراد بعدی) نه اینکه محتاج باشیااااااااا ولی ......

در مورد کاراکتر خاص هم مطمئین نیستم

araelectronic@ymail.com
یک شنبه 16 فروردین 1388, 09:40 صبح
دوست عزيز ممنون از راهنماييهاتون ولي همه اين كارارو كردم نشد