Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Sunday, February 19, 2012

Connecting from the Command Prompt

I heard (from the response to a post yesterday) that connecting from the
command prompt can be a better way to access sql server 2000 if you're server
is getting hammered. (I could not get into the server with either Query
Analyzer or Ent Mgr no matter how high I set the login timeout.)
Is the person just talking about osql probably? If so, would that really
have helped in my situation? And if he/she was not talking about osql, can
someone tell me what they mean by how I can "get to the server via command
prompt"?
Any help would be much appreciated...
Hi
I couldn't find a recent post with the "command prompt" in it, the person is
probably talking about osql, and he may also mean that you are accessing it
from the console.
The parameters for osql are documented in books online.
John
"CLM" wrote:

> I heard (from the response to a post yesterday) that connecting from the
> command prompt can be a better way to access sql server 2000 if you're server
> is getting hammered. (I could not get into the server with either Query
> Analyzer or Ent Mgr no matter how high I set the login timeout.)
> Is the person just talking about osql probably? If so, would that really
> have helped in my situation? And if he/she was not talking about osql, can
> someone tell me what they mean by how I can "get to the server via command
> prompt"?
> Any help would be much appreciated...
|||Thx. That's what I figured.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> I couldn't find a recent post with the "command prompt" in it, the person is
> probably talking about osql, and he may also mean that you are accessing it
> from the console.
> The parameters for osql are documented in books online.
> John
> "CLM" wrote:

Connecting from the Command Prompt

I heard (from the response to a post yesterday) that connecting from the
command prompt can be a better way to access sql server 2000 if you're serve
r
is getting hammered. (I could not get into the server with either Query
Analyzer or Ent Mgr no matter how high I set the login timeout.)
Is the person just talking about osql probably? If so, would that really
have helped in my situation? And if he/she was not talking about osql, can
someone tell me what they mean by how I can "get to the server via command
prompt"?
Any help would be much appreciated...Hi
I couldn't find a recent post with the "command prompt" in it, the person is
probably talking about osql, and he may also mean that you are accessing it
from the console.
The parameters for osql are documented in books online.
John
"CLM" wrote:

> I heard (from the response to a post yesterday) that connecting from the
> command prompt can be a better way to access sql server 2000 if you're ser
ver
> is getting hammered. (I could not get into the server with either Query
> Analyzer or Ent Mgr no matter how high I set the login timeout.)
> Is the person just talking about osql probably? If so, would that really
> have helped in my situation? And if he/she was not talking about osql, ca
n
> someone tell me what they mean by how I can "get to the server via command
> prompt"?
> Any help would be much appreciated...|||Thx. That's what I figured.
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> I couldn't find a recent post with the "command prompt" in it, the person
is
> probably talking about osql, and he may also mean that you are accessing i
t
> from the console.
> The parameters for osql are documented in books online.
> John
> "CLM" wrote:
>

Connecting from the Command Prompt

I heard (from the response to a post yesterday) that connecting from the
command prompt can be a better way to access sql server 2000 if you're server
is getting hammered. (I could not get into the server with either Query
Analyzer or Ent Mgr no matter how high I set the login timeout.)
Is the person just talking about osql probably? If so, would that really
have helped in my situation? And if he/she was not talking about osql, can
someone tell me what they mean by how I can "get to the server via command
prompt"?
Any help would be much appreciated...Hi
I couldn't find a recent post with the "command prompt" in it, the person is
probably talking about osql, and he may also mean that you are accessing it
from the console.
The parameters for osql are documented in books online.
John
"CLM" wrote:
> I heard (from the response to a post yesterday) that connecting from the
> command prompt can be a better way to access sql server 2000 if you're server
> is getting hammered. (I could not get into the server with either Query
> Analyzer or Ent Mgr no matter how high I set the login timeout.)
> Is the person just talking about osql probably? If so, would that really
> have helped in my situation? And if he/she was not talking about osql, can
> someone tell me what they mean by how I can "get to the server via command
> prompt"?
> Any help would be much appreciated...|||Thx. That's what I figured.
"John Bell" wrote:
> Hi
> I couldn't find a recent post with the "command prompt" in it, the person is
> probably talking about osql, and he may also mean that you are accessing it
> from the console.
> The parameters for osql are documented in books online.
> John
> "CLM" wrote:
> > I heard (from the response to a post yesterday) that connecting from the
> > command prompt can be a better way to access sql server 2000 if you're server
> > is getting hammered. (I could not get into the server with either Query
> > Analyzer or Ent Mgr no matter how high I set the login timeout.)
> >
> > Is the person just talking about osql probably? If so, would that really
> > have helped in my situation? And if he/she was not talking about osql, can
> > someone tell me what they mean by how I can "get to the server via command
> > prompt"?
> >
> > Any help would be much appreciated...

Sunday, February 12, 2012

Connect to SQL Server from Command Prompt?

I installed SQL Server CTP version and tried to connect from Command Prompt, but failed from either osql or sqlcmd:

osql [/sqlcmd] -H localhost -E

or,

osql [/sqlcmd] -H localhost -U sa -P SAPWD

The error message is:

Named Pipes Provider: Could not open a connection to SQL Server, ...

Please note named pipes are enabled from client protocol configuration.

without Management studio, how can I connect to the server?

Thanks.
PS: I had searched in the forum, but didn't find answer to above question.

-S is the parameter for the instancename e.g.

sqlcmd -S (local) -E

sqlcmd -S (local)\SQL01 -E

For a windows authenticated connection to the default instance on the local

machine you don't need any parameters for sqlcmd e.g

sqlcmd

--

HTH

Jasper Smith (SQL Server MVP)

http://www.sqldbatips.com

I support PASS - the definitive, global

community for SQL Server professionals -

http://www.sqlpass.org

wrote in message

news:f756a7ad-017a-42a5-aa70-0908ad626391@.discussions.microsoft.com...

>I installed SQL Server CTP version and tried to connect from Command

> Prompt, but failed from either osql or sqlcmd:

>

> osql [/sqlcmd] -H localhost -E

>

> or,

>

> osql [/sqlcmd] -H localhost -U sa -P SAPWD

>

> The error message is:

>

> Named Pipes Provider: Could not open a connection to SQL Server, ...

>

> Please note named pipes are enabled from client protocol configuration.

>

> without Management studio, how can I connect to the server?

>

> Thanks.

>

>

> PS: I had searched in the forum, but didn't find answer to above

> question.

>

>

>

>

>|||-S is the parameter for the instancename e.g.

sqlcmd -S (local) -E sqlcmd -S (local)\SQL01 -E

For a windows authenticated connection to the default instance on the local machine you don't need any parameters for sqlcmd e.g

sqlcmd

|||Thanks for the replies.

After a few attempts, I found the following command works:

osql (or sqlcmd) -S .\SQLEXPRESS -E

without instance name, it always timed out.