Moving R/3 Database Files to New Disks 
Use
If your R/3 database or log files are running out of disk space, you have to add new disks to the file system. Depending on the disk configuration currently in use, two different approaches are possible:
- You might be able to add a new disk to an existing RAID array.
Some RAID controllers allow you to add a disk online. However, normally, you have to recreate the the RAID system to include the new disk. To do this, you first have to backup the existing database, then re-create the RAID system and, in final step, restore the database. When the array has been re-created, the additional space on the new disk will be accessible for the operating system and can be utilized by the SQL Server.
For instructions on how to reconfigure an array to include new disks, refer to the documentation provided by your disk vendor.
- If an existing RAID system cannot be extended, you have to add an entire new disk array to your system. In this case, it is necessary to first configure the new array as an NTFS partition. Then existing R/3 database files have to be moved to the new disk in a process that involves detaching and re-attaching the database from the SQL Server.
The following describes the procedure for moving files to a new disk array. It assumes that you have already configured the array as an NTFS partition according to the instructions provided by the disk vendor.
Procedure
In the Enterprise Manager select the server and choose Tools
®
SQL Server Query Analyzer.The Query window of the SQL Server Query Analyzer opens.
Detach the database from the SQL Server with the following stored procedure:
sp_detach_db '<SAPSID>' 'true'
Where
<SAPSID>
is the name of your R/3 database.Execute the stored procedure with Query
®
Execute.
The R/3 database is detached from the SQL Server and is no longer visible in the Enterprise Manager when the display has been refreshed.
Switch to the Windows NT Explorer and copy the R/3 database files to the newly configured disk drive as required.

Do not move the primary data file
<SAPSID>DATA1.mdf
to the new drive. If you move it, the
master database will be modified. As a result, the current backup of the master database will no longer be up to date and you will have to make a new backup immediately.When you have moved the files to the new drive, re-attach the R/3 database to the SQL Server. To do this, switch to the Query Analyzer and execute the sp_attach_db stored procedure. You must specify the location of all the database files, including the log file:
sp_attach_db <SAPSID>, '<filename>', '<filename>'...

sp_attach_db PRD, 'D:\PRDDATA1\PRDDATA1.mdf', 'N:\PRDDATA2\PRDDATA2.ndf', 'N:\PRDDATA3\PRDDATA3.ndf', 'L:\PRDLOG1\PRDLOG1.ldf'
The R/3 database reappears in the database list of the Enterprise Manager and is again visible and accessible for the SQL Server. The newly configured disk array can now be used by the SQL Server.