1. The steps to give the user load permission
Log in to the database using the instance user Db2inst1;
Use the command DB2 update dbm CFG using Sysadm_group dasadm1 to give Sysadm permissions to the Administrators user group dasadm1;
Use the command DB2 connect to DatabaseName Connection database;
Use the command DB2 grant SECADM on the database to user DASUSR1 give Secadm permission to the administrator user dasusr1;
Use the command DB2 disconnect POM_CT to disconnect the current database;
Use the command DB2 connect to DatabaseName user DASUSR1 using 123456 with the administrator user DASUSR1 connection database;
Use the command DB2 grant load on the database to user Db2inst1 give the user db2inst1 load permission;
2. Common error resolution methods
Error code 1 FIX: SET INTEGRITY for table_name IMMEDIATE CHECKED
Error code 3 FIX: LOAD from *.txt of DEL TERMINATE to table name
3. Temporarily disable foreign keys
There are three different ways
1) Set integrity for table_name off
Set integrity for TABLE_NAME FOREIGN key immediate unchecked
2) Disable: Alter TABLE <table-name> ALTER FOREIGN KEY <constraint-name> not ENFORCED
Enable: Alter TABLE <table-name> alter FOREIGN KEY <constraint-name> ENFORCED
3) Disable: ALTER TABLE TABLENAME DISABLE CONSTRAINT constraintname;
Enable: ALTER TABLE TABLENAME enable CONSTRAINT constraintname;
4. Error List and solution
1) [IBM][CLI Driver] sql30081n detected a communication error. Communication protocol in use: "TCP/IP". The communication API being used: "SOCKETS". The location of the error was detected: "172.16.2.140". The wrong communication function was detected: "Connect". Protocol-specific error codes: "10060", "*", "*". sqlstate=08001
Solve:
Locate the Hosts file under this c:/windows/system32/drivers/etc/path and open it with Notepad
Add the IP and host name of the server host you want to connect to in the file: 127.0.0.1 localhost
2) cannot find the database alias or database name "" or the Database alias "" already exists in the local database directory or the system database directory.
Solve:
DB2 List database directory to view the system database catalog, do not see the databases you are looking for, indicating that the database is not in the system database directory
DB2 list database directory on D: (Executes the command if it is not found in the System database directory, this is the drive letter D), and then discovers the alias of sample and source. Description in the local database directory.
DB2 catalog database name on D: Cataloging the database on the node
DB2 drop DATABASE database name to delete databases
DB2 using Notes