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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-05-03, 03:48
jagan_5378 jagan_5378 is offline
Registered User
 
Join Date: Nov 2003
Posts: 68
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.
Reply With Quote
  #2 (permalink)  
Old 11-05-03, 04:41
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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.
Reply With Quote
  #3 (permalink)  
Old 11-06-03, 01:34
jagan_5378 jagan_5378 is offline
Registered User
 
Join Date: Nov 2003
Posts: 68
Quote:
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
Reply With Quote
  #4 (permalink)  
Old 11-06-03, 02:02
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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 02:05.
Reply With Quote
  #5 (permalink)  
Old 11-06-03, 05:09
jagan_5378 jagan_5378 is offline
Registered User
 
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.
Reply With Quote
  #6 (permalink)  
Old 11-06-03, 05:53
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,198
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.
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