Click here to Skip to main content
15,895,011 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ALL

i have litte Question please , i need to monitor my SQL Server DB while production or development phase

i have a Web application ASP.net 4.0 and connected with MS SQL Server 2008 .The DB is in App_data folder .

when i run the release version or debug or deploy it and runs the system .i can’t open the Databse from Microsoft Management Tool .

i habe to close VS2010 completly or restart the mashine ,

i mean when i write code i must close the Management Tool completly .when i want to select some data from management tool or make DB Changes , i have to close VS 2010 completly .it makes me nervous .because when i forget that . i have to drop the DB and reattach it again .

that means by asp.net application and 300 users worldwide ?? how will be that managed or monitored ?

and also something else : i created the DB from Studio manager and then connected to it normally from the Web App .but the DB doesn’t appear in App_Data folder .in this case i can open the database from studio manager and open the web app at the same time and monitor the DB Transactions from SQL Management Tool

[edit]Spurious code block removed - OriginalGriff[/edit]
Posted
Updated 1-Apr-12 23:45pm
v2

I believe you are using SQL Server Express Edition. Use SQL Server Management Studio for opening the database and VS for opening the ASP.NET App. If I've got you right then it will solve your problem.
 
Share this answer
 
Comments
fjdiewornncalwe 2-Apr-12 11:34am    
OP's answer moved:
Thanks for reply .
i am using Studio manager for DB and Vs 2010 for asp.net .
but i think the DB was createed through VS .
so how can i open the two programs ( manager and VS ) at the same time ?
This is what i got for answer ,i will try it soon

Did you happen to create a "database file" for the application?

If I'm not mistaken, Visual Studio has a method of working with databases where it creates a new database file, and uses detach/attach when the application loads or unloads.

In my opinion this is a terrible way to work with a database and can cause problems such as what you experienced.

Check if this is the case and if it is, then I'd suggest you modify that configuration and use a connection to a permanent database instead.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900