469,641 Members | 1,184 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,641 developers. It's quick & easy.

Visual studio denying access to database in Server Explorer

Visual Studio is giving me errors when trying to connect to a database server on my
LAN. This has been working for years. Then this morning when I opened VS I went to
the server explorer before opening a project and tried to access a database and got
an error: Invalid User Name or Password. Enter a valid user name and password.

I closed VS down and opened it again and opened a solution. Same error. I then
deleted the connection from the list and tried to reestablish it. I got a message
telling me that I was already connected to the database and wanted to know if I
wanted to disconnect and then reconnect. I answered yes. Then I got a message
telling me it could not disconnect from the server that the connection was still
active. When I clicked ok, I got another error message: Could not reconnect to
"{0}". If your machine is already connected to that server, disconnect and then try
again.

I can go to data connections and establish a connection to that server. I can
connect to it from SQL Server Enterprise manager too. I don't know what to do, I
really want access to that server via the Server Explorer as it is easier for me to
edit stored procedures.

Any suggestions as to what I can do to get this back?

Thanks.
Jul 21 '05 #1
7 2695
Hi Mike,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to connect to a
database using Server Explorer, an error which says invalid username and
password was shown. If there is any misunderstanding, please feel free to
let me know.

This is very weird that since you can connect to the database using
Enterprise manager, but cannot using the server explorer. Here is my
suggestion:

1. Restart the machine to make sure that all the connections from this
computer to the database are disconnected.
2. Start VisualStudio .NET, but don't open any solutions.
3. Open Server Explorer and delete the original database connection.
4. Try to recreate the connection to see if it works.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #2
Kevin,

You understand the issue correctly as I documented it exactly.

I did what you suggested, and I am getting the same errors.

What next?

Thanks,

Mike

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:C4**************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that when you're trying to connect to a
database using Server Explorer, an error which says invalid username and
password was shown. If there is any misunderstanding, please feel free to
let me know.

This is very weird that since you can connect to the database using
Enterprise manager, but cannot using the server explorer. Here is my
suggestion:

1. Restart the machine to make sure that all the connections from this
computer to the database are disconnected.
2. Start VisualStudio .NET, but don't open any solutions.
3. Open Server Explorer and delete the original database connection.
4. Try to recreate the connection to see if it works.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #3
Hi Mike,

Could you let me know if you have installed something new on the machine
before this happens?

Since the Server Explorer is using ADO to connect to the SQL server, I
think re-installing MDAC on the machine will be helpful. You can download
from the following link if you haven't had windows xp sp2 installed:

http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #4
Kevin,

I did not install anything new on the machine. I am extremely picky about what I put
on my development machine - I consider it a production machine actually. All that
happened was that one day it was working, and then next day, I experienced the
behavior I documented for you.

Are you really certain that reinstalling ADO is going to do this? I really do not
like uninstalling and reinstalling software. Aren't there any other options other
than reinstalling software?

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:wb****************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

Could you let me know if you have installed something new on the machine
before this happens?

Since the Server Explorer is using ADO to connect to the SQL server, I
think re-installing MDAC on the machine will be helpful. You can download
from the following link if you haven't had windows xp sp2 installed:

http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #5
Hi Mike,

I completely understand your situation. Currently, I could not reproduce
this issue on my machine. So I can only suggestion you to have a try to see
if re-installing MDAC can resolve this issue.

Actually, installing MDAC 2.8 does no harm to your machine. It upgrades the
dlls if you're currently using an earlier version. And it re-registers
components to make sure they work fine if you have already had MDAC 2.8
installed. However, if you have had Windows Xp sp2 installed, please do NOT
install it, since the version of MDAC in sp2 is newer than 2.8. We cannot
down-grade it.

Also, before re-installing, could you let me know, whether you're
connecting to a remote server or a local database server? Could you please
try to reset the password for the certain user on the server, and connect
again?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #6
Kevin,

I am connecting to a local database server.

I am running under service pack 2 so I will not be reinstalling mdac 2.8.

Resetting the password on the server does not make sense, Kevin as I am connecting as
a domain user.

I just tried logging into the server again from the server explorer, and now it is
permitting me to login. Nothing was ever changed previously and now mysteriously,
this started working again.

"Kevin Yu [MSFT]" <v-****@online.microsoft.com> wrote in message
news:ZQ**************@TK2MSFTNGXA03.phx.gbl...
Hi Mike,

I completely understand your situation. Currently, I could not reproduce
this issue on my machine. So I can only suggestion you to have a try to see
if re-installing MDAC can resolve this issue.

Actually, installing MDAC 2.8 does no harm to your machine. It upgrades the
dlls if you're currently using an earlier version. And it re-registers
components to make sure they work fine if you have already had MDAC 2.8
installed. However, if you have had Windows Xp sp2 installed, please do NOT
install it, since the version of MDAC in sp2 is newer than 2.8. We cannot
down-grade it.

Also, before re-installing, could you let me know, whether you're
connecting to a remote server or a local database server? Could you please
try to reset the password for the certain user on the server, and connect
again?

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #7
Hi Mike,

This is really mysterious. Anyway, it is good to know that your Server
Explorer is working again. Thanks for sharing your experience with all the
people here. If you have any questions, please feel free to post them in
the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

Jul 21 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

16 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by =?Utf-8?B?ZGF2aWQ=?= | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.