免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4156 | 回复: 0
打印 上一主题 下一主题

【求助】Sybase IQ 15 事务日志误删除,数据库无法启动了【已解决】 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-12-19 12:10 |只看该作者 |倒序浏览
本帖最后由 Dr_Know 于 2015-12-19 13:01 编辑

一个服务器的空间满了,导致IQ 数据库挂死,无法连接,报错 如图1



之后不小心删掉了 wap.log事务文件, kill -9 杀IQ进程,然后IQ就启动不了了

sybiq@linux-zlha:~/data> ./startdb.sh


Starting server wap on linux-zlha at port 2648 (12/19 12:05:33)

Run Directory       : /home/sybiq/data
Server Executable   : /home/sybiq/IQ-15_2/bin64/iqsrv15
Server Output Log   : /home/sybiq/IQ-15_2/logfiles/wap.0033.srvlog
Server Version      : 15.2.0.5612/ESD 1
Open Client Version : 15.0/P-EBF16082 ESD #15
User Parameters     : '@wap.cfg' 'wap.db'
Default Parameters  : -gn 105

I. 12/19 12:05:35.      Sybase IQ
I. 12/19 12:05:35.       Version 15.2
I. 12/19 12:05:35.        (64bit mode)
I. 12/19 12:05:35. Copyright 1992-2010 by Sybase, Inc. All rights reserved
I. 12/19 12:05:35.
I. 12/19 12:05:35. 8 logical processor(s) on 2 physical processor(s) detected.
I. 12/19 12:05:35. Maximum number of physical processors the server will use: 2
I. 12/19 12:05:35. Running Linux 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 on X86_64
I. 12/19 12:05:35. Server built for X86_64 processor architecture
I. 12/19 12:05:35. 262144K of memory used for caching
I. 12/19 12:05:35. Minimum cache size: 262144K, maximum cache size: 524288K
I. 12/19 12:05:35. Using a maximum page size of 4096 bytes
I. 12/19 12:05:35. Starting database "wap" (/home/sybiq/data/wap.db) at Sat Dec 19 2015 12:05


=============================================================
IQ server starting with:
    100 connections         (       -gm )
     26 cmd resources       ( -iqgovern )
    512 threads             (     -iqmt )
    512 Kb thread stack size   (   -iqtss  )
  262144 Kb thread memory size ( -iqmt * -iqtss )
      8 IQ number of cpus  ( -iqnumbercpus )
      1 MB maximum size of IQMSG file ( -iqmsgsz )
      0 copies of IQMSG file archives ( -iqmsgnum )
=============================================================

I. 12/19 12:05:36. Database recovery in progress
I. 12/19 12:05:36.     Last checkpoint at Fri Dec 18 2015 16:23
I. 12/19 12:05:36.     Transaction log: wap.log...
E. 12/19 12:05:36. Error: Cannot open transaction log file -- No such file or directory
I. 12/19 12:05:36. Recovery complete
E. 12/19 12:05:36. Cannot open transaction log file -- No such file or directory
I. 12/19 12:05:36. Database server shutdown due to startup error
I. 12/19 12:05:36. Database server stopped at Sat Dec 19 2015 12:05
DBSPAWN ERROR:  -935
Unable to start specified database: Log file error

Error: Cannot open transaction log file -- No such file or directory Cannot open transaction log file -- No such file or directory
Server failed to start


试过用dblog -t wap2.log wap.db 重置事务日志 但还是不好使,还是报上面的错误,大神么帮小弟看看 多谢啊

=============================================================


刚才自己解决了,用dblog -t wap01.log wap.db 重置事务日志后,备份当前目录所有文件,之后 在启动参数里加 -f 选项,start_iq @wap.cfg wap.db -f 完成后 在去掉 -f 参数  start_iq @wap.cfg wap.db 启动成功


sybiq@linux-zlha:~/data> dblog -t wap01.log wap.db
SQL Anywhere Transaction Log Utility Version 11.0.1.5612
"wap.db" was using log file "wap.log"
"wap.db" is using no log mirror file
"wap.db" is now using log file "wap01.log"
Transaction log starting offset is 06194848040
Transaction log current relative offset is 0000006382
sybiq@linux-zlha:~/data> start_iq @wap.cfg wap.db -f


Starting server wap on linux-zlha at port 2648 (12/19 12:50:43)

Run Directory       : /home/sybiq/data
Server Executable   : /home/sybiq/IQ-15_2/bin64/iqsrv15
Server Output Log   : /home/sybiq/IQ-15_2/logfiles/wap.0035.srvlog
Server Version      : 15.2.0.5612/ESD 1
Open Client Version : 15.0/P-EBF16082 ESD #15
User Parameters     : '@wap.cfg' 'wap.db' '-f'
Default Parameters  : -gn 105

I. 12/19 12:50:45.      Sybase IQ
I. 12/19 12:50:45.       Version 15.2
I. 12/19 12:50:45.        (64bit mode)
I. 12/19 12:50:45. Copyright 1992-2010 by Sybase, Inc. All rights reserved
I. 12/19 12:50:45.
I. 12/19 12:50:45. 8 logical processor(s) on 2 physical processor(s) detected.
I. 12/19 12:50:45. Maximum number of physical processors the server will use: 2
I. 12/19 12:50:45. Running Linux 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 on X86_64
I. 12/19 12:50:45. Server built for X86_64 processor architecture
I. 12/19 12:50:45. 262144K of memory used for caching
I. 12/19 12:50:45. Minimum cache size: 262144K, maximum cache size: 524288K
I. 12/19 12:50:45. Using a maximum page size of 4096 bytes
I. 12/19 12:50:45. Starting database "wap" (/home/sybiq/data/wap.db) at Sat Dec 19 2015 12:50
     Sybase IQ
      Version 15.2
       (64bit mode)
