Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Unable to map to LocalHost

Posted on 2009-06-28
9
Medium Priority
?
389 Views
Last Modified: 2012-05-07
I've been working on a tutorial to create ETL packages (See  http://msdn.microsoft.com/en-us/library/ms170365.aspx), and I've determined that my "localhost" is not mapped to my default server.  As per instruction, from an Integration Service Project in Visual Studio 2008, I open the  "New OLE DB Connection" and type "localhost" as my server name, but my dropdown list of available databases shows up empty.  On the other hand, I do have a <ComputerName>/<UserName> combination that I can enter, and I do get the appropriate list of databases. 

In my dropdown list of servers, I show a list of 3 Servers, only 1 of which shows the databases I expect to see.  When I open SQL Server Management Studio, I only see 1 database, not the other 2 shown in the Integration Service project.

My questions are these: What application do I use to find out the server to which "localhost" is assigned; and, having checked, how do I reassign it to the relevant server?  Your help is very much appreciated.
~Peter Ferber
0
Comment
Question by:PeterFrb
  • 5
  • 4
9 Comments
 
LVL 15

Expert Comment

by:rob_farley
ID: 24733034
Try opening up Command Prompt and running "ping localhost". It should tell you that it's trying to connect to 127.0.0.1

If it is 127.0.0.1, then you should check a few more things... For example,

1/ Can you connect to the server '.' (without the apostrophes)?
2/ Are you connecting using Windows Authentication?
3/ Are you running BIDS with Admin rights (esp in Vista)?
4/ What does SQL Configuration Manager list as the available protocols?

If it's not 127.0.0.1, then try connecting to '.', and also try looking in c:\windows\system32\drivers\etc\hosts, to see if there's anything in there you might not expect.

Rob
0
 

Author Comment

by:PeterFrb
ID: 24733229
Thanks, Rob, and to answer your questions:

"Ping localhost" successfully receives a reply 4 out of 4 times:

Pinging Peters [127.0.0.1] with 32 bytes of data:

      Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
      Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
      Reply from 127.0.0.1: bytes=32 time<1ms TTL=128
      Reply from 127.0.0.1: bytes=32 time<1ms TTL=128

      Ping statistics for 127.0.0.1:
          Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
      Approximate round trip times in milli-seconds:
          Minimum = 0ms, Maximum = 0ms, Average = 0ms
      
1) Using "." as a server name in "SQL Server Management Studio" gives me the following error:

 cannot connect to .. 
    A network-related or instance-specific error occurred while establishing a connection to SQL Server.  The server was not found or was not accessible.  Verify that the instance name is correct and that SQL Server is configured to allow remote connections.  (provider: Pipes Provider, error: 40 - Could not open a connection to SQL Server)(Microsoft SQL Server, Error: 2)

2) I connect only through Windows Authentication.  I have not defined any user names or passwords.
3) I am not familiar with BIDS: please let me know what that is.  I am running on my personal machine at home, and I am the only person capable of logging in to the server.  I presume that the setup program gave me administrative rights.  The system has never complained about my accessing any database object nor hindered me from making use of it.
4) 4 protocols are listed, all as enabled:  
    Shared Memory
    Named Pipes
    TCP/IP
    VIA

In the "C:\WINDOWS\system32\drivers\etc" directory are 4 files: "hosts", "lmhosts.sam", "networks", "protocol", and "services" (no extensions except for "lmhosts.sam").

I hope this helps,
~Peter Ferber
0
 
LVL 15

Accepted Solution

by:
rob_farley earned 2000 total points
ID: 24733247
The hosts file must be fine - localhost is 127.0.0.1, so there's no problem there.

In SQL Configuration Manager, does it suggest the name of the instance is MSSQLSERVER, or something else? If it's something else, then you should try connecting as:

localhost\TheSomethingElse

I assume the service is actually running...

If you're using Vista, then please right-click on the SSMS icon and choose "Run as administrator", and then see if you can connect. If this works, then you should consider adding your normal account as a login to the SQL instance, rather than just relying on being a local administrator.

If you can connect in SSIS when you run BI Development Studio 'as adminstrator', then this is definitely the problem.

Rob
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 

Author Comment

by:PeterFrb
ID: 24738039
Rob, thank you!  I feel like this information has brought me 90% towards the finish line.  I am, in fact, using Windows XP.

Because of problems with my initial attempt to install SQL Server, my instance name is MSSQLSERVER2.  For two weeks, I've been struggling with an issue related to this in my "Analysis Services" project in Visual Studio (see http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Studio_.NET_2005/Q_24496345.html).   Your feedback indicates to me that the Browser feature in this project is not working because the database is tied to localhost, which fails to find MSSQLSERVER.  

My hunch is that if I could rename MSSQLSERVER2 to MSSQLSERVER, the problems I've been having would go away since all instances of localhost would correctly resolve to the correct server name.  Can I rename my existing server?  As this is my personal machine and I'm its sole user, I am at liberty to change the configuration without the risk of stepping on any toes.

Many thanks,
~Peter Ferber
0
 
LVL 15

Expert Comment

by:rob_farley
ID: 24740920
Ok. You need to connect to

localhost/MSSQLSERVER2

See if that works for you.

Rob
0
 

Author Closing Comment

by:PeterFrb
ID: 31597742
I apologize for the number of questions I've been simultaneously throwing around.  The "localhost\TheSomethingElse" was a big part of that for which I'm looking.  I'm putting this thread to bed and will keep working on my larger issues.  Thanks a bunch.
~Peter
0
 

Author Comment

by:PeterFrb
ID: 24740963
I did try that, and it's not working for me.  However, you've done great work on getting me a major step closer to where I need to be, and I'm grateful.  I will continue to pursue my larger goal on another thread.  Many thanks.
~Peter
0
 
LVL 15

Expert Comment

by:rob_farley
ID: 24741065
You don't need to rename anything, you just need to specify the name of the instance as well as the server name each time. There's really no problem having a named instance.

Rob
0
 

Author Comment

by:PeterFrb
ID: 24741258
I did, in fact, discover the true nature of the problem after writing my last post.  It has to do with processing a cube after it's been built.
See http://social.msdn.microsoft.com/Forums/en-US/sqlanalysisservices/thread/09532fa0-6af3-4664-aaee-3f129d73e2d9
Thanks,
~Peter
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Audit has been really one of the more interesting, most useful, yet difficult to maintain topics in the history of SQL Server. In earlier versions of SQL people had very few options for auditing in SQL Server. It typically meant using SQL Trace …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question