If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to set automatic_set_policy stored procedure call for reorg and runstats in db2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-11, 23:31
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Question How to set automatic_set_policy stored procedure call for reorg and runstats in db2

Hi thanks in advance


I enabled automatic maintenance to my database by enabling the db parametrs

GET DB CONFIG
...
Automatic maintenance (AUTO_MAINT) = ON
Automatic database backup (AUTO_DB_BACKUP) = ON
Automatic table maintenance (AUTO_TBL_MAINT) = ON
Automatic runstats (AUTO_RUNSTATS)= ON
Automatic statistics profiling (AUTO_STATS_PROF) = OFF
Automatic profile updates (AUTO_PROF_UPD) = OFF
Automatic reorganization (AUTO_REORG) = ON

and i set the AUTOMAINT_SET_POLICYFILE for the automatic backup by calling the stored procedure by issuing the below command

db2 "call syspoc.automaint_set_policyfile('auto_backup','db2 autobackup.xml')"
its working properly


now am trying to set the policy files to runstats and reorg but those are not working properly
my runstats xml file and command are given below

db2 "call syspoc.automaint_set_policyfile('auto_runstats',BL OB('db2runstats.xml'))[U]"

db2runstats.xml file:
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<DB2AutoRunstatsPolicy xmlns=\"http://www.ibm.com/xmlns/prod/db2/autonomic/config\">
<RunstatsTableScope><FilterCondition/></RunstatsTableScope>
</DB2AutoRunstatsPolicy>

its giving some <name> of the file is not a XML file content and no parameter found in procedure and sqlcode1447N error

i tried to set that policy with this command also
db2 "CALL SYSPROC.AUTOMAINT_SET_POLICY
( 'AUTO_RUNSTATS',
BLOB(' <?xml version=\"1.0\" encoding=\"UTF-8\"?>
<DB2AutoRunstatsPolicy xmlns=\"http://www.ibm.com/xmlns/prod/db2/autonomic/config\">
<RunstatsTableScope><FilterCondition/></RunstatsTableScope>
</DB2AutoRunstatsPolicy>')
)"

in this case also am getting the same error code

IBM DB2 9.7 for Linux, UNIX and Windows Information Center
pls check this link from this link only i got examples




pls can you guide me how to call the stored procedure for runstats and reorg pls provide example XML files


Thanks and Regards

Siddhu
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On