DB2 Common fool question 1000 ask (one)

Source: Internet
Author: User
Tags db2 db2 client db2 error db2 installation lowercase types of tables websphere application server

When you apply DB2, you may encounter some seemingly simple problems, especially for beginners, I have a simple
Summed up, released to everyone, I hope that we can help, but also welcome everyone to discuss together, common development and common progress!

The following are mainly based on db27.x. The following characters are lowercase.

This article for DB2 Master is not to see.

What are the levels of 1.DB2 products?
Enterprise version of the Nterpriseedition
Workgroup Edition Workgroupedition
Enterprise Extended Edition Enterpriseextendededition
Personal version of the Personaledition
Satellite version of the Satelliteedition
Miniature version of the Everyplace
  
2. What are the products that can be connected to the DB2 database?
DB2 Client
DB2Connect
Db2datapropagator
Db2net. DATA
Db2datajoiner
Db2relationalconnect
WebSphere Application Server
Wait
  
What are the communication protocols supported by 3.DB2?
Tcp / ip
NETBIOS
Appg
Ipx/spx
Namepipe
Wait
  
What are the 4.DB2 client products?
DB2 Run Time Client db2runtimeclient
DB2 Management client Db2administrationclient
DB2 Application Development Client Db2applicationdevelopmentclient
DB2 Thin Client Db2thinclient
  
5. Can a database be installed on multiple database servers?
OK
  
6. From which version can stored procedures be created with SQL statements?
After version 7.1
  
What relational Extender does 7.DB2 provide?
Text Extender Textextender
Image Extender Imageextender
Audio Extender Audioextender
Video Extender Videoextender
Spatial Data Extender Spatialextender
XML Extender Xmlextender
Network Search Extender Net.searchextender
  
DB2 installation directory structure in 8.WINDOWS and OS/2 environments?
Use SETUP.EXE to install
  
\sqllib installed root directory, including readme file
\SQLLIB\ADSM contains Adstar distributed Storage Manager files
\sqllib\bin executable file containing the DB2 tool
\sqllib\bnd the binding file containing the DB2 tool
\SQLLIB\CC contains the files required to run the control center
\SQLLIB\CFG contains the default system configuration file
\sqllib\conv contains code page conversion table files
\SQLLIB\DB2 the default instance directory
\SQLLIB\DB2DAS00 default DB2 Management Server directory
\sqllib\doc contains DB2 online manuals
\sqllib\function Default user-defined function directory
\sqllib\function\unfenced default non-quarantined user custom correspondence directory
\sqllib\help online Help file
Java class libraries required by \SQLLIB\JAVADB2
JAVA12 contains JDK1.2 support programs
\sqllib\misc contains HTML search server files
\sqllib\msg\prime contains information files
\SQLLIB\QP contains Querypatroller client files
\sqllib\samples contains sample programs and sample scripts
\sqllib\spmlog contains DB2 Sync point manager log file
\sqllib\thnsetup contains thin client installation files
9.UNIX and Linux Environment DB2 installation directory structure?
Use DB2SETUP.EXE to install
The following directories are also created under the root directory of the installation:
  
The root directory of the readme installation, including the Readme file
ADM contains system administration tool files
ADSM contains Adstar distributed Storage Manager files
Bin contains binary executables for the DB2 tool
BND the binding file containing the DB2 tool
CC contains files required to run the control center
The CFG contains the default system configuration file
Conv contains code page conversion table files
Doc contains DB2 online manuals
Function Default user-defined function directory
function\unfenced default non-quarantined user custom correspondence directory
Install contains setup programs
Instance contains instance scripts
Java class libraries required by JAVADB2
LIBDB2 Library files
Map contains map files used by DB2Connect
Misc contains HTML Search server files
Samples contain sample programs and sample scripts
Msg\ $L contains DB2 information file

Which command does the 10.AIX use to install the DB2?
INSTALLP command
  
11. Can you install multiple DB2 databases under the same operating system?
OK
  
12. How do I stop an instance?
Db2stop
  
13. How do I start the instance?
Db2start
[Page]
14. How do I modify the value of a registered entry?
Db2set can modify
Such as:
Sets a parameter for the current instance
Db2setparameter=value
  
Set the parameters of a global level
Db2setparameter=value-g (lowercase)
  
View a list of all variables that can be set in the configuration file registry
DB2SET-LR (lowercase)
  
15. How to execute operating system commands in CLP?
Add "!" before the order. As a prefix
db2=>! Dirc:\
  
