DB2 EXAMPLE DB INSTALLATION FOR COGNOS REPORTS
The example db for DB2 should be used in order to utilize the existing Cognos reports for demonstration purposes. This section describes the steps and tasks to be performed in order to install the DB2 product load the example db , export the data into data files and import then into existing nz db.
The following official documentation url has been used for the installation:
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008889.html?lang=en
The following official documentation url has been used for the installation:
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008889.html?lang=en
This subsection describes the installation and configuration of a db2 intance on a separate Linux host, which is needed in order to load the data of the example data to be later on able to export it to the corresponded Netezza database.
Download the db2 binaries from the ibm site:
http://www.ibm.com/developerworks/downloads/im/db2/
http://www.ibm.com/developerworks/downloads/im/db2/
v10.5_linuxx64_expc.tar.gz v10.5_linuxx64_nlpack.tar.gz # root@demo-nz1 mkdir -p /nzscratch/data/pckgs/ibm/db2
1.2. run the prerequisites checker script and install prerequisites
cd /var/pckgs/ibm/db2/expc sh db2prereqcheck | less apt-get install lib32stdc++6 apt-get install libpam0g:i386 apt-get install libaio1 sh db2prereqcheck | less # DBT3533I The db2prereqcheck utility has confirmed that all installation prerequisites were met.
Change the following settings in the response file:
** file: /var/pckgs/ibm/db2/expc/db2/linuxamd64/samples/db2expc.rsp CONFIG_ONLY = YES ** YES or NO DB2_INST.UID = 0 ** Unsigned integer DB2_INST.GID = 0 ** Unsigned integer DB2_INST.FENCED_USERNAME = root ** char(8) no spaces, no upper case letters DB2_INST.FENCED_GROUP_NAME = root ** char(30) no spaces # eof file:/var/pckgs/ibm/db2/expc/db2/linuxamd64/samples/db2expc.rsp
According to the following instruction:
https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0023608.html?cp=SSEPGG_10.5.0%2F2-0-1-8-1
https://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.qb.server.doc/doc/t0023608.html?cp=SSEPGG_10.5.0%2F2-0-1-8-1
#root@precise32 export license_file=/var/pckgs/ibm/db2/expc/db2/license/db2expc_uw.lic /opt/ibm/db2/V10.5/adm/db2licm -a $license_file # --- START STDOUT LIC1402I License added successfully. LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V10.5/license/en_US.iso88591" # --- STOP STDOUT
The following official documentation source site is used:
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008889.html?lang=en
http://www.ibm.com/support/knowledgecenter/SSEPGG_10.5.0/com.ibm.db2.luw.admin.cmd.doc/doc/r0008889.html?lang=en
cd /var/pckgs/ibm/db2/expc/ sh db2setup -r /var/pckgs/ibm/db2/expc/db2/linuxamd64/samples/db2expc.rsp
Use the following commads
# configure first your path export PATH=$PATH:/opt/ibm/db2/V10.5/bin export PATH=$PATH:/opt/ibm/db2/V10.5/adm/ db2start db2stop
Use the following commads
# change the current user to the db2inst1 user su - db2inst1 db2 ? # to clear the screen # db2 !clear # how-to list the database directories db2 list database directory
Create the sample database to verify that a db creation could be performed
su - db2inst1 db2sampl Creating database "SAMPLE"... Connecting to database "SAMPLE"... Creating tables and data in schema "DB2INST1"...
change the ownershiop of the installation dir because the Unix user db2inst1 should have full access to all the installation media
#change the ownershiop of the installation dir chown -Rv db2inst1:db2iadm1 /var/pckgs/ibm
Run the loading script
db2inst1@precise32:/var/pckgs/ibm/db2/GS_DB/unix$ sh setupGSDB.sh Starting script Operating system : Linux DB2 Version 9 or later detected - using DB2 Version 9 syntax ------------------------------------------------------------------- Press Enter at the prompts to accept the default value shown Default values can be specifed in the file GOSalesConfig.sh
Accept the default values when asked by the script ..
Please enter the name of the database ( or the alias ) to be used for the -e GOSales sample data (default=GS_DB) : ------------------------------------------------------------------- This script can create column-organized tables in GS_DB using v. 10.5 or later. -e Would you like to create column-organized tables? (Y/N) (Default=N) : Enter the db2 administration username for creating the database and importing the data. If no value is provided, then the local user will attempt to connect without a password. -e Please enter the DB2 admin user name : db2inst1 ----------------------------------------------------------- Please confirm the following settings : Database Name : GS_DB Drop and Recreate database : Y Create a 32 K Bufferpool named : GOSALES_BP Create a 32 K Tablespace named : GOSALES_TS GOSALES Grant users/groups : GOSALES,db2inst1,PUBLIC GOSALESDW Grant users/groups : GOSALESDW,db2inst1,PUBLIC Administration User name : db2inst1 Import the sample data into the following schemas : GOSALES GOSALESHR GOSALESMR GOSALESRT GOSALESDW ============================ ----------------------------------------------------------- Please confirm the following settings : Database Name : GS_DB Column-organized tables : N Drop and Recreate database : Y DPF environment : Y Create a 32 K Bufferpool named : GOSALES_BP Create a 32 K Tablespace named : GOSALES_TS Grant permissions on the GOSALES objects to : GOSALES,db2inst1,PUBLIC Grant permissions on the GOSALESDW objects to : GOSALESDW,db2inst1,PUBLIC DB2 Administration User name : db2inst1 Import the sample data into the following schemas : GOSALES GOSALESHR GOSALESMR GOSALESRT GOSALESDW WARNING: If the database already exists it will be dropped -e Continue creating the sample data with these settings? (Y/N) Default=Y : Please wait ... Starting GOSALES_RUN_SCRIPTS Creating database # ---- START STOUD # OBS !!! provide the admin user name DB2 Administration User name : db2inst1 # ---- START STOUD + [ 0 = 0 ] + echo Table row count validation successful. Table row count validation successful. + terminateRunScripts + db2 connect reset + db2 terminate + return 0 + cleanup 0 + [ -f /var/pckgs/ibm/db2/GS_DB/unix/../logs//GOSALES_ERROR_LOG.LOG ] + exit 0
Enter the db2inst1 username and pass when prompted
Enter the db2 administration username for creating the database and importing the data. If no value is provided, then the local user will attempt to connect without a password. -e Please enter the DB2 admin user name : db2inst1 + [ 0 = 0 ] + echo Table row count validation successful. Table row count validation successful. + terminateRunScripts + db2 connect reset + db2 terminate + return 0 + cleanup 0 + [ -f /var/pckgs/ibm/db2/GS_DB/unix/../logs//GOSALES_ERROR_LOG.LOG ] + exit 0
The installation script should exit with the exit 0 status.
If errors occur before apply run the following script
# run the following script db2 -tvsf /var/pckgs/ibm/db2/GS_DB/unix/drop_godb.sql # and the script CONNECT TO GS_DB; UNQUIESCE DATABASE; QUIESCE DATABASE IMMEDIATE FORCE CONNECTIONS; UNQUIESCE DATABASE; CONNECT RESET; deactivate db GS_DB; DROP DATABASE GS_DB; /var/pckgs/ibm/db2/GS_DB/unix/drop_godb.sql
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!