728x90

Problem(Abstract)

This article describes how to calculate space used for each table and dbspace, including how many extents are used and allocated.

Resolving the problem

Q. How do I calculate how much space is used on my instance?

A. You can use a SMI query to calculate how much space is used.

Note, however, that the output will only be accurate if you run update statistics HIGH for each table before running the query.


select  n.dbsname[1,20],
        n.tabname[1,20],
        count(*) no_extents,
        round(t.rowsize * t.nrows / 2048,0) used,
        sum( pe_size) allocated
from    sysmaster:systabnames n, sysmaster:sysptnext p, systables t
where   n.partnum = p.pe_partnum
and     n.partnum = t.partnum
and     t.tabtype = "T"
group by 1,2,4
order by 3 desc , 5 desc;

Note: This SQL assumes that you are using 2048 page size.


https://www-304.ibm.com/support/docview.wss?uid=swg21251095

728x90
728x90

Question

Is there a Sysmaster query for determining additional extents availble per table/index?

Cause

Here is a simple method to see information about additional extents, extent size and next size. The query can be easily modified to show the information for specific tables or dbspaces.

With this query you can avoid reaching Error -136 ISAM error: no more extents.

Answer

SET ISOLATION TO DIRTY READ;

SELECT dbsname as dbname,
tabname as dbobject,
TRUNC((pg_frcnt/8),0) additional_extents,
count(*) num_of_extents,
sum( pe_size ) total_size,
ti_nptotal pages_allocated,
ti_npused pages_used,
ti_npdata data_pages,
ti_nrows data_rows,
ti_rowsize as row_size,
ti_fextsiz first_extent_size,
ti_nextsiz next_extent_size,
hex(partnum) partnum
FROM systabnames, sysptnext, systabinfo, syspaghdr
WHERE
dbsname != "HASHTEMP"
AND tabname not like "sys%"
AND partnum = pe_partnum
AND partnum = ti_partnum
AND pg_partnum = ((TRUNC(partnum/1048576,0)*1048576)+1)
AND pg_pagenum = (partnum-(TRUNC(partnum/1048576,0)*1048576))
GROUP BY 1, 2, 3, 6, 7, 8, 9, 10, 11, 12, 13
ORDER BY 3 asc, 4 desc;


https://www-304.ibm.com/support/docview.wss?uid=swg21469625

728x90
728x90

Syntax

This statement is an extension to the ANSI/ISO standard for SQL. You can use this statement only with DB-Access.

Read syntax diagramSkip visual syntax diagram
>>-INFO--+-TABLES-------------------------+--------------------><
         '-+-+-COLUMNS-+----+--FOR--table-'   
           | +-INDEXES-+    |                 
           | '-STATUS--'    |                 
           +-+-PRIVILEGES-+-+                 
           | '-ACCESS-----' |                 
           '-+-FRAGMENTS--+-'                 
             '-REFERENCES-'                   

Usage

The INFO TABLES statement lists the names of all the user-defined tables in the current database. Other keywords that can immediately follow the INFO keyword instruct DB-Access to display various attributes of the table whose name follows the FOR keyword. To display information from more than one keyword option, issue multiple INFO statements.

The keyword options that the INFO statement supports can display the following information:

  • TABLES Keyword

    Use TABLES (with no FOR clause) to list the identifier of every table in the current database, not including system catalog tables. Each user-defined table is listed in one of the following formats:

    • If you are the owner of the cust_calls table, it appears as cust_calls.
    • If you are not the owner of the cust_calls table, the authorization identifier of the owner precedes the table name, such as 'june'.cust_calls.
  • COLUMNS Keyword

    Use COLUMNS to display the names and data types of the columns in the specified table, showing for each column whether NULL values are allowed.


  • INDEXES Keyword

    Use INDEXES to display the name, owner, and type of each index of the specified table, the clustered status, and listing the indexed columns.


  • FRAGMENTS Keyword

    Use FRAGMENTS to display the fragmentation strategy and the names of the dbspaces storing the fragments of a fragmented table. If the table is fragmented with an expression-based distribution scheme, the INFO statement also shows the expressions.


  • ACCESS or PRIVILEGES Keyword

    Use ACCESS or PRIVILEGES to display the discretionary access privileges currently held by users, roles, and the PUBLIC group for the specified table. (These two keywords are synonyms in this context.)


  • REFERENCES Keyword

    Use REFERENCES to display the References access privilege for users who can define referential constraints on the columns of the specified table. For database-level privileges, use a SELECT statement to query the sysusers system catalog table.


  • STATUS KeywordUse STATUS to display information about the owner, row length, number of rows and columns, creation date, and the status of audit trails for the specified table.

An alternative to using the INFO statement of SQL is to use the Info command of the SQL menu or of the Table menu of DB-Access to display the same and additional information.


