IBM Connections: Criando as Databases Manualmente

From Wiki
Revision as of 10:46, 29 August 2018 by Ebasso (talk | contribs)

Abrir um Shell com o usuário da instância exemplo db2inst1

Entrar com o usuário dono da instância

su - db2inst1

Ir para o diretório onde você extraiu o Wizard

cd /tmp/Wizards

Criar o seguinte shell

#!/bin/bash
# Criandos as databases
db2 -c -w -i -td@ -vf connections.sql/activities/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/activities/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/blogs/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/blogs/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/cognos/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/cognos/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/communities/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/communities/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/communities/db2/calendar-createDb.sql
db2 -c -w -i -td@ -vf connections.sql/communities/db2/calendar-appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/dogear/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/dogear/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/files/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/files/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/forum/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/forum/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/metrics/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/metrics/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/mobile/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/mobile/db2/appGrants.sql
db2 -c -w -i -td@ -vf connections.sql/pushnotification/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/pushnotification/db2/createTriggers.sql
db2 -c -w -i -td@ -vf connections.sql/wikis/db2/createDb.sql
db2 -c -w -i -td@ -vf connections.sql/wikis/db2/appGrants.sql
# Os arquivos de profiles, homepage não utilizavam o @ como finalizador do comando
db2 -c -w -i -td";" -vf connections.sql/profiles/db2/createDb.sql
db2 -c -w -i -td";" -vf connections.sql/profiles/db2/appGrants.sql
db2 -c -w -i -td";" -vf connections.sql/homepage/db2/createDb.sql
db2 -c -w -i -td";" -vf connections.sql/homepage/db2/appGrants.sql
db2 -c -w -i -td";" -vf connections.sql/homepage/db2/initData.sql
db2 -c -w -i -td";" -vf connections.sql/homepage/db2/reorg.sql
db2 -c -w -i -td";" -vf connections.sql/homepage/db2/updateStats.sql

Executar o

sh -x criaConnectionsDB.sh | tee resultado.txt


Ver também