oracle config.o,使用SQLPLUS /AS SYSDBA报错ORA-01031解决方法

数据库版本:10.2.0.5

前提:将oracle用户下的软件,拷贝到yworacle用户下。执行relink all之后,创建数据库

现象:使用sqlplus ‘/as sysdba’ 无法登陆,报ORA-01031错误

密码文件、sqlnet.ora均正常

解决:

1.关闭数据库实例

2.修改conf.c文件

cd

$ORACLE_HOME/rdbms/lib

- vi config.c

Edit the following lines :

from:

#define SS_DBA_GRP "dba"

#define SS_OPER_GRP "dba"

to:

#define SS_DBA_GRP "ywdba"

#define SS_OPER_GRP "ywdba"

3.重新编译conf.c文件

mv config.o config.old

make -f ins_rdbms.mk config.o

ls -al config.o

4.重新relink config.o文件

make -f

ins_rdbms.mk ioracle

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

crmdb1$[/yworacle]sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Apr 26 11:38:37

2012

Copyright (c) 1982, 2010, Oracle. All Rights

Reserved.

ERROR:

ORA-01031: insufficient privileges

Enter user-name:

crmdb1$[/yworacle]sqlplus /nolog

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Apr 26 11:38:46

2012

Copyright (c) 1982, 2010, Oracle. All Rights

Reserved.

SQL> conn /as sysdba

ERROR:

ORA-01031: insufficient privileges

SQL> conn sys/oracle as sysdba

Connected.

SQL>

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release

10.2.0.5.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data

Mining

and Real Application Testing options

crmdb1$[/yworacle]sqlplus sys/oracle as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Apr 26 11:40:15

2012

Copyright (c) 1982, 2010, Oracle. All Rights

Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit

Production

With the Partitioning, Real Application Clusters, OLAP, Data

Mining

and Real Application Testing options

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release

10.2.0.5.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data

Mining

and Real Application Testing options

crmdb1$[/yworacle] cd $ORACLE_HOME/rdbms/lib

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]vi config.c

"config.c" 7 lines, 259 characters

#define SS_DBA_GRP "ywdba"

#define SS_OPER_GRP "ywdba"

char *ss_dba_grp[] = {SS_DBA_GRP, SS_OPER_GRP};

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]ls -l config*

-rwxr-xr-x 1

yworacle ywdba 259 Apr 26 11:07 config.c

-rwxr-xr-x 1

yworacle ywdba 1848 Apr 25 17:23 config.o

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]mv config.o config.o.old

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]make -f ins_rdbms.mk

config.o

cc -Ae -z

+Olibmerrno +Z -DHPUX -DORAIA64 -DHPUX_IA64 +DD64 -DSS_64BIT_SERVER

-DHPPA64 -DSLS8NATIVE -DSLU8NATIVE +DD64 -D_LARGEFILE64_SOURCE -D_REENTRANT -DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE

-D_REENTRANT -I/yworacle/product/10.2.0/db/rdbms/demo

-I/yworacle/product/10.2.0/db/rdbms/public

-I/yworacle/product/10.2.0/db/plsql/public

-I/yworacle/product/10.2.0/db/network/public -DHPUX -D_REENTRANT

-DHPUX_KTHREAD -DSLXMX_ENABLE -DSLTS_ENABLE -DSS_64BIT_SERVER -DBIT64

-DMACHINE64 -DORAIA64

-DHPUX_IA64 -c config.c

(Bundled) cc: warning 922: "-Ae" is unsupported in the bundled

compiler, ignored.

(Bundled) cc: warning 922: "+Olibmerrno" is unsupported in the

bundled compiler, ignored.

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib] ls -al

config.o

-rw-r--r-- 1

yworacle ywdba 1768 Apr 26 11:41 config.o

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]make -f ins_rdbms.mk

ioracle

chmod 755 /yworacle/product/10.2.0/db/bin

- Linking Oracle

rm -f /yworacle/product/10.2.0/db/rdbms/lib/oracle

cc +DD64 -Wl,+s -Wl,+n +DD64 -o

/yworacle/product/10.2.0/db/rdbms/lib/oracle

-L/yworacle/product/10.2.0/db/rdbms/lib/

-L/yworacle/product/10.2.0/db/lib/ /yworacle/product/10.2.0/db/rdbms/lib/ssoident.o `if

/usr/bin/getconf KERNEL_BITS | grep "64" > /dev/null

; \

then echo "-Wl,+pi,64M -Wl,+pd,L -Wl,+padtext,16M -Wl,+paddata,1M"

; \

else echo "" ; fi` -Wl,-E -Wl,-PF,linkorderfile +FPd

