This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env php | |
<?php | |
# Stuff we have to do | |
if(!defined('sugarEntry'))define('sugarEntry', true); | |
function usage() { | |
global $argv; | |
return "\n" . $argv[0] . " <path to sugar>\n"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
db2 "connect to sugarult" | |
# Not sure if the following is actually need if the database needs to be restarted | |
# because of the 'currently in use' issues. However it should disconnect all application | |
# connected to the database. | |
db2 "quiesce database immediate force connections" | |
db2 "unquiesce database" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/sh | |
# Since there is no simple drop all tables from a database command in DB2, | |
# this script uses a few unix utilities to accomplish the same result | |
# Note that it assumes that your session is already connected to the database | |
# and that the schema from which you want to drop the tables has the same name | |
# as your current user. | |
db2 "Select 'DROP TABLE', TABLE_NAME from sysibm.tables WHERE TABLE_SCHEMA = UPPER('$USER')" | grep DROP | db2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# NOTE this creates a default 32k table space which is the maximum. Only a few tables in Sugar need 8k, others need only 4k | |
# However if you are using Studio the table needs enough extra space to add columns | |
# Also note that the specified collation is case insensitive US. By default DB2 is case sensitive. | |
db2 "CREATE DATABASE sugarult USING CODESET UTF-8 TERRITORY US COLLATE USING UCA500R1_LEN_S2 PAGESIZE 32 K" | |
# Sugar 6.4 and 6.5 need the Full Text Search engine up and running and operational. |