Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Removing a SQL Server 2005 Express database

Posted on 2006-07-14
1
229 Views
Last Modified: 2008-03-17
Hi,

I have a SQL Server 2005 Express database on my website. Now I have made some changes to it on my local development machine and would like to replace the online database with my local one. However, when I try to delete the old database files, they cannot be removed.

My ISP does not have a way to detach the database in their web site admin interface. I have tried to remove the web.config file containing the connection string to the database, but no luck. The files has remained write protected for several days now.

Of course I can ask my ISP to remove the database for me, but I would like to know if there is a way to do it myself since I don't want to ask them every time I need to change something.

Thanks!
0
Comment
Question by:10goto20
1 Comment
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 500 total points
ID: 17106750
>However, when I try to delete the old database files, they cannot be removed.
you have to run the following sql:
exec sp_detach_db 'dbname'
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

792 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question