Solved

sp_detach_db  question

Posted on 2008-06-12
1
452 Views
Last Modified: 2012-06-21
We are running an SQL (2000) database that is growing very quickly and our data drive is too small. I have installed a new 140gb drive on the server and need to move the database to the new drive. Using SQL Query Manager I have attempted todetach the database using the following command:
sp_detach_db 'sigxp1'

Also tried:
sp_detach_db'sigxp1'
I get no response (am I supposed to?) and when I try to copy and paste the data diles I get an error saying they are in use.
What am I missing?
0
Comment
Question by:ClareSnyder
1 Comment
 
LVL 1

Accepted Solution

by:
ClareSnyder earned 0 total points
ID: 21768979
OK - I figured it out.
Command given was incomplete.

I ran sp_detach_db @dbname='sigxp1' and it worked. I turned on the results pane and it told me it ddetached - and I could move the data.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now