public class Maxinst extends CommonShell implements UpgConstants
This uses as input the file that was created by Unlcvt. Also see descriptions of the -d and -i commandline parameters.
This runs independently of MXServer.
Click here for Maxinst flow.
The commandline parameters for Maxinst are as follows, in addition to those in the superclass
CommonShell
.
Parameter ID | Parameter Value | Description |
---|---|---|
-c | Subdirectory for input file | Subdirectory under tools\maximo. For example, if the input directory should be tools\maximo\FR, then this param would equal FR. If this param is not specified then the subdirectory defaults to EN. |
-d | Directory for output file | Same as CommonShell (output directory). For Maxinst, the input file (Unlcvt) is always retrieved from the MXServer root directory. |
-i | Filename for input file generated by Unlcvt | This is optional.
If not specified, uses Unlcvt .
(File extension is "ora" for Oracle, "sqs" for SqlServer, and "db2" for DB2.)
|
-m | Multiple for length of varchar columns. This defaults to 1 and should be used
only in special situations related to multi-language. It will cause the
native length of varchar columns to be a multiple of their normal length
defined in maxattribute, up to the native maximum allowed.
This value will be stored in the maxvar VARCHARMULTIPLE .
In practice, it can be a value between 1 and 4.
It is assumed that the native length specified in the input script's "create table"
statements are based on a multiple of 1 (native length equals maxattribute length).
| |
-q | The -q parameter is used ONLY for DB2. When the -q parameter is used and this is DB2, then DB2 Text Search will be enabled. If the -q parameter is not supplied then DB2 text search will be disabled. | |
-s | Schema for index storage | This is optional.
If not specified, Maxinst will not specify a tablespace for indexes.
This is used when creating indexes and in updateMaximo .
For SqlServer, clustered indexes use the schema from the -t parameter.
|
-t | Schema for table storage | This is optional.
If not specified, Maxinst will not specify a tablespace for tables.
This is used when creating tables and in updateMaximo .
For SqlServer, this is also used for clustered indexes.
|
-u | Username | Same as CommonShell, but for Maxinst, this is also used
as the value for various Maximo table updates (if not equal to "MAXIMO"),
see updateMaximo .
|
-x | (none) | If Maximo will ultimately be deployed on a Unix platform, then the -x parameter must be input to Maxinst. This allows Maxinst to be run on Windows with ultimate Maximo deployment on Unix. If ultimate deployment will be Windows, this parameter should be omitted. |
-y | (none) | The -y parameter is used ONLY for DB2. When -y is specified, then any column whose
native datatype would normally be varchar will instead be created as vargraphic.
This value will be stored in the maxvar USEVARGRAPHIC .
|
-z | (none) | The -z parameter is used ONLY for DB2 and ONLY for debugging. When the -z parameter is used and this is DB2, then the logic that enables text search for all tables is not performed from Maxinst. Instead, Maxinst will output a script containing all the relevant commands. The script name is db2text_maxinst.bat, and it is output to the same directory as the logfile. A second script, db2text_maxinst.sh, is output for Unix shell script. |
CommonShell
listStream
DB2, doNotUpdateACTION, doNotUpdateALNDOMAIN, doNotUpdateAPPLICATIONAUTH, doNotUpdateAUTOKEY, doNotUpdateCONDITION, doNotUpdateCONTRACTPROPERTY, doNotUpdateCONTRACTTYPE, doNotUpdateCROSSOVERDOMAIN, doNotUpdateDOCTYPES, doNotUpdateLANGUAGE, doNotUpdateMAXAPPS, doNotUpdateMAXCONDDETAIL, doNotUpdateMAXCONTROLVALUE, doNotUpdateMAXDOMAIN, doNotUpdateMAXLOGAPPENDER, doNotUpdateMAXLOGGER, doNotUpdateMAXMENU, doNotUpdateMAXMESSAGES, doNotUpdateMAXMODULES, doNotUpdateMAXPROP, doNotUpdateMAXPROPVALUE, doNotUpdateMAXROLE, doNotUpdateMAXSEQUENCE, doNotUpdateMAXSERSECURITY, doNotUpdateMAXSERVICE, doNotUpdateMAXTABLEDOMAIN, doNotUpdateMAXVARS, doNotUpdateMAXVARTYPE, doNotUpdateMXCOLLAB, doNotUpdateMXCOLLABREF, doNotUpdateNUMERICDOMAIN, doNotUpdateNUMRANGEDOMAIN, doNotUpdatePORTLET, doNotUpdatePRICALC, doNotUpdateSECURITYRESTRICT, doNotUpdateSIGOPTION, doNotUpdateSYNONYMDOMAIN, doNotUpdateTAXTYPE, doNotUpdateWORKPRIORITY, doNotUpdateWORKTYPE, doNotUpdateWPEDITSETTING, messageCache, NEWONLY, OLDANDNEW, OLDONLY, ORACLE, SQLINET, SQLMICROSOFT, SQLSERVER, SYSDATATABLES, SYSTEMTABLES, UNKNOWN
Constructor and Description |
---|
Maxinst()
This constructor does nothing.
|
Maxinst(MXServer server) |
Modifier and Type | Method and Description |
---|---|
void |
bytefileUpdate()
For maxtypes CRYPTO, CRYPTOX, and BLOB string.
|
void |
cleanOutFulltextCatalog(java.lang.String dropCatSql)
Before executing the Sql for dropping SqlServer fulltext catalog, must make absolutely sure it is empty.
|
void |
doOneUnlcvtLine(java.lang.String sql)
Process one sql statement from the Unlcvt input file.
|
void |
doSql(java.lang.String sql)
Looks at params to determine whether the execute only, log only, or both execute and log.
|
void |
doUnlcvtSql()
Loop through all the sql statements from the input file
(Unlcvt or whatever file was specified using the -i parameter)
and call
doOneUnlcvtLine for each. |
void |
endSetupInstance(java.lang.String outdir,
java.lang.String outfile,
java.util.HashMap params)
After
endSetup ,
process -t, -i, -q, -s, -c, -x, -z parameters,
set values for tableSchema , input file,
indexSchema , loginUser ,
reader , deployUnix ,
db2TextScript . |
int |
getMaxID(java.lang.String tbname,
java.lang.String name)
Select (maxreserved + 1) from maxsequence for the specified table and column.
|
static void |
main(java.lang.String[] argv)
Main.
|
void |
process()
Main processing method for this program.
|
java.lang.String |
setupFromPropfile(java.lang.String propfile,
java.lang.String user,
java.lang.String password,
java.lang.String url,
java.lang.String rootDirName,
java.lang.String propdir)
Get security params from propfile.
|
void |
updateMaximo()
Update Maximo tables as follows.
|
void |
updateUserPasswords()
Update the maxuser table (password = userid encrypted).
|
createOutfile, doCall, doDB2TextSearchCall, doSql, doSql, doSql, doWait, endProcess, endProcessInstance, endSetup, execRuntime, getDisplayMessage, getDisplayMessage, getOutfile, getOutstream, getProperty, getRootDirName, logSql, reformatForDB2, reformatForSqlsvr, setConnection, setDB2TextOutput, setup, setupInstance, setupNested, setupNestedInstance, setUserLangCode, showMsg, showMXException, showMXException
public Maxinst()
public Maxinst(MXServer server)
public void process() throws java.lang.Exception
If MXServer is running, or any existing Maximo tables could not be locked, then report an error and return without doing anything.
process
in class CommonShell
java.lang.Exception
Util.mxServerIsUp(java.lang.String)
,
TextSearch.stopTextSearchJobs(boolean, boolean)
,
doUnlcvtSql()
,
updateMaximo()
,
Util.getDisallowPageLocks()
public void doUnlcvtSql() throws java.lang.Exception
doOneUnlcvtLine
for each.java.lang.Exception
doOneUnlcvtLine(java.lang.String)
public void doOneUnlcvtLine(java.lang.String sql) throws java.lang.Exception
If this is a "create table" statement or create clustered index statement,
the selected tableSchema
will be appended to the statement.
If this is a "create index" statement (non-clustered),
the selected indexSchema
will be appended to the statement.
This assumes that the "create" statement is in lower case.
java.lang.Exception
Util.adjustNativeSql(java.lang.String)
public void updateMaximo() throws java.lang.Exception
tableSchema
, updateDefaultPartitionMaxvars
.
ISDEMO
maxvar via updateDemoMaxvar
.
indexSchema
. (However, clustered indexes
will use tableSchema
).
loginUser
.
(This section will become obsolete when the new Merlin user tables are implemented.)
VARCHARMULTIPLE
maxvar via updateVarcharMultipleMaxvar
.
USEVARGRAPHIC
maxvar via updateVargraphicMaxvar
.
enableTextSearchAllTables
.
startTextSearchJobs
.
updateUnix
.
updateOracle
.
updateDB2
.
updateSqlServer
.
DBSTORAGEPARTITION
.
updateUserPasswords
.
bytefileUpdate
.
java.lang.Exception
public void updateUserPasswords() throws java.lang.Exception
java.lang.Exception
public void bytefileUpdate() throws java.lang.Exception
java.lang.Exception
public void cleanOutFulltextCatalog(java.lang.String dropCatSql) throws java.lang.Exception
dropCatSql
- The sql for dropping the catalog, in the format sp_fulltext_catalog 'textcatalog', 'drop'.java.lang.Exception
public int getMaxID(java.lang.String tbname, java.lang.String name) throws java.lang.Exception
tbname
- Table namename
- Column namejava.lang.Exception
public void doSql(java.lang.String sql) throws java.lang.Exception
DROP
.doSql
in class CommonShell
sql
- The Sql statementjava.lang.Exception
CommonShell.doSql(String)
,
cleanOutFulltextCatalog(java.lang.String)
public java.lang.String setupFromPropfile(java.lang.String propfile, java.lang.String user, java.lang.String password, java.lang.String url, java.lang.String rootDirName, java.lang.String propdir) throws java.lang.Exception
setupFromPropfile
in class CommonShell
propfile
- Name of properties fileuser
- Username when not connecting via MXServer (optional). Must be a superuser.
Defaults to mxe.db.user.password
- Password when not connecting via MXServer (optional). Must be a superuser.
Defaults to mxe.db.password.url
- Database url (alias) (optional). Defaults to mxe.db.url.rootDirName
- The name of the MXServer root directory.propdir
- The name of the directory containing the properties file.java.lang.Exception
cipher
,
cipherX
public void endSetupInstance(java.lang.String outdir, java.lang.String outfile, java.util.HashMap params) throws java.lang.Exception
endSetup
,
process -t, -i, -q, -s, -c, -x, -z
parameters,
set values for tableSchema
, input file,
indexSchema
, loginUser
,
reader
, deployUnix
,
db2TextScript
.endSetupInstance
in class CommonShell
outdir
- Output directoryoutfile
- Output filenameparams
- Parameters (see class javadocs).java.lang.Exception
public static void main(java.lang.String[] argv)