Aaronlong31

  BlogJava :: 首页 :: 联系 :: 聚合  :: 管理
  12 Posts :: 3 Stories :: 17 Comments :: 0 Trackbacks

2010年8月9日 #

常见错误号对照表

MySQL error code SQLSTATE code Error message

1011 HY000 Error on delete of '%s' (errn %d)
1021 HY000 Disk full (%s); waiting for someone to free some space . . .
1022 23000 Can't write; duplicate key in table '%s'
1027 HY000 '%s' is locked against change
1036 HY000 Table '%s' is read only
1048 23000 Column '%s' cannot be null
1062 23000 Duplicate entry '%s' for key %d
1099 HY000 Table '%s' was locked with a READ lock and can't be updated
1100 HY000 Table '%s' was not locked with LOCK TABLES
1104 42000 The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
1106 42000 Incorrect parameters to procedure '%s'
1114 HY000 The table '%s' is full
1150 HY000 Delayed insert thread couldn't get requested lock for table %s
1165 HY000 INSERT DELAYED can't be used with table '%s' because it is locked with LOCK TABLES
1242 21000 Subquery returns more than 1 row
1263 22004 Column set to default value; NULL supplied to NOT NULL column '%s' at row %ld
1264 22003 Out of range value adjusted for column '%s' at row %ld
1265 1000 Data truncated for column '%s' at row %ld
1312 0A000 SELECT in a stored program must have INTO
1317 70100 Query execution was interrupted
1319 42000 Undefined CONDITION: %s
1325 24000 Cursor is already open
1326 24000 Cursor is not open
1328 HY000 Incorrect number of FETCH variables
1329 2000 No data to FETCH
1336 42000 USE is not allowed in a stored program
1337 42000 Variable or condition declaration after cursor or handler declaration
1338 42000 Cursor declaration after handler declaration
1339 20000 Case not found for CASE statement
1348 HY000 Column '%s' is not updatable
1357 HY000 Can't drop a %s from within another stored routine
1358 HY000 GOTO is not allowed in a stored program handler
1362 HY000 Updating of %s row is not allowed in %s trigger
1363 HY000 There is no %s row in %s trigger
posted @ 2010-08-11 11:13 Aaronlong31 阅读(837) | 评论 (0)编辑 收藏

之前一个监视应用的好工具JavaMelody,功能十分齐全,这次介绍个 
稍微小点的,专门为TOMCAT 而设计的。下面讲解其用法: 

1 下载: 
http://www.lambdaprobe.org/downloads/1.7/probe.1.7b.zip 
2 解压缩后,把probe.war放到TOMCAT的webapps下,设置server.xml 
的context 
3 设置用户如下,在tomcat_user.xml中 
   vi /usr/local/tomcat/conf//tomcat-users.xml 

<?xml version='1.0' encoding='utf-8'?> 
<tomcat-users> 
        <role rolename="manager"/> 
        <role rolename="standard"/> 
        <role rolename="tomcat"/> 
        <role rolename="admin"/> 
        <role rolename="role1"/> 
        <user username="tomcat" password="tomcat" roles="tomcat"/> 
        <user username="both" password="tomcat" roles="tomcat,role1"/> 
        <user username="probe" password="probe" roles="admin,manager"/> 
        <user username="role1" password="tomcat" roles="role1"/> 
</tomcat-users> 

4 设置环境变量,获取服务器状态 
# vi /etc/profile 
JAVA_OPTS=-Dcom.sun.management.jmxremote 
export JAVA_OPTS 

5 重启动服务器 
6 输入http://localhost/probe/,输入用户名和密码 
7 即可进入,这里比较精彩的是对内存的监视,动态显示了JVM的内存图表
posted @ 2010-08-09 12:51 Aaronlong31 阅读(382) | 评论 (0)编辑 收藏

设置每天8:50开机,要是9:15电脑还没人使用.就自动关机.
计算机启动时按“Delete”键进入BIOS界面。
在BIOS设置主界面中选择“Power Management Setup”菜单,
Resume By Alarm 值设成Enabled
再在”Date (of Month) Alarm”和“Time (hh:mm:ss) Alarm”中设定开机的日期和时间。
如果把“Date”设为0,则默认为每天定时开机。
设置好后按“F10“保存设置就可以了,机器会重新启动,设置成功。
自动登录
单击“开始/运行”,输入“rundll32 netplwiz.dll,UsersRunDll”
按回车键后弹出“用户帐户”窗口
然后取消选定“要使用本机,用户必须输入用户名和密码”选项,单击确定
在弹出的对话框中输入你想让电脑每次自动登录的账户和密码即可。
自动关机
1.控制面板>管理工具>服务
双击名称列为 Task Scheduler 的记录,把启动类型设为自动,再点启动按钮,再保存.
再从运行中输入
at 9:15 /every:M,T,W,Th,F,S,Su shutdown -s -f -t 300 -c "快要停电了,取消关机命令shutdown -a"
第天9:15 执行关机,有300秒的等待时间。
posted @ 2010-08-09 12:45 Aaronlong31 阅读(403) | 评论 (0)编辑 收藏