Re: Some basic questions
- From: vulcanite <vulcanite@xxxxxxxxxxxxxxxxx>
- Date: Wed, 19 Apr 2006 08:43:03 -0700
Jasper,
Thank you for the response.
Starting the SQL Browser service resulted in the SQLEXPRESS instance being
shown, so solves that problem.
The application connection string has 'User instance = true' so I must be
using a user instance (which I understand is a separate instance for
non-administrators).
I read in MSDN that user instances are opened in single-user mode and it is
not possible for mulitple users to connect to databases running on a user
instance.
That would explain the login problem?
What should I change to allow mulitple connections (so my application can
connect at the same time as server explorer's connection)?
"Jasper Smith" wrote:
1) A named instance called SQLEXPRESS is the default for SQL Server Express.
Edition. You won't have a default instance (which is why you can't connect
to it<g>). As you have discovered the way to address this is .\SQLEXPRESS or
(local)\SQLEXPRESS or computername\SQLEXPRESS. A lot of the samples/default
web.config files etc expect this instance to exist (although it's easy
enough to adapt to a default instance). Don't know why it doesn't show up,
is the SQLBrowser service running (although that shouldn't be required
locally)
2) Not sure why you're getting this. What is your default database (set it
to master if it's not to avoid issues)? Are you using a user instance?
--
HTH,
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
"vulcanite" <vulcanite@xxxxxxxxxxxxxxxxx> wrote in message
news:345866BC-D536-4971-B874-EC4D47D1C1A1@xxxxxxxxxxxxxxxx
I am using SQL Express and Visual Studio 2005 and have 2 questions.
Q1:
In the server explorer in VS when I try and add a connection, the 'Server
name' box lists the SQL servers according to my machine names (my
understanding is this represents the default instance of SQL on each
machine).
As I only have the SQLEXPRESS instance on my machine, I would expect the
machine name to refer to this same instance.
However, when I use the machine name as the server name I get an error
("An
error has occurred while establishing a connection to the server.
provider:
Named Pipes Provider, error 40 - Could not open a connection to SQL
Server).
But when I use .\SQLEXPRESS as the server name the connection succeeds.
I can only assume the .\SQLEXPRESS is an additional instance to the
default
machine name instance - is that correct? Seems wasteful, as I only need
one
instance.
If the above is true, why does the .\SQLEXPRESS instance not appear in the
server name box? And why does the default server not work (and how can I
get
it to work)?
I set up my SQL installation to use windows authentication.
Q2:
When I have set up a data connection in Server explorer, then my
application
(when run) is denied a connection (error: Cannot open user default
database.
Login failed. Loginf failed for user <my windows login>)
When I delete the connection in server explorer, my application runs fine.
How can I get the application to work when data connections are present in
the server explorer?
Any help appreciated.
- References:
- Re: Some basic questions
- From: Jasper Smith
- Re: Some basic questions
- Prev by Date: SQL Server 2005SP1 does not install ...
- Next by Date: Re: Move databases between servers
- Previous by thread: Re: Some basic questions
- Next by thread: Unable to install on hardened box
- Index(es):
Relevant Pages
|