Home » Infrastructure » Windows » ora-01031: insufficient Privileges (10g ( 10.2.0.3.0), Windows 2008 Server R2)
ora-01031: insufficient Privileges [message #668276] Fri, 16 February 2018 05:34 Go to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
I am using 10g, Windows Server 2008 R2 I am getting the error ORA-01031 to connect as sysdba. screenshot attached. I have googled it a lot but no use. User Administrator is member of ORA_DBA. Any help in this regard please.



RZKhan
  • Attachment: ora-01031.png
    (Size: 18.04KB, Downloaded 284 times)
Re: ora-01031: insufficient Privileges [message #668277 is a reply to message #668276] Fri, 16 February 2018 05:40 Go to previous messageGo to next message
John Watson
Messages: 7770
Registered: January 2010
Location: Global Village
Senior Member
You appear to be using a release 8 client, so probably your ORACLE_HOME and PATH are set up all wrong. Furthermore, I cannot remember if that ancient release supports the syntax you are trying to use. If you want to connect to a 10.x database, better throw it the 8.0 stuff and run the correct client version.
Re: ora-01031: insufficient Privileges [message #668278 is a reply to message #668277] Fri, 16 February 2018 05:48 Go to previous messageGo to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
how to update client please? or set oracle_home, path ?

[Updated on: Fri, 16 February 2018 05:56]

Report message to a moderator

Re: ora-01031: insufficient Privileges [message #668279 is a reply to message #668278] Fri, 16 February 2018 06:04 Go to previous messageGo to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
I set the home and path accordingly but still the same error.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>set ORACLE_HOME=C:\oracle\product\10.2.0\db_1

C:\Users\Administrator>set PATH=C:\oracle\product\10.2.0\db_1\bin

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 16 16:55:55 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:


Re: ora-01031: insufficient Privileges [message #668281 is a reply to message #668279] Fri, 16 February 2018 06:10 Go to previous messageGo to next message
John Watson
Messages: 7770
Registered: January 2010
Location: Global Village
Senior Member
In your first post, you had a screen shot showing that you were running Windows version 6.3.9600, which is 8.1/2012R2. You latest copy/paste show version 6.1.7601 which is 7/2008R2. So you are now using a different computer. I can't work with people who play games like that.
Re: ora-01031: insufficient Privileges [message #668283 is a reply to message #668281] Fri, 16 February 2018 06:29 Go to previous messageGo to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
Sorry for any confusion thus caused...Actually I have to computers both of them have this problem.

PC11:

I set the oracle_home and path (as per your kind suggestion) and it works fine as below


C:\Users\Administrator>set oracle_home=C:\oracle\product\10.2.0\db_1

C:\Users\Administrator>set PATH=C:\oracle\product\10.2.0\db_1\bin

C:\Users\Administrator>sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 16 16:59:37 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

SQL> exit

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 16 16:59:48 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL>



PC2:

I set the oracle_home and path but still it gets the following error
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Administrator>set ORACLE_HOME=C:\oracle\product\10.2.0\db_1

C:\Users\Administrator>set PATH=C:\oracle\product\10.2.0\db_1\bin

C:\Users\Administrator>sqlplus / as sysdba

SQL*Plus: Release 10.2.0.3.0 - Production on Fri Feb 16 16:55:55 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

ERROR:
ORA-01031: insufficient privileges


Enter user-name:



Any further kind help would be greatly appreciated..

Re: ora-01031: insufficient Privileges [message #668289 is a reply to message #668283] Fri, 16 February 2018 07:34 Go to previous messageGo to next message
BlackSwan
Messages: 26397
Registered: January 2009
Location: SoCal
Senior Member
>ORA-01031: insufficient privileges
You need to be logged onto the OS as the same OS user who owns the Oracle software files.
Re: ora-01031: insufficient Privileges [message #668293 is a reply to message #668289] Fri, 16 February 2018 21:14 Go to previous messageGo to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
I always use administrator for this purpose with full ora_dba privileges.
Re: ora-01031: insufficient Privileges [message #668294 is a reply to message #668293] Fri, 16 February 2018 23:36 Go to previous messageGo to next message
BlackSwan
Messages: 26397
Registered: January 2009
Location: SoCal
Senior Member
rzkhan wrote on Fri, 16 February 2018 19:14
I always use administrator for this purpose with full ora_dba privileges.
You don't have to convince me about what you do or how you do it.
You need to convince Oracle to allow you to login
sys/password as sysdba

Either Oracle is correct & you are mistaken
or you are correct & you have discovered a bug in Oracle software.
If you have found a bug in Oracle software you need to submit a Bug Report to My Oracle Support.

Since you are convinced that the problem is not what you are doing, then I can not offer additional assistance.
Re: ora-01031: insufficient Privileges [message #668296 is a reply to message #668283] Sat, 17 February 2018 01:39 Go to previous messageGo to next message
John Watson
Messages: 7770
Registered: January 2010
Location: Global Village
Senior Member
You have not set your ORACLE_SID.
Re: ora-01031: insufficient Privileges [message #668326 is a reply to message #668296] Sun, 18 February 2018 23:30 Go to previous messageGo to next message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
After setting ORACLE_SID I am able to connect as sysdba. Thank you all and John Watson.

Actually this connect was needed to resolve "ORA-01033: ORACLE initialization or shutdown in progress." as suggested on https://stackoverflow.com/questions/53676/how-to-resolve-ora-011033-oracle-initialization-or-shutdown-in-progress

but applying recover database throws the following error.
SQL*Plus: Release 10.2.0.3.0 - Production on Mon Feb 19 10:11:43 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

@ SQL>connect sys / as sysdba
Enter password:
Connected.
SYS@orcl SQL>shutdown abort;
ORACLE instance shut down.
SYS@orcl SQL>startup nomount;
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1290208 bytes
Variable Size             251658272 bytes
Database Buffers           33554432 bytes
Redo Buffers                7098368 bytes
SYS@orcl SQL>alter database mount;

Database altered.

SYS@orcl SQL>shutdown abort
ORACLE instance shut down.
SYS@orcl SQL>startup mount;
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1290208 bytes
Variable Size             251658272 bytes
Database Buffers           33554432 bytes
Redo Buffers                7098368 bytes
Database mounted.
SYS@orcl SQL>recover database;
ORA-00283: recovery session canceled due to errors
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 8774 change 136376876 time 02/07/2018
08:59:54
ORA-00312: online log 2 thread 1:
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'


SYS@orcl SQL>alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'


SYS@orcl SQL>




Any tip please..
Re: ora-01031: insufficient Privileges [message #668329 is a reply to message #668326] Sun, 18 February 2018 23:58 Go to previous message
rzkhan
Messages: 363
Registered: March 2005
Senior Member
My problem has been resolved as below.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>set ORACLE_HOME=C:\oracle\product\10.2.0\db_1

C:\Windows\system32>set PATH=C:\oracle\product\10.2.0\db_1\bin

C:\Windows\system32>set ORACLE_SID=orcl

C:\Windows\system32>sqlplus /nolog

SQL*Plus: Release 10.2.0.3.0 - Production on Mon Feb 19 10:11:43 2018

Copyright (c) 1982, 2006, Oracle.  All Rights Reserved.

@ SQL>connect sys / as sysdba
Enter password:
Connected.
SYS@orcl SQL>shutdown abort;
ORACLE instance shut down.
SYS@orcl SQL>startup nomount;
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1290208 bytes
Variable Size             251658272 bytes
Database Buffers           33554432 bytes
Redo Buffers                7098368 bytes
SYS@orcl SQL>alter database mount;

Database altered.

SYS@orcl SQL>shutdown abort
ORACLE instance shut down.
SYS@orcl SQL>startup mount;
ORACLE instance started.

Total System Global Area  293601280 bytes
Fixed Size                  1290208 bytes
Variable Size             251658272 bytes
Database Buffers           33554432 bytes
Redo Buffers                7098368 bytes
Database mounted.
SYS@orcl SQL>recover database;
ORA-00283: recovery session canceled due to errors
ORA-00354: corrupt redo log block header
ORA-00353: log corruption near block 8774 change 136376876 time 02/07/2018
08:59:54
ORA-00312: online log 2 thread 1:
'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\REDO02.LOG'


SYS@orcl SQL>alter database open;
alter database open
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL\SYSTEM01.DBF'


SYS@orcl SQL>select * from v$log;

    GROUP#    THREAD#  SEQUENCE#      BYTES    MEMBERS ARC STATUS
---------- ---------- ---------- ---------- ---------- --- ----------------
FIRST_CHANGE# FIRST_TIM
------------- ---------
         1          1       1286   52428800          1 NO  INACTIVE
    136338338 07-FEB-18

         3          1       1285   52428800          1 NO  INACTIVE
    136304932 06-FEB-18

         2          1       1287   52428800          1 NO  CURRENT
    136369934 07-FEB-18


SYS@orcl SQL>select group#,sequence#,status from v$log;

    GROUP#  SEQUENCE# STATUS
---------- ---------- ----------------
         1       1286 INACTIVE
         3       1285 INACTIVE
         2       1287 CURRENT

SYS@orcl SQL>desc v$log;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------

 GROUP#                                             NUMBER
 THREAD#                                            NUMBER
 SEQUENCE#                                          NUMBER
 BYTES                                              NUMBER
 MEMBERS                                            NUMBER
 ARCHIVED                                           VARCHAR2(3)
 STATUS                                             VARCHAR2(16)
 FIRST_CHANGE#                                      NUMBER
 FIRST_TIME                                         DATE

SYS@orcl SQL>select group#,members,archived,status,first_change#,first_time from
 v$log;

    GROUP#    MEMBERS ARC STATUS           FIRST_CHANGE# FIRST_TIM
---------- ---------- --- ---------------- ------------- ---------
         1          1 NO  INACTIVE             136338338 07-FEB-18
         3          1 NO  INACTIVE             136304932 06-FEB-18
         2          1 NO  CURRENT              136369934 07-FEB-18

SYS@orcl SQL>alter database clear unarchived logfile 'C:\ORACLE\PRODUCT\10.2.0\O
RADATA\ORCL\REDO02.LOG';

Database altered.

SYS@orcl SQL>recover database;
Media recovery complete.
SYS@orcl SQL>alter database open;

Database altered.

SYS@orcl SQL>







I am really thankful to ORAFAQ and all who helped me...

Thanks a lot..

Previous Topic: steps to call a function in VC+ dll
Next Topic: ODP Method OpenWithNewPassword not working
Goto Forum:
  


Current Time: Sat Feb 16 23:24:53 CST 2019