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 TouchToneTommy 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 2742

  1. 2742

    COUNT & GROUP BY

    Hi There, You might find the having clause helpful. eg select ref_id, ref_des name from tablea, tableb where tablea.ref_id = tableb.ref_id and name in (select name from tablea group by name having count(*) > 1); I hope this is clear but basically you select all the info from your other...
  2. 2742

    date calculation

    Your first statement looks good to me. Whats the error?
  3. 2742

    DB2 equivalent of WAITFOR and SLEEP

    Hi There The answer to you question is all the sleep type functions are built on procedual language added to the database basic ansi SQL. ie transac sql for sql server and plsql for oracles. In DB2 if you want to do anything procedual eg loops if's you have to write it in a third party...
  4. 2742

    How to load flat files in DB2 tables?

    Hi There Db2 has tools to import and export to flat file in several formats. Db2 import from d:\temp.del of del insert into table1 The other format is ixf. There is also a load function which is much faster than an import as it doesn't log so for big files use load but it might put you...
  5. 2742

    Scheduling of a backup procedure on NT

    Do you need to do cold backups? Are you using userexit. If so do an online backup so you don't have to force all the connections off. The only other way maybe is to run the force command several times!! I have problems with this doing it manually. It usually takes a few goes. Also make...
  6. 2742

    SQL exception 1337N -- help please!

    SQL1337N The service &quot;<service-name>&quot; was not found. Explanation: The system cannot resolve the port number associated with the service-name. Possible causes are: An incorrect service-name value was specified when the TCP/IP node was cataloged. The correct service-name was...
  7. 2742

    Userexit for online backup and restore

    could you give a bit more information on what you are doing. I don't know how different v7 is to v6 but once you had set up user exit with a directory for you current logs and a directory to archive them, the database knows about all the logs. Eg once the log file had no open transactions in...
  8. 2742

    DB2 Communication Port

    Hi there The port number is set in a file called services. On NT is found \winnt\system32\drivers\etc In there is a few other files you might find helpful. The lines you want to change will look something like this : db2cDB2 50000/tcp #connection port for the DB2 instance...
  9. 2742

    Which catalog table has total pages, used pages

    Hi There There is no catalogue table that tells you how much space is allocated to a tablespace you can only find out how much is used by a query like DB2 SELECT TABNAME, COLCOUNT, TABLEID, TBSPACEID, CARD,NPAGES,FPAGES,(((FPAGES*4096)/1024)/1024) as SizeUsed,TBSPACE,INDEX_TBSPACE FROM...
  10. 2742

    Database is in Roll forward pending state

    DO THE COMMAND ON A COMMAND WINDOW TRY SOME OF THE FOLLOWING: DB2 ROLLFORWARD DATABASE DBNAME TO END OF LOGS AND STOP (THIS IS THE ONE I USE) OTHER OPTIONS INCLUDE: DB2 ROLLFORWARD DATABASE DBNAME COMPLETE DB2 ROLLFORWARD DATABASE DBNAME TO END OF LOGS AND COMPLETE HOPE THIS HELPS
  11. 2742

    Extracting database, instance, tablespace info using CLI

    Hi Bill I know that there is a sample C Program for Tablespaces because i have used and adapted it make it do what i want it to do. I can post it if you are interested but the sample c program i used is called tabspace.sqc . But these programs are only a sample of the API's avaliable to you...
  12. 2742

    Extracting database, instance, tablespace info using CLI

    The CLI's that you can use are: Get Instance List Active Databases List Database Directory List Tablespaces ( show detail) List Tablespace Containers There are many more just type db2 ? on a command window. Hope this helps alittle more
  13. 2742

    SQL for &quot;list tablespaces show detail&quot;?

    Here's a sql statement to find out how much space is actually used but not how much is allocated!! DB2 SELECT TABNAME, COLCOUNT, TABLEID, TBSPACEID, CARD,NPAGES,FPAGES,(((FPAGES*4096)/1024)/1024) as SizeUsed,TBSPACE,INDEX_TBSPACE FROM SYSCAT.TABLES WHERE TBSPACEID IN (SELECT TBSPACEID FROM...
  14. 2742

    Extracting database, instance, tablespace info using CLI

    Try using some of the sample C programs that call DB2's API's
  15. 2742

    SQL for &quot;list tablespaces show detail&quot;?

    Hi There I asked the same question about 3 months ago and found i could write a query to find out an eastimate of the space used but you could only use it so far because the system tables don't have that level of detail. In the end i adapted an API writen in C to find out the total spaced...

Part and Inventory Search

Back
Top