SQL Server >> How to migrate/expand the physical database files which is nearing disk capacity
by Muraly » Mon, 20 Sep 2004 10:19:27 GMT
Hi All,
One of our customers MSSQL 2000 database has grown to the
maximum disk size, now they wish to expand/migrate the
database to another physical disk.
Could someone advice me on how to achieve the above?
Thanks in advance
Regards
Muraly
SQL Server >> How to migrate/expand the physical database files which is nearing disk capacity
by Muraly » Mon, 20 Sep 2004 11:01:58 GMT
Hi All,
One of our customers MSSQL 2000 database has grown to the
maximum disk size, now they wish to expand/migrate the
database to another physical disk.
Could someone advice me on how to achieve the above?
Thanks in advance
Regards
Muraly
SQL Server >> How to migrate/expand the physical database files which is nearing disk capacity
by Dan Guzman » Mon, 20 Sep 2004 11:32:48 GMT
To move database files:
1) detach the database using sp_detach_db
2) move files as desired
3) attach the database files from the new locations using sp_attach_db
You can also add additional files using ALTER DATABASE. For example:
ALTER DATABASE MyDatabase
ADD FILE(NAME='MyDatabase_Data2',
FILENAME='C:\MyDatabase_Data2.ndf',
SIZE=1GB,
FILEGROWTH=100MB,
MAXSIZE=UNLIMITED)
See the Books Online for more information.
--
Hope this helps.
Dan Guzman
SQL Server MVP
How to migrate/expand the physical database files which is nearing disk capacity
by Muraly » Mon, 20 Sep 2004 13:43:24 GMT
Dear Dan Guzman,
Thanks a lot for the solution, i will test this out.
Best Regards
Muraly
using sp_attach_db
For example:
message
the