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


osql unable to connect to default instance when explicitly stated


osql unable to connect to default instance when explicitly stated

Author
Message
Ewan Scott
Ewan Scott
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 27
When connecting to the default instance using osql on the server :

1. this works

osql -S localhost -U sa -P password

2. this fails

osql -S localhost\mssqlserver -U sa -P password

([DBNETLIB]Sql server does not exist or access denied



In practice I can miss out the -S setting but I wonder what I'm doing wrong as regards specifying the instance.



Ewan
John Mitchell-245523
John Mitchell-245523
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14846 Visits: 15980
Ewan



Are you saying you have two instances on the same computer: a default instance and a named instance called mssqlserver?



John
Source-NH
Source-NH
SSCommitted
SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)SSCommitted (1.7K reputation)

Group: General Forum Members
Points: 1731 Visits: 479
Ewan,



The default instance of SQL Server is always referred to as the server name, not server\service (localhost\mssqlserver). You can also refer to it by network name. Only named instances are referred to by servername\instancename.



Hope this helps.
Ewan Scott
Ewan Scott
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 27
John
Apologies in delay in getting back. No, I only have the 1 instance. I assumed that the syntax should be the same for the default as for other instance but this does not appear to be the case - see post from Rich.
Thanks for response.
Ewan
Ewan Scott
Ewan Scott
Forum Newbie
Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)Forum Newbie (7 reputation)

Group: General Forum Members
Points: 7 Visits: 27
Rich
Thanks for the answer.
Ewan
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