DB2 创建用户,解决SQLSTATE=58004)

看起来DB2和OS的用户账号相关联,先来学学怎么创建windows账户

http://wenku.baidu.com/view/130730365a8102d276a22f63.html

查看所有用户:

C:\Documents and Settings\Administrator>net user

User accounts for \\IBM-R8M6A58

-------------------------------------------------------------------------------
ASPNET                   cyper.yin                db2admin
Guest                    HelpAssistant            SUPPORT_388945a0
The command completed successfully.

添加名为test的用户

D:\>net user test passw0rd /add
The command completed successfully.

查看所有的用户组

D:\>net localgroup

Aliases for \\IBM-R8M6A58

-------------------------------------------------
*Administrators
*Backup Operators
*DB2ADMNS
*DB2USERS
*Guests
*HelpServicesGroup
*Network Configuration Operators
*ora_dba
*Power Users
*Remote Desktop Users
*Replicator
*Users
The command completed successfully.

将用户test加入administrators组:

D:\>net localgroup administrators test /add
The command completed successfully.

这时用户test已经可以连上sample数据库了。

应该只要将test加入db2admns组就可以了。我突然想用db2cc命令结果没有

我想可能是"典型安装"没有这个功能,所以我双击解压后的setup.exe以 "使用现有产品“ , ”修改“ 模式重新安装

结果,安装完后,那一幕又发生了

C:\Documents and Settings\Administrator>db2start
DB2 : The service has returned a service-specific error code.

SQL1042C  发生了意外的系统错误。  SQLSTATE=58004

欲哭无泪,根据这里的线索 http://www.ibm.com/developerworks/forums/thread.jspa?messageID=14906211&tstart=0


Re: DB2 ExpressC v.10.1 doesn't work on Windows xp 32bit (?)
方案一:We resolved this problem by adding c:\program files\ibm\gsk8\lib to the PATH environment variable.
(我试了一下方案一,成功了!)

方案二:Whenever you type the command db2start if the following error is displayed
DB2 : The service has returned a service-specific error code.
SQL1042C An unexpected system error occurred. SQLSTATE=58004
Create icc64 directory in C:\Program Files\IBM\SQLLIB\BIN\ and copy the contents of C:\Program Files\IBM\gsk8\lib64 to C:\Program Files\IBM\SQLLIB\BIN\icc64 directory (copy only the contents of lib64 directory and also make sure you copy all the contents of lib64 directory)
方案二说的是64位的情况,我的电脑是32位的,我将
C:\Program Files\IBM\gsk8\lib目录下的所有内容拷贝到D:\IBM\SQLLIB\BIN\icc目录下,也成功了!(icc目录不存在,需要自己创建)

现在的问题是,公司的破电脑上有装PGP,DB2的日志文件的关键部分都加密了,
C:\Documents and Settings\All Users\Application Data\IBM\DB2\DB2COPY1\DB2\db2diag.log
这叫我日后如何去分析DB2日志文件, 看来得买个自己的电脑了。。


你可能感兴趣的:(DB2 创建用户,解决SQLSTATE=58004))