Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by matchum

  1. matchum

    FETCH FIRST nn ROWS fails on UDB Insert

    Stoggers, Thanks for that but ROW_NUMBER assumes ODBC-base (unless I misread the manual). I will examine it in more detail tomorrow. In the mean time, if you have any method for quickly allowing the above command file (command.txt) to be driven via (say) db2 -tvf command.txt, then I would be...
  2. matchum

    FETCH FIRST nn ROWS fails on UDB Insert

    I have a command table containing: ---********************************--- connect to sample; drop table emp1; create table emp1 like employee; insert into emp1 select * from employee -- fetch first 5 rows ; select count(*) from emp1; connect reset...
  3. matchum

    locking tables without errors - like SQL Server

    gabegg, Interestingly, the statement in effect at the time was your "DELETE FROM FRGDDBA.SNAP_ORD_HDR;" but of course it may well be one of many SQL statements and may not be the only problem. Another party could have issued a "LOCK TABLE FRGDDBA.SNAP_ORD_HDR IN EXCLUSIVE...
  4. matchum

    USER_EXIT

    memonsa, Quick question for you: What is the syntax of your backup command (how do you 'prove' your exit-rtn) ? Reason: One of our UDB V7.1 machines has had a TSM upgrade but (as far as I can see) nothing has changed within the UDB CFG yet the backup is only copying the D/b and NOT the logs...
  5. matchum

    SQL query help ..

    din987, Whats' wrong with good old: select count(*),year(hiredate) from employee group by year(hiredate)
  6. matchum

    USER_EXIT

    Presumably you are using UDB 7.2 ? What is the DIAGLEVEL set to ? (it may pay to temporarily bump this up to improve the diagnostics you are getting in db2diag.log). Where is your DIAGPATH pointing to ? 7.2 also introduced the "ARCHIVE LOG" command - does this have the same effect ...
  7. matchum

    How to do a DB2 backup

    One of the main reasons (for incrementals) is to save time when the db availability is restricted. Another reason is for compatibility with mainframe versions of DB2. I use incrementals to save space i.e. to keep the latest backups on-line but optimising disk-space whilst enabling rapid...
  8. matchum

    How to do a DB2 backup

    netant, You would not expect any differences between "Incremental" and "Incremental Delta" unless the d/b contents had changed in some way. i.e. If you did a "Full D/B" backup, then an "Incremental D/B" and "Incremental Delta D/B" without...
  9. matchum

    Determine Instance name

    Peakay, I have never needed this before and it looks as though you are expected to first CONNECT then use the "sqleatin - Attach" to deduce it. An idea - you may already have generated an ?.SPF type file which is a neat text-based breakdown of your db Client Configs. The file can be...
  10. matchum

    db2 transaction , lock

    Why not exploit the wonderful db2batch facility. Begin with PERF_DETAIL of 5. You can place all sorts of commands in it for "benchmarking" but it will also yield the source of avoidable overhead. Using the results generated from db2batch, you can then choose the optimum tuning...
  11. matchum

    How can I check for database availability?

    I just realised that with UDB 7.2 you now get the "ping" command which tells you the elapsed time in microseconds between the client and (DB) server. This fits your scenario where you are connected to DB "B" but need to check for the availability of DB "A" without...
  12. matchum

    How can I check for database availability?

    The quick answer (as mentioned yesterday) is the command db2 list active databases but of course you want the CLI equivalent. I will dig around and come back if I find it. In the mean time, can that db2 command be triggered to generate the list of available databases ?
  13. matchum

    How can I check for database availability?

    I take it you are in "SQL SERVER MODE" ? To dump the CLI handle array, CALL QSYS/QSQDMPHA. Then work with the spooled files to examine your output. To dump the CLI handle array for a stream other than the one from which you are issuing the command, CALL QSYS/QSQDMPHA PARM('xxxxxx')...
  14. matchum

    Disaster Recovery (Unable to Rollforward - Missing log file)

    Renato, See my reply to "netant" a few minutes ago which MAY help because it happened to mention the "WITHOUT ROLLING FORWARD" option. I would need more detail but it may be worth a shot in case it is what you want. If we get no reply, good luck !
  15. matchum

    How to do a DB2 backup

    Piece of cake. 1 - Use the command: db2 list history backup all for db kdr You can embellish this to (for example) say: db2 list history backup since 20020330 for kdr where you 'derive' 20020330 by various means as 'n' days ago, but lets not get distracted. The command: db2 list...

Part and Inventory Search

Back
Top