Creating Batch Statspack Reports Without Prompts

Q: I want to create 1 day statspack reports in batch mode
A: Only if provide parameters in advance to spreport script, that is all.

 sh "2007/12/26 00:00:00" "2007/12/27 23:59:59" >batch_statspack_report.sql
 echo "exit;" >>batch_statspack_report.sql
 sqlplus -S perfstat/****** @batch_statspack_report.sql
 zip *.txt
Above example used follow procedure to run statspack silently.
 define begin_snap=$START_ID
 define end_snap=$END_ID
 define report_name=$REPORT_NAME


About Pang

Oracle DBA working in database, fusion middleware and identity management and cloud.
This entry was posted in Oracle database. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s