|
| 1 | + Installation |
| 2 | + |
| 3 | +Linux |
| 4 | + |
| 5 | + Log on as a user which has SYSADM authority for the DB2 instance you wish to |
| 6 | + install under (commonly this is db2inst1), and ensure the db2profile for the |
| 7 | + target DB2 instance has been sourced (this is the usually the case with the |
| 8 | + db2inst1 user): |
| 9 | + |
| 10 | + $ su - db2inst1 |
| 11 | + $ source ~db2inst1/sqllib/db2profile |
| 12 | + |
| 13 | + Extract the archive you downloaded, and change to the directory it creates: |
| 14 | + |
| 15 | + $ tar -xzf db2utils-0.1.tar.gz |
| 16 | + $ cd db2utils |
| 17 | + |
| 18 | + Edit the two variables DBNAME and SCHEMANAME at the top of the Makefile: |
| 19 | + |
| 20 | + $ ${EDITOR} Makefile |
| 21 | + |
| 22 | + These indicate the database into which to install everything and the schema |
| 23 | + under which to place all objects. Finally, use the included Makefile to make |
| 24 | + the "install" target: |
| 25 | + |
| 26 | + $ make install |
| 27 | + |
| 28 | + This will compile the external pcre UDFs library, install it in the instance |
| 29 | + identified by the DB2INSTANCE environment variable (which is set by |
| 30 | + db2profile), then connect to the database identified by DBNAME and install |
| 31 | + everything under the schema specified by SCHEMANAME. |
| 32 | + |
| 33 | + If you wish to see the SQL that would be executed without actually executing |
| 34 | + it (if, for example, you wish to edit it before hand) you can create it with |
| 35 | + the following target: |
| 36 | + |
| 37 | + $ make install.sql |
| 38 | + |
| 39 | + If you wish to uninstall everything from the database, simply make the |
| 40 | + "uninstall" target: |
| 41 | + |
| 42 | + $ make uninstall |
| 43 | + |
| 44 | + There is also a target which attempts to test the implementation of various |
| 45 | + functions by running a query and comparing the output to an expected value. |
| 46 | + This can be run with the "test" target: |
| 47 | + |
| 48 | + $ make test |
| 49 | + |
| 50 | + The tests that are executed and the expected results are in the test.dat |
| 51 | + file. The test.awk script is used to convert this into an enormous SQL |
| 52 | + query. |
| 53 | + |
| 54 | +Windows |
| 55 | + |
| 56 | + Anyone want to figure this out? |
0 commit comments