谢谢自百忙之中能给予指导,
sa被锁了,这个方法应该不能用了,提示如下错误
C:\Documents and Settings\Administrator>isql -Usa -Paceybcxxemgzb7
Msg 4002, Level 14, State 1:
Server 'SJZXSYBASE':
Login failed.
CT-LIBRARY error:
ct_connect(): protocol specific layer: external error: The attempt to co
nnect to the server failed.
看看按照忘掉sa密码的解决办法是否行得通:在我的图书:<<Sybase ASE In Action>>里有相关介绍。
解决遗忘sa密码的办法是:
进入%SYBASE%\%SYBASE_ASE%\install目录,你会发现有一个文件,名为:RUN_<servername>.bat,我这里<servername>为SEANLAPTOP,这个文件就是启动ASE Server的批处理文件,它的内容如下:
rem
d:\ASE150\ASE-15_0\bin\sqlsrvr.exe -dd:\ASE150\data\master.dat -sSEANLAPTOP -ed:\ASE150\ASE-15_0\install\SEANLAPTOP.log -id:\ASE150\ini -Md:\ASE150\ASE-15_0
我们在这个文件的末尾,加上”-psa”:
rem
d:\ASE150\ASE-15_0\bin\sqlsrvr.exe -dd:\ASE150\data\master.dat -sSEANLAPTOP -ed:\ASE150\ASE-15_0\install\SEANLAPTOP.log -id:\ASE150\ini -Md:\ASE150\ASE-15_0 -psa
然后运行这个批处理文件,你会发现命令行窗口中有大量的提示信息:
……
ta cache for database 'sybsystemprocs'.
00:00000:00001:2008/08/29 21:42:12.90 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:12.90 server Completed cleaning up the default
data cache for database 'sybsystemprocs'.
00:00000:00001:2008/08/29 21:42:12.90 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:12.90 server Checking external objects.
00:00000:00001:2008/08/29 21:42:12.90 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:12.93 server The transaction log in the databas
e 'sybsystemprocs' will use I/O size of 2 Kb.
00:00000:00001:2008/08/29 21:42:12.93 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:16.10 server Database 'sybsystemprocs' is now o
nline.
00:00000:00001:2008/08/29 21:42:16.10 kernel Failed to log the current message
in the Windows NT event log
New SSO password for sa:kdoatlovavedb7
00:00000:00010:2008/08/29 21:42:16.29 kernel network name sean-laptop, interfac
e IPv4, address 192.168.1.3, type nlwnsck, port 5000, filter NONE
00:00000:00010:2008/08/29 21:42:16.29 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:17.00 server The wash size of the 2K buffer poo
l in cache default data cache has been changed from 1638 Kb to 984 Kb due to a c
hange in the size of the pool.
00:00000:00001:2008/08/29 21:42:17.00 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:17.01 server Recovery has tuned the size of '16
K' pool in 'default data cache' to benefit recovery performance. The original co
nfiguration will be restored at the end of recovery.
00:00000:00001:2008/08/29 21:42:17.01 kernel Failed to log the current message
in the Windows NT event log
00:00000:00001:2008/08/29 21:42:17.01 server Recovery has tuned the size of '2K
' pool in 'default data cache' to benefit recovery performance. The original con
figuration will be restored at the end of recovery.
00:00000:00001:2008/08/29 21:42:17.01 kernel Failed to log the current message
in the Windows NT event log
… …
你会发现中间带黑体的那一行(找里边的内容可能需要一点耐心,实在不行,可以将输出重定向到一个文本文件,在这个文件文件里查找“New SSO”的特定字符串),系统将sa用户的密码重置为” kdoatlovavedb7”,有了这个密码,你就可以使用isql登陆并修改sa的密码了,如,要将sa的密码改为”sybase1”,然后关闭ASE服务器,命令如下:
C:\Documents and Settings\hex>isql -Usa -Pkdoatlovavedb7
1> sp_password 'kdoatlovavedb7', '<newpassword>', sa
2> go
口令设置正确。
(return status = 0)
1> quit
C:\Documents and Settings\hex>isql -Usa -P<newpassword>
1> shutdown
2> go
服务器SHUTDOWN被请求。
ASE 正在终止此进程。
CT-LIBRARY error:
ct_results(): 网络包层: 内部net library错误: 由于断开使得 Net-Library 的
操作中断。
作了上述修改密码的操作以后,我们要将RUN_<servername>.bat的内容还原,即去掉末尾的”-psa”,再运行它启动ASE。这时我们发现使用isql –Usa –P<newpassword>很方便的就能连接到ASE Server。