Hi,

How to connect to sql server...on a remote system using the IP address of the machine.
I actually want to start the MSSQLSERVER on a remote machine using the sql service manager.
how can this be done.

thanks.

Dani AI

Generated

Remote SQL access by IP and remotely starting the MSSQLSERVER service are both feasible, but they are handled by different mechanisms. asked about starting the service remotely; doubted it and noted programmatic options. The practical approach is: enable the database engine for network connections (TCP/IP, port) so clients can connect by IP, and use Windows remote service-control tooling or code (not the SSMS service GUI) to start/stop the MSSQLSERVER service.

Make the server reachable first: enable the instance's TCP/IP protocol and assign a known port (default for a default instance is 1433). For named instances either enable SQL Browser or use a fixed port and connect to IP,port. Open the corresponding firewall ports (TCP 1433 and UDP 1434 for SQL Browser) and confirm SQL accepts remote connections. See Microsoft guidance on configuring remote connections and enabling network protocols: and Enable or disable a server network protocol.

To start/stop the service remotely use standard Windows methods (requires administrator credentials and appropriate firewall rules). Examples:

sc \\192.168.1.10 start MSSQLSERVER
Invoke-Command -ComputerName 192.168.1.10 -ScriptBlock { Start-Service -Name 'MSSQLSERVER' }
(Get-WmiObject -Class Win32_Service -ComputerName 192.168.1.10 -Filter "Name='MSSQLSERVER'").StartService()

Documentation for the service-control and programmatic options: , PowerShell Start-Service / remoting, Win32_Service WMI class. If a programmatic solution is preferred, SMO can control SQL services as found; see SMO docs.

Security note: do not expose SQL ports directly to the Internet. Prefer VPN or RDP for remote admin, ensure only necessary ports are open, and use strong authentication.

Recommended Answers

All 3 Replies

don think its possible

SQL is a service. Therefore using the NET START syntax for a remote machine might get it done.

Found a way of doing this using SMO.
The MSDN website has some almost useless (as usual) examples, but it should point you in the right direction.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.