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!

Search results for query: *

  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...
  16. matchum

    How can I check for database availability?

    The D/B you are currently connected to can be derived from either: db2 connect or (preferably) db2 get connection state There are other commands that you may find useful db2 list active databases db2 list db directory Of course, you may also want to begin with db2ilist to list the...
  17. matchum

    How to do a DB2 backup

    For full recoverability, the backups will also need logs-files (for rollforward purposes). This is easily achieved by checking via a: db2 get db cfg for kdr Look for LOGRETAIN and USEREXIT. If they are set to "NO", change them by these commands: db2 update db cfg for kdr using...
  18. matchum

    How can I know the execution plan of a SQL statement?

    If you do not already have the explain tables, their DDL in in EXPLAIN.DDL so go into DB2 command mode and issue the command: db2 -tf EXPLAIN.DDL If you are using the control centre, you navigate to the db in question and rm-click to bring up the facilities, one of which is "Explain...
  19. matchum

    How to bulk load data into DB2 V7.2 ??

    For high volume inputs, you could: 1 - Specify "commit;" every (say) 100 entries. This will take the pressure of temporary storage and cache resourses. 2 - Examine/modify tour config settings, I would suggest these as the main ones influencing the type if high-volume dynamic SQL you...
  20. matchum

    IBM DB2 7.2 Enteprise problem

    Mjjsas, 4 suggestions (if you have not already thought of them). 1 - Module db2ckpw Check if chmod treats access to this module differently for some reason. 2 - Since you can access SAMPLE (by default), check the DB authorisations. Look specifically for "Group" specifications...

Part and Inventory Search

Back
Top