Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 SQLCMD cannot login

Author  Topic 

jetq
Starting Member

1 Post

Posted - 2011-03-11 : 09:07:51
After successfully installing the new SQL Server 2008 database (Express Advanced Edition)on the WinXP system, I try to connect the database using SQLCMD tool and get the following message:

{code}
C:\Documents and Settings\secondary boss>sqlcmd
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in
stance-specific error has occurred while establishing a connection to SQL Server
. Server is not found or not accessible. Check if instance name is correct and i
f SQL Server is configured to allow remote connections. For more information see
SQL Server Books Online..
Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.
(code)

Another issue:

Before installing the SQLServer2008 database, I changed the OS's Admin user name from "BOSS" to "MSDBA". But after installation, I could login the SQL Server Management Studio with the username "MSDBA". But the Windows command line tool shows that the current user name is "BOSS".
How can I connect the database from SQLCMD tool?

Thank You

jetq

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2011-03-14 : 07:39:50
Provide more details to SQLCMD, as the error suggests it cannot find the server:
sqlcmd -S <servername>
Go to Top of Page
   

- Advertisement -