Thursday, February 9, 2012

access denied to sqlcmd line

I have turned on everything this server has, to no avail. Just how does one
get to the command line on SQL2005?
Thanks,
Harry
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\mackey>sqlcmd
HResult 0x2, Level 16, State 1
Named Pipes Provider: Could not open a connection to SQL Server [2].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
establishing a connection to the serv
er. When connecting to SQL Server 2005, this failure 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.Hi,
Along with SQLCMD provide the Servername, username and password
SQLCMD -SSQL_Servername -USQL_Login -P Password
This will allow you to a SQL Prompt where u could issue the TSQL commands.
Thanks
Hari
SQL Server MVP
"Harry" <mackeyha2@.hotmail.com> wrote in message
news:eI5MWr51GHA.4476@.TK2MSFTNGP02.phx.gbl...
>I have turned on everything this server has, to no avail. Just how does one
>get to the command line on SQL2005?
> Thanks,
> Harry
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> C:\Documents and Settings\mackey>sqlcmd
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establishing a connection to the serv
> er. When connecting to SQL Server 2005, this failure 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.
>
>|||I would try connecting to the SQL Server through TCP/IP. make sure that
under the
SQL Server connection manager --> SQL Server 2005 Network Configuration -->
Protocols for MSSQLSERVER --> TCP/IP Enabled
and
SQL Server connection manager --> SQL Native Client Configuration --> Client
Protocols --> TCP/IP Order 1 Enabled.
see if you connect that way...
thanks.
/*
Warren Brunk - MCITP - SQL 2005, MCDBA
www.techintsolutions.com
*/
"Harry" <mackeyha2@.hotmail.com> wrote in message
news:eI5MWr51GHA.4476@.TK2MSFTNGP02.phx.gbl...
>I have turned on everything this server has, to no avail. Just how does one
>get to the command line on SQL2005?
> Thanks,
> Harry
>
> Microsoft Windows XP [Version 5.1.2600]
> (C) Copyright 1985-2001 Microsoft Corp.
> C:\Documents and Settings\mackey>sqlcmd
> HResult 0x2, Level 16, State 1
> Named Pipes Provider: Could not open a connection to SQL Server [2].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establishing a connection to the serv
> er. When connecting to SQL Server 2005, this failure 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.
>
>

No comments:

Post a Comment