Solved

SQLCMD connection to a db fails

Posted on 2006-11-30
5
1,513 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

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

Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

705 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