Register | Login

Published Articles » DB2

Is it possible to rename a column name?

Posted by jyothsnav 2003 days ago (Editorial)

Yes it is possible to rename a column name in DB2 V9.7 version online.


Exception: If the column to be renamed is a part of primary key, we should drop the primary key, rename the column and then recreate the primary key


Command:


ALTER TABLE <TABNAME> RENAME COLUMN <OLDNAME> TO <NEWNAME>


 


How to find the last used date of an index

Posted by jyothsnav 2003 days ago (Editorial)

In earlier versions of DB2, we donot have the facility to find the last used date of an index. But in V9.7, this feature is available which will help us in analysing the real usage of that index and whether it is required.


Command:


SELECT LASTUSED FROM SYSCAT.INDEXES WHERE INDNAME='?'


OR


SELECT INDNAME,LASTUSED FROM SYSCAT.INDEXES WHERE TABNAME='?'


 

Four Phases of Load Operation

Posted by jyothsnav 2247 days ago (Editorial)

Four Phases of Load operation:


LOAD Phase - four things happen during the load phase; data is read from the source file specified and loaded into the appropriate target table, index key values and table statistics are collected, point of consistency information is recorded and invalid data is placed into dump files.


(LOAD QUERY command is used to monitor the progress/status of

Difference between Import and Load utility

Posted by jyothsnav 2247 days ago (Editorial)

The import utility copies data using SQL insert or update operations, as a result each row processed must be checked for constraint compliance and all activities performed is recorded in the databases transaction log files.


Load utility, inserts data into a table by building data pages consisting of several individual rows of data and writing those pages directly to the table space con

DB2 Load Utility

Posted by jyothsnav 2247 days ago (Editorial)

Like the Import utility, the LAOD utility is designed to read data directly from an external file and store it in a specific table. However, unlike when the import utility is used, when the Load utility is used the table to which data is to be copied must already exist in the database before the load operation is initiated.


Syntax:


LOAD FROM [filename] OF [DEL|ASC|IXF]



DB2MOVE utility

Posted by jyothsnav 2247 days ago (Editorial)

Its easy to see how the export utility can be used together with the import utility or load utility to copy a table from one database to another, but what if we want to copy several tables or an entire database?


In this case, data can be copied table by table using export/import/load but a more efficient way to copy an entire DB2 database is by using the DB2MOVE utility.


DB2MOV

DB2 Import Utility

Posted by jyothsnav 2247 days ago (Editorial)

One way to copy data from an external file to a database is by using DB2's import utility; the import utility is desgined to read data directly from an external file (provided the file is written in a format that is supported by DB2) and insert it in a specific table or updatable view.


Syntax:


IMPORT FROM [filename] OF [DEL|ASC|IXF|WSF]


COMMITCOUNT [commitcount] | COMMI

DB2 Export Utility

Posted by jyothsnav 2247 days ago (Editorial)

The export utility is designated to extract data from a DB2 database table or view and externalize into a file using the file formats like DEL (Delimited ASCII), WSF (worksheet format), IXF (PC Information Exchange Format). Such files can then be used to provide data values to other databases and software applications such as spreadsheets and word processors.


Syntax:


EXPORT TO

SQL0911N and SQL0913N Error Code

Posted by jyothsnav 2257 days ago (Editorial)

 


SQL0911N - The current transaction has been rolled back because of a deadlock or timeout. Reason code (reason-code)


SQL0913N - Unsuccessful execution caused by deadlock or timeout. Reason code (reason-code)


The current unit of work was involved in an unre

DB2 CREATE DB in Restrictive Mode

Posted by jyothsnav 2336 days ago (Editorial)
DB2 CREATE DB SAMPLE RESTRICTIVE

RESTRICTIVE

If the RESTRICTIVE option is present it causes the restrict_access database configuration parameter to be set to YES and no privileges or authorities are automatically granted to PUBLIC.

If the RESTRICTIVE option is not present then the restrict_access database configuration parameter is set to NO and all of the following privileges are auto
Audit facility performance and administration have been enhanced

The audit utility generates a trail of audit records for a series of predefined and monitored database events. Version 9.5 offers major enhancements to the audit facility.

The enhancements to the DB2 audit facility for Version 9.5 include fine grained configuration, new audit categories, separate instance and database logs, an
Sort News
Username:

Password:

Remember:
YourWiz.com, is a website that will allow everyone to share their knowledge, tip or information through community micro blogging.