Re: How to Rename Database Files
From: Kalen Delaney (replies_at_public_newsgroups.com)
Date: 04/23/04
- Next message: ME: "Re: Listing SPs"
- Previous message: Dean: "Authentication Mode question from a command line junkie"
- In reply to: Hari Prasad: "Re: How to Rename Database Files"
- Next in thread: John Bandettini: "Re: How to Rename Database Files"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Apr 2004 14:54:31 -0700
Yes, I just said that John's approach would not change the logical file
names. Earlier in the thread I told the original poster he could use ALTER
DATABASE to change the logical file names.
-- HTH ---------------- Kalen Delaney SQL Server MVP www.SolidQualityLearning.com "Hari Prasad" <hari_prasad_k@hotmail.com> wrote in message news:urPajkVKEHA.3704@TK2MSFTNGP11.phx.gbl... > Hi, > > In SQL 2000 the logical file name can be changed by using the below command. > The below step is not possible in SQL 7 > > ALTER DATABASE > MODIFY FILE > (NAME = logical_file_name, > NEWNAME = new_logical_name) > > How to change the physical name in both SQL 2000 / SQL 7 > > 1. detach the database using sp_detach_db <dbname> > 2. Rename the physical files to new name > 3. attach the database using sp_attach_db 'dbname','new physical MDF name > with path','new physical LDF name with path' > > Thanks > Hari > MCDBA > > > "Kalen Delaney" <replies@public_newsgroups.com> wrote in message > news:e$uJwLVKEHA.2756@TK2MSFTNGP10.phx.gbl... > > Hi John > > > > Note that this will not change the logical file names. That must be done > > separately and in SQL Server 7 it is not possible to change the logical > file > > names at all. > > > > -- > > HTH > > ---------------- > > Kalen Delaney > > SQL Server MVP > > www.SolidQualityLearning.com > > > > > > "John Bandettini" <anonymous@discussions.microsoft.com> wrote in message > > news:851FB97A-324C-40DD-95D9-3704D66EB621@microsoft.com... > > > Tim > > > > > > Detach the database. Rename the windows files and attach as whatever > name > > you like. > > > > > > Regards > > > > > > John > > > > > >
- Next message: ME: "Re: Listing SPs"
- Previous message: Dean: "Authentication Mode question from a command line junkie"
- In reply to: Hari Prasad: "Re: How to Rename Database Files"
- Next in thread: John Bandettini: "Re: How to Rename Database Files"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|