Solved

Unable to map to LocalHost

Posted on 2009-06-28
9
378 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 14

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 14

Accepted Solution

by:
rob_farley earned 500 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
 

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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 14

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 14

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

758 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now