?
Solved

Unable to map to LocalHost

Posted on 2009-06-28
9
Medium Priority
?
393 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
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Long way back, we had to take help from third party tools in order to encrypt and decrypt data.  Gradually Microsoft understood the need for this feature and started to implement it by building functionality into SQL Server. Finally, with SQL 2008, …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
SQL Database Recovery Software repairs the MDF & NDF Files, corrupted due to hardware related issues or software related errors. Provides preview of recovered database objects and allows saving in either MSSQL, CSV, HTML or XLS format. Ensures recov…
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.
Suggested Courses
Course of the Month6 days, 12 hours left to enroll

593 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