Re: Attach/Detach database

From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 10/10/04


Date: Sun, 10 Oct 2004 11:44:57 -0500

The detach option is context-sensitive so you need to first select the
desired database in the tree.

You should not create a new database before attaching. Detach the database
and copy the files to the new server. In the Attach database dialog,
specify the mdf file, click Verify and specify the desired database name in
the 'Attach As' box. You can change the locations of the other files in the
list, if needed.

You might also consider using the sp_attach_db and sp_detach_db stored
procedures. See the Books Online for more information.

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"vul" <aaa@optonline.net> wrote in message 
news:enYHb8trEHA.3900@TK2MSFTNGP10.phx.gbl...
>I need to copy my SQL Server 2000 database from my development machine to
> the server of one of the client. By using Enterprise Manager I was going 
> to
> detach db from my server, create a database with the same name on a new
> server, detach it, replace files on the new server with my copies and 
> attach
> both databases on both servers back.
> Unfortunately my server displays Attach Database entry only in popup menu. 
> I
> have nothing to attach yet.
> I did this operation several times and had no problem before. Probably I
> detached some of the unimportant databases and forgot to attach it back.
> How can I refresh (clean up whatever) Enterprise Manager memory about last
> operation in order to have the ability to use Detach feature?
> Thank you
> Al
>
> 


Relevant Pages

  • Re: WSS 2.0 to 3.0 upgrade
    ... Well I ran the inplace upgrade and it didn't report any errors. ... time it took for the database to attach. ... Windows 2003 server, the SQL Server, restoring from backup to WSS 2.0, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Detach and Attach for Backup and Deployment?
    ... detach + attach is a viable solution... ... backup your distribution database and restore it on user's server.. ... Moving SQL Server Databases to a New Location with Detach/Attach ...
    (microsoft.public.sqlserver.msde)
  • Frequent use of attach and detach
    ... We are considering an architecture in which "detach" and "attach" are used ... We want to have a farm of load servers for a data warehouse. ... database file "F" and loads data. ...
    (microsoft.public.sqlserver.server)
  • Re: WSS 2.0 to 3.0 upgrade
    ... The first upgrade I did I also did an in-place and nothing good came from ... time it took for the database to attach. ... Windows 2003 server, the SQL Server, restoring from backup to WSS 2.0, ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: transfer db from home to work.
    ... I would use detach / attach for this. ... Or, have the database live in a place accessible from both work and home, ... SQL Server MVP ...
    (microsoft.public.sqlserver.server)