Home | Troubleshooting |  Quick Setup  |  Cisco How to  |  Data Recovery  |  Forums   | Blog | IT Exam Practice | Services  | About Us | Chicagotech MVP  | Search  | Contact Us  |                 

 

 

Configuration for querying SQL database remotely

 

To allow querying SQL database from a website remotely, you may need to work on firewall, SQL server configuration and client settings. This example based on PHP connection test script: How to create a PHP script to test SQL connection

 

1. Make sure SQL TCP port 1433 (that is the SQL default port) is open. To test it, run telnet IP 1433.

 

2. If the client is in a domain network and the user has Windows Authentication login ID on the SQL server, enable mssql.secure_connection = On in PHP.INI.

 

3. If the client is located in outside out the domain network, you may have many options:

1) If the computer has joined the domain, login the domain credentials. It should work as the same 2.

2) If it is not domain computer, create SQL Server Authentication login ID and use the ID as username in script
3) Configure the SQL server to allow anonymous connections to SQL Server 2000 or to SQL Server 2005. Here are step b ystep:

 

1.Enable the Network Access: Allow anonymous SID/Name translation security option in Local Security Policy. To do this, follow these steps:
•Click Start, and then click Control Panel.
•Double-click Administrative Tools, and then double-click Local Security Policy.
•In the left pane, expand Local Policies, and then click Security Options.
•In the right pane, under the Policy column, locate and then double-click Network Access: Allow anonymous SID/Name translation.
•In the Network Access: Allow anonymous SID/Name translation dialog box, click the Enabled option, and then click OK.
•Close the Local Security Settings window.
•Close the Administrative Tools window.
2.Set the
TurnOffAnonymousBlock
DWORD registry value to 1. To do this, follow these steps.
•Click Start, click Run, type regedit, and then click OK.
•In Registry Editor, locate and then click the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
registry key.
•In the right pane, locate and then double-click the
TurnOffAnonymousBlock
DWORD registry value.

Note If the
TurnOffAnonymousBlock
DWORD registry value does not exist, you must create the registry value.
•In the Edit DWORD Value dialog box, type 1 in the Value data box, and then click OK.
•Close Registry Editor, and the restart the computer. A restart is required for the registry changes to take effect.


Post your questions, comments, feedbacks and suggestions

Contact a consultant

Related Topics


 

 


 

 

Hit Counter   This web is provided "AS IS" with no warranties.
Copyright © 2002-2018 ChicagoTech.net, All rights reserved. Unauthorized reproduction forbidden.