Showing posts with label connecting. Show all posts
Showing posts with label connecting. Show all posts

Wednesday, March 21, 2012

Is it possible to connect to a SQL Server 2005 database usine asp.net v1.1

Hi,

I am having difficulties connecting to a SQL Server 2005 database from an ASP.NET windows application.

Is there any difference in the way the connection string is written when connecting to SQL Server 2005

I have the following connections in my App.config file :

<addkey="Sql2000ConnString"value="Data Source=xxx.xxx; Initial Catalog=Sql2000DB; User ID=UID;Password=Pwd;"/>

<addkey="Sql2005ConnString"value="Data Source=xxx.xxx; Initial Catalog=Sql2005DB;User ID=UID; Password=Pwd;"/>

Every time I run my application it crashes when I try to connect to SQLServer2005 - The connection to the Sql2000 database works without any errors.

Do I need to write the connection differently??

Thanks

Hi kellem,

You would have to post your error message.

Good Coding!

Javier Luna
http://guydotnetxmlwebservices.blogspot.com/

|||Make sure the remote connections are enabled on the SQL2005 instance, which can be checked in Sql Server Surface Area Configuration.

Friday, March 9, 2012

Is it not possible to access sql 2005 database, without attaching it first in management s

Hi All ...

I am not facing a problem while connecting to sql server 2005 databse, when i attach that first, in management studio, then I can access that from localhost, its fine at this point. but when i detach that database from management studio i am facing the follwing error while accessing it from localhost i.e.

System.Data.SqlClient.SqlException: Unable to open the physical file "D:\database\Hunzian.mdf". Operating system error 5: "5(Access is denied.)". An attempt to attach an auto-named database for file D:\database\Hunzian.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.

The connection string to access that database is

undefined=@."Data

I will be happy to have your replies .

I am confused over " detach that database from management studio " - are just closing the connection for SQL Management Studio or are you detaching it.

Where is the database located w.r.t. to the localhost you refer to - is it on one of its drives or on a network share?

|||

Hi ... thanks for the reply ...

I am actually detaching the database from management studio, that database is actually situated at one of my local drive D:\Database\database.mdf. When I detach that database I am facing the above mentioned problem.

Regards

|||

Hi,

Is this error message thrown when you click detach? I think it might be generated when you connect to this database. Please check if you have granted proper permission on that folder to ASPNET account or Network Service account.

|||

Thanks,

When i detach the database from Management Studio, acctually i get this error while i try to connect to the database through localhost.

I am able to connect to the database when i attach database first from management studio then connect through localhost

What i want is:

I have detached the database from management studio, its fine uptill now, but i want to connect to that database from localhost without attaching it in management studio.

I hope you understood the scenario, the connection string works just fine while testing that in visual studio built in web server. I have already given permissions to ASPNET user.

Regards,

Monday, February 20, 2012

Is Busy: ...waiting to complete an internal operation

Frequently, when I'm connecting to my server through SSMS i get "Is Busy: Microsoft SQL Server is waiting to complete an internal operation...."

And it tells me that if I get that message a lot, I should let Microsoft know.

So -- Microsoft, I'm letting you know.

Can anyone tell me why this is happening? I've searched MSDN and the knowledge base...I can only find one reference, and that is to a database diagram issue.

It takes a while to connect when this happens. So far, I haven't found a common denominator. It happens if I'm logged into my server and I try to connect to another instance, and it happens when I'm using my desktop...

As phrased above, the message does not appear to match any database engine error message, so it is probably from SSMS itself so you might want to post to the tools forum instead of the engine forum.

|||

How would I do that without double-posting?

Can the moderator move this for me?