在客户的使用过程中,我遇到有个别客户的sysadmin数据库的表出现异常,需要重建或者想要把sysadmin数据库存放的dbspace位置进行变动的情况,对此,我们可以有以下两种方法来重构sysadmin系统数据库。[@more@]
方法一: 首先,我们要使用informix用户停止有关dbscheduler的线程,然后把sysadmin数据库删除掉, 重新启动ids服务器后,系统可以自动来重建sysadmin系统数据库。
例如,停止有关线程的方法。
$ dbaccess sysadmin -
Database selected.
> execute function task("scheduler stop");
(expression) Successfully shutdown dbScheduler/dbWorker threads.
1 row(s) retrieved.
方法二: 使用reset sysadmin命里,并可以指定我们要重建sysadmin数据库所在的dbspace位置。
> execute function task("scheduler stop");
(expression) Successfully shutdown dbScheduler/dbWorker threads.
1 row(s) retrieved.
$ dbaccess sysadmin -
Database selected.
> execute function task("reset sysadmin", "rootdbs");
(expression) SCHAPI: 'sysadmin' database will be moved to 'rootdbs'. See onlin
e message log.
1 row(s) retrieved.
then exit the dbaccess.
另外, 用户可以用以下名来来监控有关数据库调度线程的状态信息:
$ onstat -g dbc
IBM Informix Dynamic Server Version 11.10.FC2W5 -- On-Line -- Up 00:09:00 -- 46056 Kbytes
Worker Thread(0) 460f9f60
=====================================
Task: 46157c18
Task Name: mon_sysenv
Task ID: 4
Task Type: STARTUP SENSOR
Task Execution: insert into mon_sysenv select 1 , env_name, env_value FROM sysmaster:sysenv
WORKER PROFILE
Total Jobs Executed 2
Sensors Executed 2
Tasks Executed 0
Purge Requests 2
Rows Purged 0
Worker Thread(1) 46158cf0
=====================================
Task: 4637dc18
Task Name: mon_config_startup
Task ID: 3
Task Type: STARTUP SENSOR
Task Execution: onconfig_save_diffs
WORKER PROFILE
Total Jobs Executed 10
Sensors Executed 7
Tasks Executed 3
Purge Requests 7
Rows Purged 0
Scheduler Thread 46158cf0
=====================================
Run Queue
Empty
Run Queue Size 0
Next Task 7
Next Task Waittime 3377
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/312079/viewspace-1031097/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/312079/viewspace-1031097/