Solved

Unable to map to LocalHost

Posted on 2009-06-28
9
383 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 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
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
tempdb log contention 16 51
Need help how to find where my error is in UFD 6 40
get_systemdrive info from tsql? 1 18
Parse this column 6 27
After restoring a Microsoft SQL Server database (.bak) from backup or attaching .mdf file, you may run into "Error '15023' User or role already exists in the current database" when you use the "User Mapping" SQL Management Studio functionality to al…
SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

820 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