/yworacle/product/10.2.0/db/rdbms/lib/opimai.o

/yworacle/product/10.2.0/db/rdbms/lib/ssoraed.o

/yworacle/product/10.2.0/db/rdbms/lib/ttcsoi.o /yworacle/product/10.2.0/db/rdbms/lib/defopt.o -Wl,+forceload -lperfsrv10 -Wl,+noforceload

/yworacle/product/10.2.0/db/lib/nautab.o

/yworacle/product/10.2.0/db/lib/naeet.o

/yworacle/product/10.2.0/db/lib/naect.o

/yworacle/product/10.2.0/db/lib/naedhs.o

/yworacle/product/10.2.0/db/rdbms/lib/config.o -lserver10 -lodm10 -lnnet10 -lskgxp10 -lsnls10

-lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lhasgen10

-lcore10 -lskgxn2 -locr10 -locrb10

-locrutl10 -lhasgen10 -lcore10

-lskgxn2 -lclient10 -lvsn10 -lcommon10

-lgeneric10 -lknlopt `if /usr/ccs/bin/ar tv

/yworacle/product/10.2.0/db/rdbms/lib/libknlopt.a | grep xsyeolap.o

> /dev/null 2>&1 ;

then echo "-loraolap10" ; fi` -lslax10

-lpls10 -lplp10 -lserver10

-lclient10 -lvsn10 -lcommon10

-lgeneric10 `if [ -f

/yworacle/product/10.2.0/db/lib/libavserver10.a ] ; then echo

"-lavserver10" ; else echo "-lavstub10"; fi` `if [ -f

/yworacle/product/10.2.0/db/lib/libavclient10.a ] ; then echo

"-lavclient10" ; fi` -lknlopt -lslax10

-lpls10 -lplp10 -ljox10

-lserver10 /yworacle/product/10.2.0/db/has/lib/libclsra10.a -ldbcfg10

-locijdbcst10 -lwwg `cat

/yworacle/product/10.2.0/db/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10

`cat

/yworacle/product/10.2.0/db/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lmm

-lsnls10 -lnls10 -lcore10

-lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10

-lxml10 -lcore10 -lunls10 -lsnls10 -lnls10

-lcore10 -lnls10 `cat

/yworacle/product/10.2.0/db/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10 -lnl10 -lnro10

`cat

/yworacle/product/10.2.0/db/lib/ldflags` -lnsslb10 -lncrypt10 -lnsgr10 -lnzjs10 -ln10 -lnnz10

-lnl10 -lsnls10

-lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 `if

/usr/ccs/bin/ar tv

/yworacle/product/10.2.0/db/rdbms/lib/libknlopt.a | grep "kxmnsd.o"

> /dev/null 2>&1 ;

then echo " " ; else echo "-lordsdo10"; fi` -lctxc10 -lctx10 -lzx10

-lgx10 -lctx10 -lzx10 -lgx10 -lordimt10 -lsnls10

-lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lxml10 -lcore10 -lunls10 -lsnls10 -lnls10 -lcore10 -lnls10 -lsnls10

-lunls10 -lsnls10 -lnls10 -lcore10 -lsnls10 -lnls10 -lcore10 -lsnls10

-lnls10 -lxml10 -lcore10 -lunls10 -lsnls10

-lnls10 -lcore10

-lnls10 `cat /yworacle/product/10.2.0/db/lib/sysliblist` -lm `cat

/yworacle/product/10.2.0/db/lib/sysliblist` -lm -lpthread -lpthread

mv -f /yworacle/product/10.2.0/db/bin/oracle

/yworacle/product/10.2.0/db/bin/oracleO

mv /yworacle/product/10.2.0/db/rdbms/lib/oracle

/yworacle/product/10.2.0/db/bin/oracle

chmod 6751 /yworacle/product/10.2.0/db/bin/oracle

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]

crmdb1$[/yworacle/product/10.2.0/db/rdbms/lib]cd

crmdb1$[/yworacle]sqlplus '/as sysdba

> '

SQL*Plus: Release 10.2.0.5.0 - Production on Thu Apr 26 11:44:09

2012

Copyright (c) 1982, 2010, Oracle. All Rights

Reserved.

Connected to an idle instance.

SQL> startup

ORACLE instance started.

Total System Global Area 1610612736 bytes

Fixed

Size 2068264 bytes

Variable

Size 385876184 bytes

Database

Buffers 1191182336 bytes

Redo

Buffers 31485952 bytes

Database mounted.

Database opened.

SQL> select instance_name,status from

v$instance;

INSTANCE_NAME STATUS

---------------- ------------

ywcrmdb OPEN

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值