cancel
Showing results for 
Search instead for 
Did you mean: 

ORA-01031: insufficient privileges

Former Member
0 Kudos

Dear All,

I have upgrade SAP 4.7 to ECC 6.0 and database from Oarcle 9 to 10g and now while i go to execute job "Check Database & Update Optimizer Stats" via DB13 then i get below error:

Pls help me to resolve this issue:

********************

26.06.2007 12:30:01 Job started

26.06.2007 12:30:01 Step 001 started (program RSDBAJOB, variant &0000000001931, user ID JITENDRA)

26.06.2007 12:30:01 Execute logical command BRCONNECT On host bssltests

26.06.2007 12:30:01 Parameters: -u / -jid STATS20070626123001 -c -f stats -t ALL

26.06.2007 12:30:07 BR0801I BRCONNECT 7.00 (18)

26.06.2007 12:30:07 BR0805I Start of BRCONNECT processing: cdvokrcl.sta 2007-06-26 12.30.03

26.06.2007 12:30:07

26.06.2007 12:30:07 BR0280I BRCONNECT time stamp: 2007-06-26 12.30.07

26.06.2007 12:30:07 BR0813I Schema owners found in database PRD: SAPPRD*, SAPPRDSHD+

26.06.2007 12:30:07 BR0280I BRCONNECT time stamp: 2007-06-26 12.30.07

26.06.2007 12:30:07 BR0301E SQL error -1031 at location BrRsnspaceRead-1, SQL statement:

26.06.2007 12:30:07 'PREPARE stmt_11 STATEMENT FROM'

26.06.2007 12:30:07 'SELECT NAMESPACE, NSPACEGEN FROM "SAPPRD".RSNSPACE ORDER BY NAMESPACE'

26.06.2007 12:30:07 ORA-01031: insufficient privileges

26.06.2007 12:30:07

26.06.2007 12:30:07 BR0806I End of BRCONNECT processing: cdvokrcl.sta2007-06-26 12.30.07

26.06.2007 12:30:07 BR0280I BRCONNECT time stamp: 2007-06-26 12.30.07

26.06.2007 12:30:07 BR0804I BRCONNECT terminated with errors

26.06.2007 12:30:07 External program terminated with exit code 3

26.06.2007 12:30:07 BRCONNECT returned error status E

26.06.2007 12:30:07 Job finished

***************************

Regards & Thanks,

Ankita

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Dear Dabinder,

Ask the database administrator to perform the operation or grant the required privileges. For Trusted Oracle users getting this error although granted the the appropriate privilege at a higher label, ask the database administrator to regrant the privilege at the appropriate label.

Regards

Ganesh

Former Member
0 Kudos

Dear Dabinder,

Check the notes 776505 and 400241

It will solve your problem

Regards

Nani

Former Member
0 Kudos

Hi Dabinder,

Follow Note Number 400241

<b>General checks</b>

  • Check whether creating the OPS$ mechanism according to Note 50088 (WINDOWS) or 361641 (UNIX) solves the problem.

  • Table SAPUSER should occur in the system once only and be assigned to user OPS$<sid>ADM. To check this, use the following query:

SELECT OWNER FROM DBA_TABLES WHERE TABLE_NAME = 'SAPUSER';

If the system returns an owner <owner> other than OPS$<sid>ADM, then delete the corresponding SAPUSER tables:

DROP TABLE "<owner>".SAPUSER;

If the system does not return OPS$<sid>ADM, create the SAPUSER table as <sid>adm and enter the password:

CREATE TABLE "OPS$<sid>ADM".SAPUSER

(USERID VARCHAR2(256), PASSWD VARCHAR2(256));

INSERT INTO "OPS$<sid>ADM".SAPUSER VALUES ('<sapowner>', '<password>');

  • This section applies to NT in particular. But if more than one OPS$ user is used under UNIX as well, the checks need to be carried out in the same way.

  • Under NT, it is required that user sapservice<sid> can also access the SAPUSER table. In order to avoid problems with the data consistency, it does not make sense to create an additional SAPUSER table having the same contents. Instead, you should define a synonym. Check if a suitable synonym exists by using the following call:

