Solved

SQLCMD connection to a db fails

Posted on 2006-11-30
5
1,506 Views
Last Modified: 2006-12-01
When I attempt to connect to a DB through SQLCMD, while local to the SQL Server, the following command string produces the following error:

THIS COMMAND:
sqlcmd -l 90 -S SMSSERVER\SMS_C39 -U administrator -P password

PRODUCES THIS MESSAGE:
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFFFFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while establi
shing a connection to the server. When connecting to SQL Server 2005, this failu
re may be caused by the fact that under the default settings SQL Server does not
 allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.

What do you suggest I try differently?

Since the DBNAME and Instance Name are two different things, should I specifying an Instance Name instead? If so, where do I find that name? I only see DBs listed.
0
Comment
Question by:johndarby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 18049789
Is administrator a domain/machine account, or an SQL login?
0
 
LVL 1

Author Comment

by:johndarby
ID: 18049939
Local account. However, I just tried to run the Update Advisor, ding the same connection and it returned a similar message. I wonder how to begin troubleshooting this? I am headed into the App Log right now.
0
 
LVL 1

Accepted Solution

by:
dmgks earned 500 total points
ID: 18051069
Is "SMSSERVER" an alias? It appears that SQLCMD thinks it's talking to a remote server, even though you're running it on the local server. Perhaps the server name has changed since SQL was installed?

Doesn't matter. Some versions of SQL Server install out of the box with remote connections disabled. You can enable remote connections thusly:

Start / All Programs / Microsoft SQL Server 2005 / Configuration Tools / SQL Server Surface Area Configuration

Click Surface Area Configuration for Services and Connections, then click Remote Connections under Database Engine. Click the Local and Remote Connections radio button, then click Using both TCP/IP and named pipes. Bounce SQL Server and SQLCMD to your heart's content.

If it were my system, though, I'd try to figure out why SQL Server thinks "SMSSERVER" is not the name of the local SQL instance...
0
 
LVL 1

Author Comment

by:johndarby
ID: 18055388
That helped a bunch! I am brand new to SQL Server and am trying to run through as many of the basics as I can!
Thank you!
JohnD.
0
 
LVL 1

Author Comment

by:johndarby
ID: 18055391
By the way, SMSSERVER was just a faux name I used.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

726 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