Database Analysis 

By using sapdba -check , -analyze , or -next (see SAPDBA Command Mode ), you can display information about all relevant parts and parameters of the database (tablespaces, fragmentation, data files, extents, directories, freespace, redo log files, SGA parameters, init.ora parameters, etc.) or database analyses. The information is stored in a corresponding log in the SAPCHECK directory.

You can use the Scheduler in the MS ResourceKit (MICROSOFT) to schedule the creation of a check/analysis log, or enter the following command in the command line (example for using sapdba -check ):

at \\<host name> <time> check.bat

at \\ps0001 00.00 check.bat

The database must be active at the specified time. If the database is usually shut down, you can also schedule database startups and shutdowns. To do this use sapdba -startup or
sapdba -shutdown (see SAPDBA Command Mode)

The check.bat file should have the following contents:

set PATH=%PATH%;<x:>\usr\sap\<SID>\SYS\exe\run
set ORACLE_HOME=<path>
set ORACLE_SID=<SID>
set SAPDATA_HOME=<path>
sapdba -check

Make sure the path for SAPDBA is set correctly.

For file check.bat

set PATH=%PATH%;D:\usr\sap\C11\SYS\exe\run
set ORACLE_HOME=D:\orant
set ORACLE_SID=C11
set SAPDATA_HOME=E:\oracle\C11
sapdba -check

To check any of the background statements that have been set, enter at in the command line.

Information about the tables and tablespaces can also be displayed online by selecting the menu items Tablespace administration ® Freespace and fragmentation of all tablespaces (see SAPDBA: Tablespace Administration ) or Reorganization ® Check extents and fragmentation (see SAPDBA: Reorganization).