Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

connectivity issues in SQL Server 2005 with sqlcmd Expand / Collapse
Author
Message
Posted Thursday, October 11, 2007 4:05 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 19, 2007 1:08 PM
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
Post #409766
Posted Friday, October 19, 2007 8:48 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:07 AM
Points: 11,157, Visits: 12,899
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

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
Post #412842
Posted Friday, October 19, 2007 1:13 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, October 19, 2007 1:08 PM
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.
Post #412979
Posted Friday, October 19, 2007 1:31 PM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Yesterday @ 9:07 AM
Points: 11,157, Visits: 12,899

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

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
Post #412984
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse