From: harifajri on
Hi,
i need help.
I have a server HP G6, with MS SQL 2008 installed on it.
My "Drive C" is almost full.
My "database.mdf" dan "database.ldf" is on drive C.

I plan to buy a new hard disk and then next time i will have a Drive
'D'.

Is it posible in SQL 2008 if my drive C is full, then my
"database.mdf" on drive C,
will continue (automatically) to drive D?

What should i do?



Best Regards,

HF
From: Erland Sommarskog on
harifajri(a)gmail.com (harifajri(a)gmail.com) writes:
> i need help.
> I have a server HP G6, with MS SQL 2008 installed on it.
> My "Drive C" is almost full.
> My "database.mdf" dan "database.ldf" is on drive C.
>
> I plan to buy a new hard disk and then next time i will have a Drive
> 'D'.
>
> Is it posible in SQL 2008 if my drive C is full, then my
> "database.mdf" on drive C,
> will continue (automatically) to drive D?

No, you can't do that.

But you can add a second file to the filegroup, and put that new file on
the new disk. You should also turn off autogrow on the original file.

But it may be better in the long run to move the database file to the new
disk entirely.

See the command ALTER DATABASE in Books Online about these operations.
There is a specific topic "Moving Database Files" that can be of interest.

--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx