0

How can I RESTORE a database through SQL Server Management Studio by connecting "remotely" to it?

If I know the "IP address" of the target machine what else do I need to know?

If the port number is a requirement, how can I find it?

I only know the IP address of the target machine. I want to know on which port the SQL Server runs. I am given the task to connect to the SQL Server instance and take a backup.

2

What TCP Port is SQL Server running under? by Colin Stasiuk details several ways to determine the port number SQL is running on

  • go right to the registry and look at the TCP settings

    SQL 2005

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\
      MSSQL.<InstanceNumber>\MSSQLServer\SuperSocketNetLib\TCP\
    

    SQL 2008

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\
      MSSQL10.<InstanceName>\MSSQLServer\SuperSocketNetLib\TCP\
    
  • xp_readerrorlog. This will show the current SQL Server log and you can find the row "Server is listening on".

  • use the SQL Server Configuration Manager
  • if you are on the machine, look at Task Manager

Then you should be able to use 'IPAddress, Port' to connect. Or you can create a client side Alias using CliConfg on the client that allows you to connect to an alias.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.