Preventing SQL server instance scanning osql -L /sqlcmd -L

  • Hi ,

    I have create a SQL SERVER 2008 R2 - SQL EXPRESS instance. and Disabled the Browser services and Enabled the Hide instance option and restart the services. I have both shared memory , named pipes and TCPIP protocol enabled.

    The instance name : "ABC\SQLEXPRESS" .

    After restart and i run osql -L and sqlcmd -L , the instance is gone. After 20 minutes , i try again . the instance appear with name "ABC". I try to browse the instance from the management studio "connect to server ... browse for more ....." , i also saw the same name "ABC".

    My objective is totally remove the instance name for scanning by users.

    thanks

  • If you can connect to ABC, when you execute

    SELECT @@SERVERNAME;

    what do you get? Do you get ABC or do you get ABC\SQLEXPRESS? If you get ABC, that's a different instance.

    K. Brian Kelley
    @kbriankelley

  • I cannot connect to that ABC instance , it only have one instance in the server .

    I have checked from the services.msc , it only have one SQL INSTANCE which is ABC\SQLEXPRESS.

  • sqlcmd is picking up the Shared Memory instance. For whatever reason it is represented without the instance name but it is nothing to worry about. If running sqlcmd -L from a different computer you will not see your named instance listed.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

  • I have try to ping from other pc machine in the same domain, and I still see ABC in the list of sqlcmd -L.

    i try to remove all the SQL related program and reinstalled with default instance ABC , change the default 1433 port to 1434, disable shared memory in server network configuration and client native configuration , disabled sql browser services , restart and try the same command again. i faced the same issues.

  • Well. i manage to sort out the issues .

    When i Disabled the SQL SERVER BROWSER services. it have a "Active" option in the SSCM - SQL SERVER BROWSER - PROPERTIES -ADVANCED . I thought it will turn automatically from "Active-1" to "NotActive-0 " , but it did not .

    Once I find out the regsitry key SsrpListener is still point to one although i have disabled the SQL SERVER BROWSER services . I change it to ZERO and restart sql server services. Now it is working, the other pc will not able to view my SQL INSTANCE using SQLCMD -L

  • I am happy you got something working in your environment but changing the Active flag had no effect in my environment, i.e. I still see my computer name listed with no instance name when running sqlcmd -L it on my own machine and other machines cannot list my instances because they are set as Hide = True.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply