05-06-13, 08:03 PM
السلام عليكم
اليوم الحمد لله جربت ان اعمل شبكة داخلية والحمد لله نجحت لكن واجهت مشكلة وحليت المشكلة بهذه الطريقة:
اولا اتبع هذه الخطوات للسماح بالPort الخاص للSQL من خلال الFire Wall
هذا من microsoft
طبعا الDynamic port احيانا تكون 49422 وتستطيع تغيير الـPort
الخطوة الثانية ادخل على الsql managment كلك ايمن على الserver اختر الproperties ثم اختر security حول من windows authentication mode الى sql server and and windows authenticaition mode
ومن ثم من خيار Connections تأكد من أن خيار allow remote connectios to this server مفعلة
واجعل نص الاتصال هكذا:
ومن ثم فعل الTCP/IP
موفق ان شاءالله
اليوم الحمد لله جربت ان اعمل شبكة داخلية والحمد لله نجحت لكن واجهت مشكلة وحليت المشكلة بهذه الطريقة:
اولا اتبع هذه الخطوات للسماح بالPort الخاص للSQL من خلال الFire Wall
هذا من microsoft
PHP كود :
To create a firewall rule
On the computer on which SQL Server is installed, log on as an administrator..
Click Start, click Run, type wf.msc, and click OK.
In the User Account Control dialog box, click Continue to use the Administrator credentials to open the Windows Firewall with Advanced Security snap-in.
On the Overview page, confirm that the Windows Firewall is enabled.
In the left pane, click Inbound Rules.
Right-click Inbound Rules, and then click New Rule to open the New Inbound Rule Wizard.
You could create a rule for the SQL Server program. However, because this example uses a fixed port, select Port, and then click Next.
On the Protocols and Ports page, select TCP.
Select Specified local ports. Type the port numbers separated by commas, and then click Next. In this example, you will configure the default port; therefore, enter 1433.
On the Action page, review the options. In this example, you are not using the firewall to force secure connections. Therefore, click Allow the connection, and then click Next.
طبعا الDynamic port احيانا تكون 49422 وتستطيع تغيير الـPort
الخطوة الثانية ادخل على الsql managment كلك ايمن على الserver اختر الproperties ثم اختر security حول من windows authentication mode الى sql server and and windows authenticaition mode
ومن ثم من خيار Connections تأكد من أن خيار allow remote connectios to this server مفعلة
واجعل نص الاتصال هكذا:
PHP كود :
private string conStr = @"server=yourIP,49422;Network Library=DBMSSOCN;Initial Catalog=std; UID=yourid;PWD=yourpass;";
ومن ثم فعل الTCP/IP
موفق ان شاءالله
