Tecnomatix Adminconsole > schema administration 中, "analyze schema", "refresh schema" 是比较常规的数据库维护操作, 我们常需要启动 Adminconsole 图形界面后, 点击按钮操作. 是否有办法用命令行执行, 这样就不用每次启动 Adminconsole 图形界面了?
Solution用户可以用脚本运行上述命令:
Refresh Schema 可这样执行:
"%TNXPath%\DBScripts\DbUserAdmin.exe" -refreshSchema -- -svr %ServerName% -usr %ToUser% -usrPswd %ToPassword%
"%TNXPath%\DBScripts\DbUserAdmin.exe" -refreshAccessUser -- -svr %ServerName% -schemaOwner %ToUser% -schemaOwnerPswd %ToPassword% -AccessUser %ToUser%_EA -AccessUserPswd %ToPassword%
Analyze Schema 可这样执行:
"%TNXPath%\DBScripts\DbUserAdmin.exe" -initAQ -- -svr %ServerName% -schemaOwner %ToUser% -schemaOwnerPswd %ToPassword% -aqUsr %ToUser%_AQ -aqPswd %ToPassword%
"%TNXPath%\DBScripts\DbUserAdmin.exe" -analyzeSchema
更加详细的参数可以看帮助中的说明.