Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2011
    Posts
    43

    Unanswered: 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

  2. #2
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Why do you supply a BLOB for a parameter that's VARCHAR?

  3. #3
    Join Date
    Nov 2011
    Posts
    43
    i saw that syntax in info center

  4. #4
    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

  5. #5
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    Quote Originally Posted by siddhu.pandu0854 View Post
    i saw that syntax in info center
    No you did not.

  6. #6
    Join Date
    Jun 2003
    Location
    Toronto, Canada
    Posts
    5,516
    Provided Answers: 1
    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.

  7. #7
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •