Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
ksr39
Posting Yak Master
193 Posts |
Posted - 2011-08-02 : 09:59:34
|
Hi All, I have a database of 700GB and its .mdf and .ldf are in the same drive and both the files are increasing gradually.now i want to create one more data file so that there can not be any space issue and i want to place it in separate drive.please can any one help me on this how to create a .ndf file for an existing(running) db.Thanks In Advance. |
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2011-08-02 : 10:04:02
|
ALTER DATABASE myDB ADD FILE(NAME=myDB_2, FILENAME='c:\myDB_2.ndf', SIZE=16MB, MAXSIZE=1024MB, FILEGROWTH=32MB) TO FILEGROUP [PRIMARY]Change the database, file name, and size values accordingly. |
|
|
ksr39
Posting Yak Master
193 Posts |
Posted - 2011-08-02 : 10:17:44
|
thank you. |
|
|
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2011-08-02 : 16:50:35
|
You can add secondary data file through GUI. Right click on database, select properties, select files, select add. |
|
|
|
|
|