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: Where can I find my detached database
    ... The data file should be in your SQL Server Data folder. ... No chance SSMS to drop a database when you detach it. ...
    (microsoft.public.sqlserver.server)
  • Re: Cant find my detached database file
    ... Do a Windows find for all files ending in .mdf on all server drives. ... No chance SSMS to drop a database when you detach it. ... "Detach Database" in SQL Server 2005 apparently dropped the database ...
    (microsoft.public.sqlserver.server)
  • 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: Attach/Detach database
    ... The detach option is context-sensitive so you need to first select the ... You should not create a new database before attaching. ... and copy the files to the new server. ... In the Attach database dialog, ...
    (microsoft.public.sqlserver.connect)
  • Re: Attach/Detach database
    ... The detach option is context-sensitive so you need to first select the ... You should not create a new database before attaching. ... and copy the files to the new server. ... In the Attach database dialog, ...
    (microsoft.public.sqlserver.setup)

Loading