http://publib.boulder.ibm.com/infocenter/idshelp/v115/topic/com.ibm.sqls.doc/ids_sqs_0859.htm?

728x90
728x90

http://www.db2ude.com/?q=node/83


http://soff.tistory.com/


http://www.50001.com/tt/board/ttboard.cgi?act=read&db=20303&page=1&idx=60


DB2의 자가 튜닝 메모리 매니저(STMM)

http://www.ibm.com/developerworks/kr/library/dm-0708naqvi/index.html


DB2 9 소개, Part 3: DB2 9의 자가 튜닝(self-tuning) 메모리 (한글)

http://www.ibm.com/developerworks/kr/library/dm-0606ahuja/

728x90
728x90

SQL access to DB2 monitoring data

http://www.ibm.com/developerworks/data/library/techarticle/0305deroos/0305deroos.html


Best practices for tuning DB2 UDB v8.1 and its databases

http://www.ibm.com/developerworks/data/library/techarticle/dm-0404mcarthur/


DB2 Tuning Tips for OLTP Applications

http://www.ibm.com/developerworks/data/library/techarticle/anshum/0107anshum.html#monitoring


Best Practices: Tuning and Monitoring Database System Performance

http://www.ibm.com/developerworks/data/bestpractices/systemperformance/#In this paper



DB2 Monitoring 및 Tuning

http://www.starhost.co.kr/xe/blog/183775


DB2 기초: 테이블 공간과 버퍼 풀 (한글)

http://www.ibm.com/developerworks/kr/library/0212wieser/0212wieser.html


DB2 기초: DB2 UDB 모니터링의 이유 및 방법 (한글)

http://www.ibm.com/developerworks/kr/library/dm-0408hubel/index.html





728x90
728x90

Confirming the link-edit of the wrapper library files (UNIX)
On federated servers that run UNIX®, some wrappers must be link-edited with the client software for the data source.

You must confirm that a wrapper library file exists on the federated server for each data source that you want to access.


About this task

This task applies to only the following data sources:
  • Informix®
  • Microsoft® SQL Server
  • Oracle
  • Sybase
  • Teradata

Procedure


To check for the wrapper library files:

Check for the library files in the default directory path where WebSphere® Federation Server is installed. If the library files are not in that directory, you must manually link the wrapper libraries to the data source client software.


The directory path for the wrapper library depends on the data source.



Oracle wrapper library files

The Oracle wrapper library files are added to the federated server when you install the wrapper.


When you install the Oracle wrapper, three library files are added to the default directory path. For example, if the federated server is running on AIX®, the wrapper library files that are added to the following directory path are libdb2net8.a, libdb2net8F.a, and libdb2net8U.a, The default wrapper library file is libdb2net8.a. The other wrapper library files are used internally by the Oracle wrapper.


The default directory paths and default wrapper library file names are listed in the following table.


Table 1. Oracle wrapper library locations and file names
Operating systemDirectory pathLibrary file names
AIX

/usr/opt/install_path/lib32/
/usr/opt/install_path/lib64/

libdb2net8.a
Linux®

/opt/IBM/db2/install_path/lib32
/opt/IBM/db2/install_path/lib64

libdb2net8.so
Solaris

/opt/IBM/db2/install_path/lib32
/opt/IBM/db2/install_path/lib64

libdb2net8.so
Windows®%DB2PATH%\bindb2net8.dll


Manually linking the wrapper libraries to the data source client software

If the wrapper library files are not in the directory path, you must manually link the wrapper libraries.

Before you begin


You need root authorization to run the link scripts.


The client software for the data sources that you want to access must be installed and configured on the federated server.


For the djxlinkxxx scripts to issue their messages in your language, at least one database instance must exist on the federated server. If an instance does not exist on the federated server, the scripts will still work. However, the scripts will issue all messages in English.



Procedure


To link the wrapper libraries to the data source client software:

  1. Decide which method you want to use to perform the link:
    MethodStep
    Run the link-edit scripts.
    1. Open a UNIX® command prompt and run the link-edit script for each data source that you want to access. The names of the link-edit script are:
      • djxlinkInformix
      • djxlinkMssql
      • djxlinkOracle
      • djxlinkSybase
      • djxlinkTeradata
    2. Issue the db2iupdt command on each federated database instance to enable federated access to the data sources.

    There is another script, the djxlink script, that attempts to create a wrapper library for every data source that is supported by WebSphere Federation Server. If you run djxlink script and have the client software for only some of the data sources installed, you will receive an error message for each of the data sources that you do not have installed.

  2. After the link is performed, check the permissions on the wrapper libraries. Make sure that the libraries can be read and run by the database instance owners.

Checking the FEDERATED parameter


The FEDERATED parameter must be set to YES to enable the federated server to access to the data sources.


