Re: Can you change the name of the data file?

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


Date: Wed, 8 Dec 2004 07:36:55 -0600

Sp_attach_db should work. Did you specify all data and log files?

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"DB" <anonymous@discussions.microsoft.com> wrote in message 
news:228b01c4dd29$cbc13110$a301280a@phx.gbl...
>I want to change the name of the data file and
> corresponding log file.  I detach, rename, then try to
> attach.  It recognizes that the name has changed and
> won't allow me to attach.
>
> Thanks. 


Relevant Pages

  • Re: sp_attach_single_file_db
    ... Probably better to attach all of them and then get rid of the extras using ... ALTER DATABASE. ... log files might comprimise your database's integrity. ... > the other server. ...
    (microsoft.public.sqlserver.server)
  • Re: sp_attach_single_file_db
    ... database 'db_tdadatamart' is invalid. ... >Probably better to attach all of them and then get rid of ... >log files might comprimise your database's integrity. ... >> the other server. ...
    (microsoft.public.sqlserver.server)
  • Re: Attaching a database, but missing a file
    ... Restoring a .mdf ... Andrew J. Kelly SQL MVP ... > log files was not getting backed up. ... I was not permitted to attach. ...
    (microsoft.public.sqlserver.server)
  • Re: Troj_se.118079
    ... The MRKlunky showed up in system restore so I turned off system ... | "jarjar.bac" and it could not clean it. ... Post and/or attach the log files of the AV modules which found malware. ...
    (microsoft.public.security.virus)
  • Re: attach databases without detaching
    ... if you have multiple log files for a single DB it is ... almost guranteed that an attach will not work without a prior detach. ... "Peter Yeoh" wrote: ... >> The only ways i know of a successful attach are if the databases are ...
    (microsoft.public.sqlserver.server)