Link to home
Start Free TrialLog in
Avatar of Jim Youmans
Jim YoumansFlag for United States of America

asked on

DB2Advis for DB2 10.5 on Windows could not open file error

My background is as a MS SQL Server DBA, very new to DB2.

I have a report query that I have in a file and I want to analyse it using db2advis.  I run this

C:\Windows\system32>db2advis -d depsvcs -n MainSchema -i c:\db2advis\sqlfile.in -t  5

And I get this.

execution started at timestamp 2017-07-26-10.55.06.475000
Error.  Could not open this input file [c:\db2advis\sqlfile.in]

Error.  No valid statements were found in this input file or in the
workload table.


In windows I set the security to the db2advis folder to full control by everyone.  Same for the sqlfile.in file.

So how do I get db2advis to actually open and use the file?

Thank you!
ASKER CERTIFIED SOLUTION
Avatar of Kent Olsen
Kent Olsen
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Youmans

ASKER

I tried that and it works fine.  It just won't read the darn file.  I will keep hammering at it.  Thank you.
Are you trying to run db2advis from a normal command prompt window or from the DB2 command prompt window.

There are subtle differences in them.  I wouldn't expect this to be the issue, but you might try the command from each window type.


Kent
OK, stupid answer to my issue.  The server had hide file extension on so my file was not SQLFile.in it was SQLFile.in.txt.   I hate being stupid.  Thank you for your time and sorry for such a stupid stupid issue.
I sometimes hate to admit those things, but I love it when the resolution is so simple.

Anybody that turns on "hide file extension" on any of my servers has to deal with my wrath.  They learn quickly that they're better off just getting used to seeing the extensions....  :)

Kent