Results 1 to 6 of 6

Thread: db2advis error

  1. #1
    Join Date
    Nov 2003
    Posts
    68

    Unanswered: db2advis error

    sir
    why it is giving error

    db2advis -d database_name -t 10 -i input_file -o output file

    select distinct s.san_date,d.san_no,d.sl_no,r.item_code,i.descript ion,d.acc_qty,d.landed_cost,d.sale_price from stores_acceptance_note s,stores_acceptance_note_det d,stores_receipt_det r,item_master i where s.bd_code='HY11' and s.bd_code=i.bd_code and d.bd_code=s.bd_code and i.bd_code=d.bd_code and value(d.landed_cost,0)=0 and i.code=r.item_code and s.san_no=d.san_no order by s.san_date,d.san_no

    Database is reporting the following error:
    error. The db2advis tool needs the explain tables and
    the advise tables to exist. Please create them
    using the EXPLAIN.DDL script in the misc subdirectory
    of the sqllib directory.

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The db2advis tool needs the explain tables and
    the advise tables to exist. Please create them
    using the EXPLAIN.DDL script in the misc subdirectory
    of the sqllib directory.

  3. #3
    Join Date
    Nov 2003
    Posts
    68
    Originally posted by Marcus_A
    The db2advis tool needs the explain tables and
    the advise tables to exist. Please create them
    using the EXPLAIN.DDL script in the misc subdirectory
    of the sqllib directory.

    sir
    how to create that using the EXPLAIN.DDL.
    PL GIVE ME EXAMPLE

  4. #4
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    The EXPLAIN.DDL script is in the "misc" subdirectory of the "sqllib" directory. Look at the script and if you have any questions about it, let us know. If no questions about the script, then run it to create the explain tables.
    Last edited by Marcus_A; 11-06-03 at 03:05.

  5. #5
    Join Date
    Nov 2003
    Posts
    68
    sir i run that script with db2 -vf filename.
    now i t is working .
    thank u sir.

    i have one more doubt normally daily i am using db2 -vtf scriptfile.sql
    this is working fine.

    then what is vtf options .
    then how get help for vtf. option.


    one more
    while restoring database i forgot this option --> without rolling forward then
    it will give error.
    what is the use of rolling forward.
    i think while taking database it will take different time stamp.
    i think that is the reason for that .
    what i am tinking that is correct or not.

  6. #6
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    Both your questions are discussed in the Command Reference Manual.

    The command line options (vtf) are discussed in Chapter 2. Command Line Processor (CLP).

    The restore database command is discussed in Chapter 3. CLP Commands.

    The purpose of rolling forward is to re-apply commited updates to DB2 from the log that are not on the backup (that happened after the backup was taken). So to get the database current, you can restore the last backup image, then re-apply the logs from the time of the backup to the current time (which are not on the backup).

    If you only want to restore to the backup, then "without rolling forward" should be used. Rolling forward the logs only applies if you use either logretain or userexit on recevery parameters for the database. If you have circular logs, you cannot roll the logs forward.

Posting Permissions

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