sybase数据库sa用户被锁怎么办

cll622393 2013-10-14 05:20:25
‘SA用户被锁,还有一个mon_user用户也被锁,无法用Advantage执行命令,怎么办啊,怎样才能将sa用户解开。
...全文
810 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
cll622393 2013-10-19
  • 打赏
  • 举报
回复
前辈说得对,我先在在runfile中加: -usa,运行了一下,然后再加上-psa运行了一下,找到密码再后再按上面的操作进行了一遍就OK了,实在是太感谢了!!!万分感激!!!
  • 打赏
  • 举报
回复
忘记密码用: -psa sa密码被锁的话, 在runfile中加: -usa
iihero 2013-10-16
  • 打赏
  • 举报
回复
引用 7 楼 andkylee 的回复:
忘记密码用: -psa sa密码被锁的话, 在runfile中加: -usa
iihero 2013-10-16
  • 打赏
  • 举报
回复
引用 4 楼 cll622393 的回复:
谢谢自百忙之中能给予指导, 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.
这个似乎不是密码错误啊。 你确定连的是server: SJZXSYBASE?
cll622393 2013-10-15
  • 打赏
  • 举报
回复
这样不知道还有没有救
cll622393 2013-10-15
  • 打赏
  • 举报
回复
谢谢自百忙之中能给予指导, 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.
iihero 2013-10-15
  • 打赏
  • 举报
回复
看看按照忘掉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。

cll622393 2013-10-15
  • 打赏
  • 举报
回复
一共3个用户 sa ,不知道密码而且被锁住 probe 不知道密码,不知道是不是用户 mon_user 不知道密码,也可能被锁住
iihero 2013-10-14
  • 打赏
  • 举报
回复
你有可以用的超级管理员用户吗?只要有, 就可以对上述用户进行解锁。
Jdbc连接各种数据库代码方法大全 1、Oracle8/8i/9i数据库(thin模式) Class.forName("oracle.jdbc.driver.OracleDriver").newInstance(); String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orcl为数据库的SID String user="test"; String password="test"; Connection conn= DriverManager.getConnection(url,user,password); 2、DB2数据库 Class.forName("com.ibm.db2.jdbc.app.DB2Driver ").newInstance(); String url="jdbc:db2://localhost:5000/sample"; //sample为你的数据库名 String user="admin"; String password=""; Connection conn= DriverManager.getConnection(url,user,password); 3、Sql Server7.0/2000数据库 Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance(); String url="jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=mydb"; //mydb为数据库 String user="sa"; String password=""; Connection conn= DriverManager.getConnection(url,user,password); 4、Sybase数据库 Class.forName("com.sybase.jdbc.SybDriver").newInstance(); String url =" jdbc:sybase:Tds:localhost:5007/myDB"; //myDB为你的数据库名 Properties sysProps = System.getProperties(); SysProps.put("user","userid"); SysProps.put("password","user_password"); Connection conn= DriverManager.getConnection(url, SysProps); 5、Informix数据库 Class.forName("com.informix.jdbc.IfxDriver").newInstance(); String url = "jdbc:informix-sqli://123.45.67.89:1533/myDB:INFORMIXSERVER=myserver; user=testuser;password=testpassword"; //myDB为数据库名 Connection conn= DriverManager.getConnection(url); 6、MySQL数据库 Class.forName("org.gjt.mm.mysql.Driver").newInstance(); String url ="jdbc:mysql://localhost/myDB?user=soft&password=soft1234&useUnicod e=true&characterEncoding=8859_1" //myDB为数据库名 Connection conn= DriverManager.getConnection(url); 7、PostgreSQL数据库 Class.forName("org.postgresql.Driver").newInstance(); String url ="jdbc:postgresql://localhost/myDB" //myDB为数据库名 String user="myuser"; String password="mypassword"; Connection conn= DriverManager.getConnection(url,user,password);

2,596

社区成员

发帖
与我相关
我的任务
社区描述
Sybase相关技术讨论区
社区管理员
  • Sybase社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