To check the FEDERATED parameter setting:

  1. Issue the following DB2® command to display all of the parameters and their current settings:
    GET DATABASE MANAGER CONFIGURATION
  2. Determine if the concentrator is active based on the value of the max_connections parameter:
    • Off: max_connections is equal to max_coordagents.
    • On: max_connections is greater than max_coordagents.
    The max_connections parameter cannot be active when the FEDERATED parameter is configured to YES. If the concentrator is on, change the setting to off.
  3. Check the FEDERATED parameter setting. If the FEDERATED parameter is set to NO, change the setting to YES. Issue the following DB2 command to change the setting:
    UPDATE DATABASE MANAGER CONFIGURATION USING FEDERATED YES



https://www-304.ibm.com/support/docview.wss?uid=swg21154462

http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp (Configuring - 페더레이티드 시스템 구성)


728x90

'Db2 > Db2 reference' 카테고리의 다른 글

STMM (수정중)  (0) 2011.11.09
모니터링/튜닝 참고  (0) 2011.11.09
테이블과 테이블 공간 상태 분석하기  (0) 2011.10.22
DB2 Federation reference  (0) 2011.10.18
PRECOMPILE/BIND/PACKAGE (수정중)  (0) 2011.10.17
728x90


ProductInformix versionComments
Informix 4GL/SQL  
version 7.32
10.00 
11.10 
11.50
 
Informix 4GL/SQL  
version 7.50
10.00 
11.10 
11.50 
11.70 
 
Informix Enterprise Gateway Manager (EGM)  
version 7.31
10.00 
11.10 
11.50 
11.70 
 
EGM with DRDA 
version 7.31
11.10 
11.50 
11.70 
Requires EGM w/DRDA 7.31.xD5 or higher
Informix I-Spy  
version 2.00
11.10 
11.50 
11.70 
Requires I-Spy 2.00.UD4 or higher
Informix Client Software Developer Kit (CSDK) 
version 2.90
10.00 
11.10 
11.50
 
Informix Client Software Developer Kit (CSDK)  
versions 3.00 and 3.50 
10.00 
11.10 
11.50 
11.70 
 
Informix Client Software Developer Kit (CSDK)  
version 3.70 
11.10 
11.50 
11.70
 
Informix Server Administration (ISA) 
version 1.60
10.00 
11.10 
11.50
 
Informix JDBC Driver  
versions 3.00, 3.10, 3.50 and 3.70
10.00 
11.10 
11.50 
11.70 
 
Informix MaxConnect  
version 1.00
10.00 
11.10 
11.50 
11.70 
 



https://www.ibm.com/developerworks/wikis/display/idsinterop/IDS+Interoperability+with+Other+Products


728x90
728x90

cpio -idmv < *.cpio


cpio: 0511-903 Out of phase!
cpio attempting to continue...

cpio: 0511-904 skipping 732944 bytes to get back in phase!
One or more files lost and the previous file is possibly corrupt!

cpio: 0511-027 The file name length does not match the expected value.


cpio -idcmv < *.cpio



728x90

'*nix' 카테고리의 다른 글

Determining CPU Speed in AIX  (0) 2011.11.20
Determining how many CPUs you have on HP-UX  (0) 2011.11.20
Korn Shell Commands  (0) 2011.10.23
dummy file 생성방법  (0) 2011.03.11
디스크 사용량 확인  (0) 2011.03.11
728x90

이 문서에서는 Windows Mail을 사용하여 메일을 백업하고 복구하는 방법에 대해 설명합니다.


방법 2: 전체 메일 데이터 백업하기

여기에서는 바탕 화면에 백업 폴더를 만들어 예로 사용합니다.

1. [시작], [모든 프로그램]을 차례대로 클릭합니다. 표시된 메뉴에서 [Windows Mail]을 클릭합니다.

2. Windows Mail이 시작되면 [도구], [옵션]을 차례대로 클릭합니다.


3. 옵션 화면에서 [고급]을 클릭한 다음 화면 화단의 [유지 관리]를 클릭합니다.


4. 유지 관리 화면의 중간에 있는 [폴더 저장]을 클릭합니다.


5. 메일 데이터의 저장 위치를 확인합니다.

개인 메시지 저장소 경로를 선택한 다음 마우스 오른쪽 단추를 클릭합니다. [복사]를 클릭합니다.


6. Windows Mail을 종료합니다. 

폴더 저장, 유지 관리, 옵션 화면을 모두 닫고 Windows Mail을 종료합니다.


7. 컴퓨터 폴더를 엽니다. 

[시작]을 클릭한 다음 오른쪽의 [컴퓨터]를 클릭합니다.


8. 메일 데이터가 저장된 폴더를 엽니다.