SELECT OWNER, TABLE_OWNER, TABLE_NAME FROM DBA_SYNONYMS

WHERE SYNONYM_NAME = 'SAPUSER';

As first value, this call should return either OPS$SAPSERVICE<sid> or PUBLIC, followed by OPS$<sid>ADM and SAPUSER. If this is not the case, recreate the synonym after you have deleted it:

If PUBLIC is returned as first value:

DROP PUBLIC SYNONYM SAPUSER;

If another name <name> is returned as first value:

DROP SYNONYM "<name>".SAPUSER;

Now you can recreate the synonym (It is best not to use PUBLIC):

CREATE SYNONYM "OPS$SAPSERVICE<sid>".SAPUSER FOR

"OPS$<sid>ADM".SAPUSER;

To allow access to the synonym (or the associated table), a grant has to be executed. Only the OPS$ user to whom the actual table belongs has the authorization to do this - that is OPS$<sid>ADM. Therefore, you must log on with the corresponding operating system user (<sid>adm) and execute the following commands:

CONNECT /

GRANT SELECT, UPDATE ON SAPUSER TO "OPS$SAPSERVICE<sid>";

  • By default, R3trans uses SAPR3 as database user. With the environment variable, you can define another database user. This makes sense in particular with R/3 6.x, if SAPR3 is replaced by SAP<sid>. If with R/3 <= 4.x, dbs_ora_schema is set to another value than SAPR3, the connect fails since that user exists neither in the database nor in the SAPUSER table. Consequences include errors such as ORA-01403 or ORA-01017. Up to and including 4.6D, dbs_ora_schema should not be set in any user environment.

Regards,

suraj

Former Member
0 Kudos

you are not authorized to cut and paste copyrighted material.

please stop this kind of distribution.

Peter

Former Member
0 Kudos

please follow the upgrade guide and run sapconn.sql and sapdba_role.sql as documented.

regards

Peter

Former Member
0 Kudos

Hello Peter,

Thanks for your response. I tried to execute sapdba.sql but its giving me below error:

**********

root@bssltests # cd /oracle/PRD/102_64/dbs

root@bssltests # ls -l

total 122034

-rw------- 1 oraprd dba 62382080 Jun 21 15:49 core

-rw-rw---- 1 oraprd dba 1552 Jun 25 19:42 hc_PRD.dat

-rw-r----- 1 oraprd dba 8385 Sep 11 1998 init.ora

-rwxrwxr-x 1 oraprd dba 1736 Jun 25 21:08 initPRD.ora

-rwxrwxr-x 1 oraprd dba 18594 May 22 11:19 initPRD.sap

-rw-r----- 1 oraprd dba 12920 May 3 2001 initdw.ora

-rw-rw---- 1 oraprd dba 24 May 21 19:18 lkPRD

-rw-rr 1 oraprd dba 1571 May 22 11:27 sapdba_role.log

-rwxrwxr-x 1 oraprd dba 4951 Jun 25 16:39 sapdba_role.sql

-rw-r----- 1 oraprd dba 3584 May 22 11:36 spfilePRD.ora

root@bssltests # chmod 777 sapdba_role.sql

root@bssltests # su - oraprd

Sun Microsystems Inc. SunOS 5.10 Generic January 2005

bssltests:oraprd 1% sqlplus /nolog @sapdba_role SAPPRD

SQL*Plus: Release 10.2.0.2.0 - Production on Tue Jun 26 13:36:50 2007

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

SP2-0310: unable to open file "sapdba_role.sql"

**************

Now wat shd i do?? Pls advise.

Regards,

Ankita.

Former Member
0 Kudos

Hi,

Please, put the full path to execute the script: ....<i>@/oracle/PRD/102_64/dbs/sapdba_role</i>

Regards,

JC Llanes.