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 > Automaint_set_policyfile(db2)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-09-11, 13:43
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Automaint_set_policyfile(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 is this and isuued the command is

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 sqlcode1447N error

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
  #2 (permalink)  
Old 11-09-11, 13:48
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Why do you supply a BLOB for a parameter that's VARCHAR?
Reply With Quote
  #3 (permalink)  
Old 11-09-11, 14:20
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
i saw that syntax in info center
Reply With Quote
  #4 (permalink)  
Old 11-09-11, 14:22
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
i tried to set that policy with this comman 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
Reply With Quote
  #5 (permalink)  
Old 11-09-11, 15:44
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by siddhu.pandu0854 View Post
i saw that syntax in info center
No you did not.
Reply With Quote
  #6 (permalink)  
Old 11-09-11, 15:45
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by siddhu.pandu0854 View Post

in this case also am getting the same error code
My crystal ball is malfunctioning today. You may want to copy and paste your entire session here if you need meaningful answers.
Reply With Quote
  #7 (permalink)  
Old 11-09-11, 23:01
siddhu.pandu0854 siddhu.pandu0854 is offline
Registered User
 
Join Date: Nov 2011
Posts: 43
Quote:
Originally Posted by n_i View Post
My crystal ball is malfunctioning today. You may want to copy and paste your entire session here if you need meaningful answers.
IBM DB2 9.7 for Linux, UNIX and Windows Information Center

Pls check this once i got examples from this info link only thats y i said like that
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