컴퓨터 화면 상단에 마우스를 한 번 클릭한 다음 오른쪽 클릭하여 복사한 경로를 붙여넣습니다. 



Enter 키를 누르면 메일 데이터가 저장된 폴더가 표시됩니다.


백업하려는 메일 데이터를 선택합니다.

화면 왼쪽 위의 [구성]을 클릭한 다음 [모두 선택]을 클릭합니다. 


10. 메일 데이터를 복사합니다.

모두 선택한 상태로 다시 [구성]을 클릭한 다음 [복사]를 클릭합니다.


11. 원하는 위치에 폴더를 만듭니다(여기에서는 예로 바탕 화면에 백업을 만듬)

12. 바탕 화면에 만들어 둔 백업 폴더를 열어 데이터를 붙여 넣습니다.

13. 아래 그림과 같이 메일 데이터가 폴더에 표시됩니다. 



백업한 메일 데이터를 복원하기

여기에서는 위에서 바탕 화면에 백업한 메일 데이터를 예로 들어서 복원하는 방법에 대해 설명합니다.


1. Windows Mail을 시작합니다. 

[시작], [모든 프로그램]을 차례대로 클릭합니다. 표시된 메뉴에서 [Windows Mail]을 클릭합니다.


2. Windows Mail 가져오기 마법사를 표시합니다. 

[파일], [가져오기], [메시지]를 차례대로 클릭합니다. 


3. 가져올 형식을 선택합니다.

Windows 메일 가져오기 마법사가 표시됩니다. 전자 메일을 가져올 형식을 선택하십시오 아래에서 [Microsoft Windows Mail 7]을 클릭하고 [다음]을 클릭합니다.


4. 메시지 위치 화면을 표시합니다.

[찾아보기]를 클릭해서 메시지가 있는 폴더 장소를 찾아갑니다.


5. 가져올 전자 메일 메시지의 위치를 선택합니다. 여기에서는 바탕 화면에 저장한 백업 폴더를 선택하고 [폴더 선택]을 클릭합니다.


6. [다음]을 클릭합니다.


7. 폴더 선택 화면이 표시됩니다. 

가져오려는 폴더를 클릭하고 [다음]을 클릭합니다. 여기에서는 예로 [모든 폴더]를 클릭합니다. 

참고: 원하는 폴더만 가져오려면 [선택한 폴더]를 클릭합니다.


8. 가져오기 완료 화면이 표시됩니다. 메시지를 "Microsoft Windows Mail 7형식으로 가져왔습니다"가 표시되면 [마침]을 클릭합니다.


9. 가져온 메일 데이터를 확인합니다.

올바르게 가져온 경우, 아래 그림과 같이 가져온 폴더에 메일 데이터가 표시됩니다.



http://support.microsoft.com/kb/942128/ko

728x90
728x90

The following shows the steps to use ontape with this process.


On the primary

1. Edit the HDR configuration parameters (DRAUTO, DRTIMEOUT,DRINTERVAL, DRLOSTFOUND, DRIDXAUTO and, optionally,

LOG_INDEX_BUILDS) in the $ONCONFIG file.

2. Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.


중요: sqlhosts 파일의 nettype 필드 또는 레지스트리 및 NETTYPE 구성 매개변수를 ontlitcponsoctcp 또는 ontlispx와 같은 네트워크 프로토콜로 설정하여 서로 다른 두 컴퓨터에 있는 데이터베이스 서버가 서로 통신할 수 있도록 하십시오. nettype 필드가 onipcshmonipcstr 또는 onipcnmp와 같은 비네트워크 프로토콜을 지정하면 HDR이 작동하지 않습니다.


3. Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.

4. Make sure the databases to be replicated are in logged mode.

5. Send a copy of the primary instance $ONCONFIG file to the secondary server.

6. Run ontape -s -L 0.

7. Run onmode -d primary secondary_server.


On the secondary

1. Add entries to the $INFORMIXSQLHOSTS and /etc/services files for network connections.

2. Modify the /etc/hosts.equiv or the .rhosts file for the informix user ID to enable trusted communication.

3. Modify the onCONFIG parameters for the secondary server: DBSERVERNAME and DBSERVERALIASES.

4. Make sure that all chunk paths are created, have the correct permissions, and ensure there is enough space on the disks for the data to reside.

5. Run ontape -p.

6. If necessary, run onmode -l to roll forward any logical logs that may have been saved on the primary before the secondary physical restore is finished.

7. Run onmode -d secondary primary_server.

728x90

'Informix > informix reference' 카테고리의 다른 글

INFO Statement  (0) 2011.11.11
IDS Interoperability with Other Products  (0) 2011.11.03
ON-Bar configuration parameters on Informix  (0) 2011.10.24
Uninstalling ISM  (0) 2011.10.24
Setting Up ISM on UNIX  (0) 2011.10.24

+ Recent posts