August 24, 2006 at 1:40 pm
How to change database operating system file name through T-SQL command? For example, I want to change the below data file name from "FILENAME = 'M:\Data\MSSQL.1\MSSQL\Data\SAMPLEDB08242006_data.mdf'" to FILENAME = 'M:\Data\MSSQL.1\MSSQL\Data\SAMPLEDB08242006_data_2.mdf'.
I greatly appreciate if anyone can help me on this.
Thanks,
Bhushan
--------------------------------------------------------------------------
Ilustration:
USE
MASTER
GO
CREATE
DATABASE SAMPLEDB08242006
ON
(
NAME = SAMPLEDB08242006_DATA,
FILENAME = 'M:\Data\MSSQL.1\MSSQL\Data\SAMPLEDB08242006_data.mdf',
SIZE = 30,
MAXSIZE = 100,
FILEGROWTH = 5 )
LOG
ON
(
NAME = SAMPLEDB08242006_LOG,
FILENAME = 'N:\Logs\SAMPLEDB08242006_LOG.LDF',
SIZE = 10,
MAXSIZE = 25,
FILEGROWTH = 1 )
GO
August 26, 2006 at 4:19 pm
Hey Bhushan
Follow these steps:
Hope that helps
Thanks
PP
paul
August 27, 2006 at 5:37 pm
Thank you very much Paul.
Bhushan
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply