?
Solved

sp_detach_db  question

Posted on 2008-06-12
1
Medium Priority
?
467 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
[X]
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
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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 UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

770 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