
If your SAP 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:
Some systems allow you to add disks online. If this is not possible, you first have to backup the existing database, then re-create the device and, in a final step, restore the database. When the device has been re-created, the additional space on the new disks is accessible for the operating system and can be used by the SQL Server.
For instructions on how to reconfigure your devices to include new disks, refer to the documentation provided by your disk vendor.
The following describes the procedure for moving files to a new disk device. It assumes that you have already configured the device as an NTFS partition according to the instructions provided by the disk vendor.
Procedure
The Detach Database dialog box appears.
The SAP database is detached from the SQL Server and is no longer visible in the SQL Server Management Studio.
The Attach Database dialog box appears.
All the files belonging to the <SAPSID> database are listed under Original File Name.
The SAP database reappears in the database list of the SQL Server Management Studio and is again visible and accessible for the SQL Server. The SQL Server can now use the newly configured disk device.
Alternatively to using the graphical interface of the SQL Server Management Studio, you can detach and attach the database by running stored procedures in a query window.
To detach the database enter:sp_detach_db <SAPSID>
To attach the database enter:
sp_attach_db <SAPSID>, '<full path to and name of the MDF file>', '<full path to and name of the next datafile (NDF)>', '<etc>', '<full path to and name of the log file (LDF)>'