dbTalk Databases Forums  

Using SQLCMD to test Connection

microsoft.public.sqlserver.clients microsoft.public.sqlserver.clients


Discuss Using SQLCMD to test Connection in the microsoft.public.sqlserver.clients forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Tibor Karaszi
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 10:22 AM






Quote:
Thanks all, but I still must be doing something wrong. I've switched SSMS into SQLCMD mode and
tried running all of the following.
....
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.
Above is because you are connected to SQL Server from SSMS, and SQL Server expects a SQL command.
SQLCMD is not a SQL command, it is an EXE file. Run it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote

Quote:
Thanks all, but I still must be doing something wrong. I've switched SSMS into SQLCMD mode and
tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port 1433 is I'd like to verify
connectivity using this specific connection. And going forward, I'd like to be able to test this
way if we change the default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #42  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM






Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #43  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #44  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #45  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #46  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #47  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #48  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #49  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
  #50  
Old   
Rubens
 
Posts: n/a

Default Re: Using SQLCMD to test Connection - 03-03-2008 , 02:13 PM



Hmmmm, I think I am going to have to doing some more reading about SQLCMD.
I put that command into a batch file and it still generates a syntax error,
so I must be doing something wrong...

Rubens

"Tibor Karaszi" <tibor_please.no.email_karaszi (AT) hotmail (DOT) nomail.com> wrote in
message news:80A1D3B3-074E-4ACF-AEBC-CDD347CE54BA (AT) microsoft (DOT) com...
Quote:
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.
...
Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Above is because you are connected to SQL Server from SSMS, and SQL Server
expects a SQL command. SQLCMD is not a SQL command, it is an EXE file. Run
it from a bat file.


--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi


"Rubens" <rubensrose (AT) hotmail (DOT) com> wrote in message
news:BEB5AF0C-B17A-4E4D-8DD7-1078827CE69A (AT) microsoft (DOT) com...
Thanks all, but I still must be doing something wrong. I've switched
SSMS into SQLCMD mode and tried running all of the following.

SQLCMD -Stcp:MIS-RROSE1 -E
SQLCMD -S tcp:MIS-RROSE1 -E
SQLCMD -S tcp:{MIS-RROSE1} -E
SQLCMD -S tcp:[MIS-RROSE1] -E

SQLCMD -SMIS-RROSE1 -E
SQLCMD -S MIS-RROSE1 -E
SQLCMD -S {MIS-RROSE1} -E
SQLCMD -S [MIS-RROSE1] -E

Each of these generate the following error message:

Msg 102, Level 15, State 1, Line 1
Incorrect syntax near 'S'.

Any idea? FYI... the reason I had initially tested forcing tcp on port
1433 is I'd like to verify connectivity using this specific connection.
And going forward, I'd like to be able to test this way if we change the
default port.

Thank-you,
Rubens

"Hans" <hansxlion (AT) hotmail (DOT) com> wrote in message
news:2CD4AE4A-33C1-4341-A197-56AF30B930D9 (AT) microsoft (DOT) com...
Hi, It should be like this:

SQLCMD -S tcp:ServerName -E





"Rubens" <Rubens (AT) discussions (DOT) microsoft.com> 写入消息
news:7C95C60D-3331-4481-9392-B9900CAB60C2 (AT) microsoft (DOT) com...
I am using the following comand to test a SQL 2005 connection, but I
seem to
have the syntax incorrect.

SQLCMD -Stcp:ServerName,1433 -E

What am I doing wrong?

Thanks,
Rubens




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.