Re: Renaming DB
- From: "Eric" <eric@xxxxxxxx>
- Date: Thu, 23 Apr 2009 11:20:36 -0400
Thank you Russell.
So far,
I renamed the DB using:
alter database <OLD_DB> modify name= <NEW_DB>
I renamed the data and log files using the MS link
But when I check the properties of the NEW_DB using the server manager, tabs
Data Files and Transaction Log,
it still shows the old name OLD_DB_Data and OLD_DB_Log in the "File Name"
field (even though the location bears the new name).
Any idea.
Thank you again
Eric
"Russell Fields" <russellfields@xxxxxxxxxx> wrote in message
news:OdzWcqBxJHA.956@xxxxxxxxxxxxxxxxxxxxxxx
As Kevin mentioned, you must detach the database, move (or rename) the
file, then reattach. Here is a link to the steps:
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
RLF
"Kevin3NF" <kevin@xxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:%2323QzDBxJHA.1504@xxxxxxxxxxxxxxxxxxxxxxx
I may be wrong, but I think you'll have to detach/rename/attach to change
the o/s filenames. According to BOL, you can only rename o/s files for
tempdb and then it only takes effect after a restart.
ALTER Database
FILENAME
Specifies an operating system file name. When used with MODIFY FILE,
FILENAME can be specified only for files in the tempdb database. The new
tempdb file name takes effect only after SQL Server is stopped and
restarted.
'os_file_name'
Is the path and file name used by the operating system for the file. The
file must reside in the server in which SQL Server is installed. Data and
log files should not be placed on compressed file systems.
If the file is on a raw partition, os_file_name must specify only the
drive letter of an existing raw partition. Only one file can be placed on
each raw partition. Files on raw partitions do not autogrow; therefore,
the MAXSIZE and FILEGROWTH parameters are not needed when os_file_name
specifies a raw partition.
--
Kevin3NF
SQL Server dude
You want fries with that?
http://kevin3nf.blogspot.com/
I only check the newsgroups during work hours, M-F.
Hit my blog and the contact links if necessary...I may be available.
Twitter: Kevin3NF
"Eric" <eric@xxxxxxxx> wrote in message
news:Oopntg4wJHA.5584@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
I am running SQL 2000 and I just renamed one of my DB using:
alter database <OLD_DB> modify name= <NEW_DB>
The name of the DB did change when I look into the SQL server manager
but the name of the data file and the transaction log on the HD are
still the same (old name).
Is there a way to rename those files too?
Thank you.
Eric
.
- Follow-Ups:
- Re: Renaming DB
- From: Kevin3NF
- Re: Renaming DB
- References:
- Renaming DB
- From: Eric
- Re: Renaming DB
- From: Kevin3NF
- Re: Renaming DB
- From: Russell Fields
- Renaming DB
- Prev by Date: Re: Renaming DB
- Next by Date: Re: Renaming DB
- Previous by thread: Re: Renaming DB
- Next by thread: Re: Renaming DB
- Index(es):
Relevant Pages
|