Copyright 1992-2010 by Sybase, Inc. All rights reserved

8 logical processor(s) on 2 physical processor(s) detected.
Maximum number of physical processors the server will use: 2
Running Linux 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 on X86_64
Server built for X86_64 processor architecture
262144K of memory used for caching
Minimum cache size: 262144K, maximum cache size: 524288K
Using a maximum page size of 4096 bytes


=============================================================
IQ server starting with:
    100 connections         (       -gm )
     26 cmd resources       ( -iqgovern )
    512 threads             (     -iqmt )
    512 Kb thread stack size   (   -iqtss  )
  262144 Kb thread memory size ( -iqmt * -iqtss )
      8 IQ number of cpus  ( -iqnumbercpus )
      1 MB maximum size of IQMSG file ( -iqmsgsz )
      0 copies of IQMSG file archives ( -iqmsgnum )
=============================================================

Starting database "wap" (/home/sybiq/data/wap.db) at Sat Dec 19 2015 12:50
I. 12/19 12:50:46. Database recovery in progress
I. 12/19 12:50:46.     Last checkpoint at Fri Dec 18 2015 16:23
I. 12/19 12:50:46.     Transaction log: wap01.log...
I. 12/19 12:50:46.     Forcing recovery without transaction log
I. 12/19 12:50:46. Recovery complete
I. 12/19 12:50:46. Database server shutdown automatically after log applied
I. 12/19 12:50:46. Database server stopped at Sat Dec 19 2015 12:50
Database recovery in progress
    Last checkpoint at Fri Dec 18 2015 16:23
    Transaction log: wap01.log...
    Forcing recovery without transaction log
Recovery complete
Database server shutdown automatically after log applied
Database server stopped at Sat Dec 19 2015 12:50

Recovery complete
Make sure to remove the '-f' parameter before restarting the server.

sybiq@linux-zlha:~/data> start_iq @wap.cfg wap.db   


Starting server wap on linux-zlha at port 2648 (12/19 12:51:37)

Run Directory       : /home/sybiq/data
Server Executable   : /home/sybiq/IQ-15_2/bin64/iqsrv15
Server Output Log   : /home/sybiq/IQ-15_2/logfiles/wap.0036.srvlog
Server Version      : 15.2.0.5612/ESD 1
Open Client Version : 15.0/P-EBF16082 ESD #15
User Parameters     : '@wap.cfg' 'wap.db'
Default Parameters  : -gn 105

I. 12/19 12:51:39.      Sybase IQ
I. 12/19 12:51:39.       Version 15.2
I. 12/19 12:51:39.        (64bit mode)
I. 12/19 12:51:39. Copyright 1992-2010 by Sybase, Inc. All rights reserved
I. 12/19 12:51:39.
I. 12/19 12:51:39. 8 logical processor(s) on 2 physical processor(s) detected.
I. 12/19 12:51:39. Maximum number of physical processors the server will use: 2
I. 12/19 12:51:39. Running Linux 2.6.32.59-0.7-default #1 SMP 2012-07-13 15:50:56 +0200 on X86_64
I. 12/19 12:51:39. Server built for X86_64 processor architecture
I. 12/19 12:51:39. 262144K of memory used for caching
I. 12/19 12:51:39. Minimum cache size: 262144K, maximum cache size: 524288K
I. 12/19 12:51:39. Using a maximum page size of 4096 bytes
I. 12/19 12:51:39. Starting database "wap" (/home/sybiq/data/wap.db) at Sat Dec 19 2015 12:51


=============================================================
IQ server starting with:
    100 connections         (       -gm )
     26 cmd resources       ( -iqgovern )
    512 threads             (     -iqmt )
    512 Kb thread stack size   (   -iqtss  )
  262144 Kb thread memory size ( -iqmt * -iqtss )
      8 IQ number of cpus  ( -iqnumbercpus )
      1 MB maximum size of IQMSG file ( -iqmsgsz )
      0 copies of IQMSG file archives ( -iqmsgnum )
=============================================================

I. 12/19 12:51:40. Transaction log: wap01.log
I. 12/19 12:51:40. Starting checkpoint of "wap" (wap.db) at Sat Dec 19 2015 12:51
I. 12/19 12:51:40. Finished checkpoint of "wap" (wap.db) at Sat Dec 19 2015 12:51
I. 12/19 12:51:41. Database "wap" (wap.db) started at Sat Dec 19 2015 12:51
I. 12/19 12:51:41. IQ Server wap.
I. 12/19 12:51:41. Database server started at Sat Dec 19 2015 12:51
I. 12/19 12:51:41. Trying to start SharedMemory link ...
I. 12/19 12:51:41.     SharedMemory link started successfully
I. 12/19 12:51:41. Trying to start TCPIP link ...
I. 12/19 12:51:41. Starting on port 2648
I. 12/19 12:51:46.     TCPIP link started successfully
I. 12/19 12:51:46. Now accepting requests
New process id is 27632

Server started successfully

sybiq@linux-zlha:~/data> ls
core  history.txt  main-temp.iq  startdb.sh  stopdb.sh  wap.cfg  wap.db  wap.iq  wap.iqmsg  wap.lmp  wap01.log  wap_maindev1  wap_tempdev1
sybiq@linux-zlha:~/data> isql -Udba -Psql -Szx192_168_2_70
1>
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP