Solved

SQLCMD connection to a db fails

Posted on 2006-11-30
5
1,497 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
  • 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 Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

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…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.

757 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

23 Experts available now in Live!

Get 1:1 Help Now