SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


connectivity issues in SQL Server 2005 with sqlcmd


connectivity issues in SQL Server 2005 with sqlcmd

Author
Message
danielr-515211
danielr-515211
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 2
what's the deal??? I know I am missing something but I can't figure it out. When I run sqlcmd -E I get a Named Pipes Provider: could not open a connection to SQL Server [2].



when I rund sqlcmd -E -S.\SERVER I get 1>



does this mean that there is a parameter somewhere that specifies default connection, or what? I don't know I am just guessing right now. It is causing a problem with SQL Server service...the error in the application event viewer is Failure Audit: Login failed for user 'NEWMEXICO\Administrator'. [CLIENT: ] error code 18456. And it's annoying...can anyone help???



Thank you,

Daniel
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)

Group: General Forum Members
Points: 44313 Visits: 14925
I am not sure I understand your problem. What is the code you are running that does not work? Because running sqlcmd -E -S.\Server is connecting to the local server\instance that is what the 1> means. That is where you then execute your T-SQL statements followed by a GO when you have completed the batch.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
danielr-515211
danielr-515211
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 2
I am just trying to connect using the following command

c:\>sqlcmd -E

I have another sql server where this command works. The second sql server fails with this command.
However, if I use the following:

c:\>sqlcmd -E -S.\Server

then I can connect into the second sql server.

This is the only difference I have found between the servers. I wouldn't care either way except that the sql server agent gives an invalid username/password in the application error log and i get dbfaults within the vault, the software that is trying to connect to these two sql servers.
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)SSC-Forever (44K reputation)

Group: General Forum Members
Points: 44313 Visits: 14925

I am just trying to connect using the following command

c:\>sqlcmd -E

I have another sql server where this command works. The second sql server fails with this command.
However, if I use the following:

c:\>sqlcmd -E -S.\Server

then I can connect into the second sql server.


In the second example you are connecting to a Named Instance of Sql Server. The ".\Server" essentially means LocalHost\Server. You can install Sql Server 2000 forward on the same machine multiple times using Named Instances. When you install the first one and select Default instance you can use the first example, but when you have a named instance you must include the server name (the ".") and the instance name ("Server"). The instance name follows a "\".



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search