已答复 New SQL 2012 server not showing up

  • Sunday, September 23, 2012 2:15 AM
     
     
    I have a new install of  sql server 2012 on a new server 2008 R2 machine.

    However, when I run SQLCMD - L on the sql server, other sl servers show up, but not this new one.

    I disabled the windows firewall completely.

    In the SQL server management studio, the server, has the green arrow that it is running.

    Any suggestions?

    Thanks

All Replies

  • Sunday, September 23, 2012 2:41 AM
    Moderator
     
     Answered

    Hi, take a look at the following thread:

    http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/5ddf662d-87b6-4088-9ab6-5166eb061463

    From the thread:

    Using SQLCMD or OSQL may not catch all of the SQL Server instances of the network because of network/UDP/security/etc issues. As Nimit pointed, you can use Microsoft Assessment and Planning Toolkit which is a free tool to approach the effect. Here is an article which introduces the way to use this tool to find all SQL Server Instances on the network:Find All SQL Server Instances On Your Network!

    Also the following:

    BOL says "Because of the nature of broadcasting on networks, sqlcmd may not receive a timely response from all servers. Therefore, the list of servers returned may vary for each invocation of this option."...So looks like this is not the most trusted way to get the server list ...

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Sunday, September 23, 2012 2:44 AM
     
     

    Then how can I test from a different machine if it can indeed connect to the sql server?

    Also my servers name is server, how would I know the instance to connect: SERVER\?????

    Thanks

  • Sunday, September 23, 2012 2:51 AM
    Moderator
     
     

    Hi, since you installed the instance, you know the name, correct?  Can you connect to SERVER\Instance1 (where Instance1 in your instance name) as opposed to try to detect the instance name before connecting?  You can run a quick connection test using sqlcmd while supplying the server and instance name.  Sorry if I'm not understanding the problem here, but typically you create the instance name during install, so you can create the appropriate logins/permissions to supply to the users as opposed to trying to have a client application detect instances of SQL Server to try to connect to.

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Sunday, September 23, 2012 2:54 AM
     
     
    Honestly I dont remember what it was put in as. I am at the SQL server. Is there a way using the SQL server management studio to see the instance names?
  • Sunday, September 23, 2012 2:59 AM
    Moderator
     
     

    A few ways, but the easiest is likely to just open Configuration Tools -> SQL Server Configuration Manger and expand Services.  The instance names will be in parenthesis after SQL Server. 

    Example of a default instance:  SQL Server (MSSQLSERVER)

    Example of a named instance:  SQL Server (Instance1)  (where Instance1 is the instance name)

    Instance names are also stored in the registry and also listed in the folder structure where the SQL Server instances are installed.

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Sunday, September 23, 2012 3:02 AM
    Moderator
     
      Has Code

    If you are connected to the instance in SSMS, the instance name is displayed next to the green arrow representing your running instance.  Also, if you're connected, you can run the following TSQL script to get the instance name for a named instance:

    SELECT @@SERVERNAME

    Thanks,
    Sam Lester (MSFT)

    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.


  • Sunday, September 23, 2012 3:04 AM
     
     

    Perfect, it is the default of MSSQLSERVER.

    How can I test to see if I can connect to it from a different computer?

  • Sunday, September 23, 2012 3:08 AM
     
     

    I just tried connecting from a computer that has MSDE 2000, but I got an error:

    C:\Documents and Settings\User.COMPUTER>osql -E -S SERVER\MSSQLSERVER
    [DBNETLIB]Invalid connection.
    [DBNETLIB]ConnectionOpen (ParseConnectParams()).

    C:\Documents and Settings\User.COMPUTER>

  • Sunday, September 23, 2012 3:09 AM
    Moderator
     
     

    Remove the \MSSQLSERVER so that your command is:

    osql -E -S SERVER

    When connecting to the default instance, you supply only the server name.

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Sunday, September 23, 2012 3:41 AM
     
     

    Well is said:

    Login failed. The login is from an untrusted domain and cannot be used with
    Windows authentication.

    So I tried using -U

    However it created a user called temp and gave it a password called temp, but it is saying login failed.

    I tried SA, but I dont know the default password for  sa.

  • Sunday, September 23, 2012 4:35 AM
    Moderator
     
     

    You mentioned earlier that you are connected to the instance through SSMS.  How did you connect to that instance (Windows Auth or SQL Auth)?  Can you create a new SQL Auth login with appropriate permissions and try connecting through sqlcmd with the new login?

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.

  • Sunday, September 23, 2012 4:38 AM
     
     

    The SSMS I used windows auth.

    I created a new user, using ssms but the sqlcmd says login failed.

    THanks

  • Sunday, September 23, 2012 4:49 AM
    Moderator
     
     

    I see that you posted the new question with the correct title here, which is the best approach for getting answers in the forums.  Would you mind marking this one as answered based on the title and the original question so it can help future searchers with the same sqlcmd -L problem?

    Thanks,
    Sam Lester (MSFT)


    My Blog

    This posting is provided "AS IS" with no warranties, and confers no rights. Please remember to click "Mark as Answer" and "Vote as Helpful" on posts that help you. This can be beneficial to other community members reading the thread.