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 Mike Lewis 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. macehill

    Plese help:Sequence question?

    No need to create a trigger:- C:\Program Files\SQLLIB\BIN>db2 create sequence test_seq start with 1 maxvalue 2 nocycle DB20000I The SQL command completed successfully. C:\Program Files\SQLLIB\BIN>db2 values (nextval for test_seq) 1 ----------- 1 1 record(s) selected...
  2. macehill

    Date Conversion

    Just 1 small change for us non-Americans:- SELECT SUBSTR('JAN-FEB-MAR-APR-MAY-JUN-JUL-AUG-SEP-OCT-NOV-DEC-',MONTH(CURRENT_DATE)*4-3,4) CONCAT(SUBSTR(CHAR(YEAR(CURRENT_DATE)),3,2)) FROM SYSIBM.SYSDUMMY1
  3. macehill

    long character storage

    Truusvlugindewind, To clarify:- jcale4 asked how he could speed up the handling of a column containing 2000+ characters. He then goes on to enquire if CLOBs would help improve performance. My reply didn't address the 2nd CLOB question. You can store up to 32768 characters in a varchar column of...
  4. macehill

    Arrays in DB2?

    An array is surely a Table for developers who don't have the luxury of a database?
  5. macehill

    How do I determine if a table is locked?

    Getting back to the original questions. You can find out if a table is locked either by typing:- "db2 get snapshot for locks on <database>" which will show you all of the locks on the database or 1. You could do a select on the table you suspect is locked. If your select hangs then:- 2...
  6. macehill

    Should I reorg freshly built DB tables?

    You only need to reorg tables if there has been a lot of update/delete activity associated with it. i.e. if you've just loaded new tables, you shouldn't need to. You do need to run "runstats", however. This provides the DB2 optimiser with knowledge about each table, so that it can pick the best...
  7. macehill

    long character storage

    You could increase the prefetchsize associated with the tablespace which contains the table with the large varchar columns in them. Also check the bufferpool is big enough to hold the pre-fetched data.
  8. macehill

    How to view a tables DDL

    Presumably you're trying to look at the ddl for a table on a remote database. Each server i.e. physical machine which has DB2 on it has a DB2 Administration Server. This allows remote Administration Clients to discover what instances and databases are on the server and to interact with them. I...
  9. macehill

    Snapshot Isolation Level

    Not so far, but I agree it needs it. At the moment, the isolation levels are:- 1. Repeatable read (locks every row read in the cursor) 2. Read Stability (locks every row selected in the cursor) 3. Cursor Stability (locks the current row selected in the cursor) 4. Uncommitted Read (Doesn't lock...
  10. macehill

    Timerons - are the comparable across servers ?

    Timerons are pretty much useless imho. If you want to performance a piece of sql, do this:- 1. Do a "runstats" on all the tables in the sql. 2. Run dynamic explain and look for:- a) Table scans b) Nested loop joins to tables with a lot of rows in them c) Inefficient indexes e.g. where...
  11. macehill

    migrate foxpro2.6 Memo fields to UDB db2 version 8.1

    Memo fields could be converted to clobs or varchars dependent on their length. Easiest way to import Gigabytes worth of data would be to export it to csv or del format and then load or import it in to db2. It should be possible to generate clob-style files for the memo fields for db2 to read.
  12. macehill

    Connection port for DB2 instance .???

    You're right it's in /etc/services. The normal port number is 50000. Just look for something like db2_db2inst1 or whatever you've called your instance. You'll need to stop and re-start db2 for it to take effect. You can use netstat to check it's listening on the correct port.
  13. macehill

    using erwin to generate db2 ddl scripts

    You just be able to go the Table and then click on child relationship and rename the constraint that way.

Part and Inventory Search

Back
Top