16. What if the command is too long in CLP?
Use "\" as a continuation symbol
  
17. How do I get the syntax-related information for the DB2 command?
DB2? Show all DB2 commands
DB2? Command Display commands information
DB2? SQLNNNN shows the explanation of this sqlcode.
DB2? DB2NNNN Display this DB2 error explanation information
  
18. How do I view the current CLP settings?
Db2=>listcomandoptions
  
19. How do I update specific settings for the current CLP session?
Db2updatecommandoptionsusingoptions ...
  
What command can 20.COMMANDWINDOWS invoke?
Db2cmd command
  
21. The default name for the Management Server is?
Under Unix for Db2as
Under Windows for DB2DAS00
  
22. Common commands for managing DB2 server instances?
Db2adminstart Start DB2 Management Server instance
Db2adminstop Stop DB2 Admin Server instance
Dasicrtunix Create DB2 Management Server instance
Dasidropunix Remove DB2 Admin Server instance
DB2ADMINCREATEWINDOWSOROS/2 Create DB2 Management Server instance
DB2ADMINDROPWINDOWSOROS/2 Remove DB2 Admin Server instance
DB2GETADMINCFG Display configuration parameters for DB2 Management Server
Db2updateadmincfg Modify the configuration parameters of the DB2 Management Server
Db2resetadmincfg set the configuration parameters of the DB2 Management Server to the default value
  
What kinds of 23.db2 directory?
System Database Directory
Local Database Directory
Node Directory
DCS Directory
Manage Node Directory
  
24. How do I view the system database directory?
Listdbdirectory
  
25. How do I view the database server directory?
Listnodedirectory
  
What is the default port for the 26.DB2 instance's server?
50000
Server name is DB2CDB2
  
27.db2udb server-side authentication types are available?
SERVER
Server_encrypt
CLIENT
Dce
Dce_server_encrypt
Kerberos
Krb_server_encrypt
  
What type of authentication does the 28.DB2 client have?
SERVER
Server_encrypt
Dcs
Dcs_encrypt
CLIENT
Dce
  
What are the types of permissions in the 29.DB2?
Sysadm System Administrative Permissions
Sysctrl System control permissions
Sysmaint System maintenance Rights
Dbadm Database Administrative permissions
Load operation permissions on a table
  
30. What kind of permissions cannot be authorized by Grant?
Sysam
Sysctrl
Sysmaint
To further this permission must modify the Database Manager configuration parameters
  
31. What are the types of tables?
Permanent table (base table)
Temporary table (description table)
Temporary tables (derived tables)
  
32. How do I know how many tables a user has?
SELECT*FROMSYSIBM. Systableswherecreator= ' USER '
  
33. How do I know the function under the user?
Select*fromiwh.userfunction
SELECT*FROMSYSIBM. Sysfunctions
 
34. How do I know the view number under the user?
Select*fromsysibm.sysviewswherecreator= ' USER '
  
35. How do I know the current DB2 version?
Select*fromsysibm.sysversions
  
36. How to know the number of trigger under the user?
SELECT*FROMSYSIBM. Systriggerswhereschema= ' USER '
  
37. How do I know the status of Tablespace?
SELECT*FROMSYSIBM. Systablespaces
  
38. How do I know the status of sequence?
SELECT*FROMSYSIBM. Syssequences
  
39. How do I know the status of a schema?
SELECT*FROMSYSIBM. Sysschemata
  
40. How do I know the status of index?
SELECT*FROMSYSIBM. sysindexes
  
41. How do I know the status of a table's fields?
SELECT*FROMSYSIBM. Syscolumnswheretbname= ' AAAA '
  
42. How do I know the DB2 data type?
SELECT*FROMSYSIBM. Sysdatatypes
  
43. How do I know the bufferpools situation?
SELECT*FROMSYSIBM. Sysbufferpools
  
44.DB2 the field of the table to modify the limit?
Only the VARCHAR2 type can be modified and can only be increased and not reduced.
  
45. How do I see the structure of a table?
Describletabletable_name
OR
Describleselect*fromschema. table_name
  
46. How to quickly clear a large table?
Altertabletable_nameactivenotloggedinitallywithemptytable
  
47. How do I view the package for a database?
Select*fromsyscat.packages
  
48. How do I view the stored procedures of a database?
Select*fromsyscat. Procedures
  
49. How do I see the constraints on a table?
Select*fromsyscat. Checkswheretabname= ' AAAA '
  
50. How do I see the reference complete constraint for a table?
Select*fromsyscat. Referenceswheretabname= ' AAAA '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.