ibm的东西对初学者 很好玩 aix和db2有个共同点 都有图形与命令的转换....但是细节工具技术很灵活 要慢慢的去突破
BACKUP DATABASE SAMPLE ONLINE TO "/home/db2inst2/arch" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
BACKUP DATABASE SAMPLE TABLESPACE ( IBMDB2SAMPLEREL, USERSPACE1 ) ONLINE TO "/home/db2inst2/arch/db2inst2" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
BACKUP DATABASE SAMPLE ONLINE INCREMENTAL TO "/home/db2inst2/arch" WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
RESTORE DATABASE SAMPLE FROM "/home/db2inst2" TAKEN AT 20111128030239 WITH 2 BUFFERS BUFFER 1024 PARALLELISM 1 WITHOUT PROMPTING;
db2look -d SAMPLE -u DB2FENC2 -e -l -x -c ;
EXPORT TO "/home/db2inst2/arch/data.dat" OF DEL MESSAGES "/home/db2inst2/arch/data.log" SELECT * FROM DB2INST2.EMPLOYEE;
CONNECT RESET;
EXPORT TO "D:data.dat" OF DEL MESSAGES "D:data.log" SELECT * FROM DB2INST2.EMPLOYEE;
CONNECT RESET;
IMPORT FROM "D:data.dat" OF DEL METHOD P (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14) MESSAGES "D:dat1a.log" INSERT INTO DB2INST2.EMPLOYEE (EMPNO, FIRSTNME, MIDINIT, LASTNAME, WORKDEPT, PHONENO, HIREDATE, JOB, EDLEVEL, SEX, BIRTHDATE, SALARY, BONUS, COMM);
CONNECT RESET;
db2look -d SAMPLE -t "CL_SCHED" -a -e -l -x -c ;
REORG TABLE DB2INST2.CUSTOMER ALLOW READ ACCESS ;
REORG TABLE DB2INST2.CUSTOMER INDEX SYSIBM.SQL111128013201340 ALLOW READ ACCESS USE TEMPSPACE1 INDEXSCAN LONGLOBDATA USE TEMPSPACE1;
CONNECT RESET;
RUNSTATS ON TABLE DB2INST2.EMPLOYEE ON ALL COLUMNS ALLOW WRITE ACCESS ;
COMMIT WORK;
CONNECT RESET;
CREATE BUFFERPOOL TESTBU IMMEDIATE SIZE 1000 PAGESIZE 4 K ;
CONNECT RESET;
CONNECT TO SAMPLE;
CREATE EVENT MONITOR test FOR DATABASE, TABLES, TABLESPACES, DEADLOCKS, BUFFERPOOLS, CONNECTIONS, TRANSACTIONS, STATEMENTS WRITE TO TABLE BUFFERSIZE 4 BLOCKED MANUALSTART ;
CONNECT RESET;
CREATE REGULAR TABLESPACE TESTDB PAGESIZE 4 K MANAGED BY AUTOMATIC STORAGE EXTENTSIZE 16 OVERHEAD 10.5 PREFETCHSIZE 16 TRANSFERRATE 0.14 BUFFERPOOL TESTBU DROPPED TABLE RECOVERY ON;
COMMENT ON TABLESPACE TESTDB IS 'zhushi';
CONNECT RESET;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9879835/viewspace-1056618/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9879835/viewspace-1056618/