Execute immediate on DBMS_METADATA.GET_DDL with error of ORA-01031: insufficient privileges
I want to mirror a schema to a existing schema by creating DDL and recreate on the other schema with same name.
I wrote the code below:
create or replace
PROCEDURE SCHEMA_A."MAI__DWHMIRROR"
AS
v_sqlstatement CLOB:='bos';
str varchar2(3999);
BEGIN
select
replace(
replace(replace(
replace(DBMS_METADATA.GET_DDL('TABLE','XXXX','SCHEMA_A'),'(CLOB)',''),';','')
,'SCHEMA_A'
,'SCHEMA_B'
into v_sqlstatement
from dual;
select CAST(v_sqlstatement AS VARCHAR2(3999)) into str from dual;
execute immediate ''||str;
END;
And Executing this block with below code:
set serveroutput on
begin
SCHEMA_A.MAI__DWHMIRROR;
end;
But still getting the following error code:
Error report:
ORA-01031: insufficient privileges
ORA-06512: at "SCHEMA_A.MAI__DWHMIRROR", line 47
ORA-06512: at line 2
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: 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.
user5199319 wrote:
USER has DBA Role
when all else fails Read The Fine Manual
DBMS_METADATA
Similar Messages
-
Fail to logon with SYS user: ORA-01031: insufficient privileges
Hello,
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
OS: CentOS 5.5
I fail to log on with SYS user through PL/SQL Developer. I receive the error: ORA-01031: insufficient privileges. PL/SQL Developer is installed on Windows 7 Professional. Oracle Client Version is 11.2.0.1.0. However I logon successfully with SYSMAN and SYSTEM.
For those who might ask whether I try to connect "as sysdba" when I use SYS user, the answer is YES, I do.
Besides I think the name of the tool (PL/SQL Developer) doesn't matter because I think I'll face the same error with any other tool (but I mentioned it just in case).
On server side I have no issues with SYS user. I can connect through SQLPlus with connect / as sysdba or connect "/as sysdba" faultlessly.
The initialization parameter sec_case_sensitive_logon is set to FALSE
SQL> show parameter sensi
NAME TYPE VALUE
sec_case_sensitive_logon boolean FALSE
I'm using local naming to connect and on client side I've a tnanames.ora file. The sqlnet.ora file looks like this:
SQLNET.AUTHENTICATION_SERVICES= (NTS)
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)I read in this forum (another thread) about using a password file. I created a password file using orapwd this way:
orapwd file=orapwDB11G2 entries=100 ignorecase=y password=a_passwordwhere I replaced "a_password" with the SYS password.
Actually I'm not sure the client is influenced by the password file anyway because I tell it to use local naming.
Any clues?
Thank you very much!Verdi wrote:
Hello, Chinar, AlexeyDev,
ORACLE_SID variable is:
[oracle@localhost bin]$ echo $ORACLE_SID
planetThe directory $ORACLE_HOME/dbs:
[oracle@localhost ~]$ ls -l $ORACLE_HOME/dbs
total 28020
-rw-rw---- 1 oracle oinstall 1544 Apr 10 12:43 hc_DBUA0.dat
-rw-rw---- 1 oracle oinstall 1544 Apr 27 18:02 hc_planet.dat
-rw-r--r-- 1 oracle oinstall 2851 May 15 2009 init.ora
-rw-r--r-- 1 oracle oinstall 2966 Apr 26 16:33 initplanet.ora
-rw-r----- 1 oracle oinstall 24 Apr 1 18:22 lkPLANET
-rw-r----- 1 oracle oinstall 9519104 Apr 27 18:43 ora_control1
-rw-r----- 1 oracle oinstall 9519104 Apr 27 18:43 ora_control2
drwx------ 2 oracle oinstall 4096 Apr 10 12:43 peshm_DBUA0_0
drwx------ 2 oracle oinstall 4096 Apr 1 18:19 peshm_planet_0
-rw-r----- 1 oracle oinstall 9519104 Apr 8 11:25 snapcf_planet.f
-rw-r----- 1 oracle oinstall 2560 Apr 27 18:41 spfileplanet.oraThe value of the parameter remote_login_passwordfile is:
*.remote_login_passwordfile='EXCLUSIVE'
I start up the instance using the spfile.As a side observation, it appears you have two control files also in this directory. That is risky, and goes against the intent of having multiplexed the control file. Ideally they would be on separate disk devices - including separate controllers, but at the very least they should be in directories that are separate all the way back to the root directory. If you can't protect against hardware failure, at least protect against human failure. -
Scheduled Batch jobs error : ora-01031 insufficient privileges
I have created a batch job that runs my database backups on a windows 2000 server. This job works perfect from the command line with the following syntax:
coldbackup.bat PROD
I have tried to schedule this backup to run every evening as follows:
at 01:00 /every:M,T,W,Th,F,S C:\coldbackup.bat PROD
The batch job does run every morning but generates an error when trying to shutdown the database. The error is ora-01031 insufficient privileges and seems to be related to the 'connect / as sysdba' command. The job has been scheduled using the local 'Administrator' user, which have been added to the ORA_DBA group.
I have thought of one solution and that entails hard-coding the username and password into the script, but that creates a security risk.
Can someone explain this behaviour and possible provide a good solution.
Thank youSolution: Yes, I have found the solution to my problem.
I was trying to schedule the batch job from the command line and in doing so the job was running in a 'system' user.
When I scheduled the job from the control panel --> schedule tasks I was able to enter the 'run as' username and password. -
Check database with error "ORA-01031: insufficient privileges"
Dear Gurus,
I ran "Check database" in DB13 but I got error "ORA-01031: insufficient privileges"
BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
BR0301E SQL error -1031 at location BrDbdiffRead-1, SQL statement:
'PREPARE stmt_5 STATEMENT FROM'
'SELECT OBJNAME FROM "SAPSR3".DBDIFF WHERE DBSYS IN ('ORACLE', ' ') AND OBJTYPE = 'TABL' AND DIFFKIND IN ('02', '61', '99') ORDER BY OBJNAME'
ORA-01031: insufficient privileges
BR0806I End of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.37.00
Note I try to execute sapdba_role.sql (with command "sqlplus /nolog @sapdba_role.sql SR3") as Note 134592 both login 'oradev' and 'devadm' but it seem to do nothing (not found sapdba_role.log)
Please advice.
Best regards,
Choosak B.
Ps.
detailed log of /oracle/DEV/sapcheck/cecxekdh.chk
BR0801I BRCONNECT 7.00 (40)
BR0477I Oracle pfile /oracle/DEV/102_64/dbs/initDEV.ora created from spfile /oracle/DEV/102_64/dbs/spfileDEV.ora
BR0805I Start of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.30.53
BR0484I BRCONNECT log file: /oracle/DEV/sapcheck/cecxekdh.chk
BR0101I Parameters
Name Value
oracle_sid DEV
oracle_home /oracle/DEV/102_64
oracle_profile /oracle/DEV/102_64/dbs/initDEV.ora
sapdata_home /oracle/DEV
sap_profile /oracle/DEV/102_64/dbs/initDEV.sap
system_info devadm/oradev sapdev SunOS 5.10 Generic_142900-03 sun4v
oracle_info DEV 10.2.0.4.0 8192 7465 94896497 sapdev UTF8 UTF8
sap_info 701 SAPSR3 0002LK0003DEV0011N11827599290015Maintenance_ORA
make_info sun_64 OCI_102 Feb 21 2009
command_line brconnect -u / -jid CHECK20100331123000 -c -f check
alert_log /oracle/DEV/saptrace/background/alert_DEV.log
BR0280I BRCONNECT time stamp: 2010-03-31 12.30.56
BR0813I Schema owners found in database DEV:
DBSNMP, DIP, OPS$DEVADM, OPS$ORADEV, OPS$SAPSERVICEDEV, ORACLE_OCM, OUTLN, SAPSR3*, SYS, SYSTEM,
TSMSYS
BR0118I Tablespaces and data files
Tablespace Status File Status Id. Size MaxSize IncrSize BlkSize Device Type Link
PSAPSR3 ONLINE+ /oracle/DEV/sapdata2/sr3_1/sr3.data1 ONLINE+ 4 2411732992 10485760000 20971520 8192 16777219 FILE NOLINK
SYSTEM ONLINE+ /oracle/DEV/sapdata1/system_1/system.data1 SYSTEM+ 1 1017126912 10485760000 20971520 8192 16777219 FILE NOLINK
BR0119I Redo log files
File Status Group Size Device Type Link
/oracle/DEV/origlogA/log_g11m1.dbf INUSE 1 52429312 16777218 FILE NOLINK
/oracle/DEV/mirrlogA/log_g11m2.dbf INUSE 1 52429312 16777218 FILE NOLINK
/oracle/DEV/origlogB/log_g12m1.dbf INUSE 2 52429312 16777218 FILE NOLINK
/oracle/DEV/mirrlogB/log_g12m2.dbf INUSE 2 52429312 16777218 FILE NOLINK
/oracle/DEV/origlogA/log_g13m1.dbf INUSE 3 52429312 16777218 FILE NOLINK
/oracle/DEV/mirrlogA/log_g13m2.dbf INUSE 3 52429312 16777218 FILE NOLINK
/oracle/DEV/origlogB/log_g14m1.dbf INUSE 4 52429312 16777218 FILE NOLINK
/oracle/DEV/mirrlogB/log_g14m2.dbf INUSE 4 52429312 16777218 FILE NOLINK
BR0120I Control files
File Size Device Type Link
/oracle/DEV/origlogA/cntrl/cntrlDEV.dbf 15024128 16777218 FILE NOLINK
/oracle/DEV/origlogB/cntrl/cntrlDEV.dbf 15024128 16777218 FILE NOLINK
/oracle/DEV/sapdata1/cntrl/cntrlDEV.dbf 15024128 16777219 FILE NOLINK
BR0982I Database disk volumes
Directory / Raw disk Device Total[KB] Free[KB] Used[%] MaxNeed[KB] MaxMiss[KB]
/oracle/DEV/102_64 16777218 480700086 404332206 15.89 0 0
/oracle/DEV 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/mirrlogA 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/mirrlogB 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/origlogA 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/origlogB 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/sapdata1 16777219 591212116 404332206 31.61 240019884 0
/oracle/DEV/sapdata2 16777219 591212116 404332206 31.61 240019884 0
/oracle/DEV/sapdata3 16777219 591212116 404332206 31.61 240019884 0
/oracle/DEV/sapdata4 16777219 591212116 404332206 31.61 240019884 0
/oracle/DEV/saparch 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/sapbackup 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/sapcheck 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/sapreorg 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/saptrace 16777218 480700086 404332206 15.89 0 0
/oracle/DEV/oraarch 16777218 480700086 404332206 15.89 0 0
BR0280I BRCONNECT time stamp: 2010-03-31 12.31.29
BR0814I Number of tables in schema of owner SAPSR3: 74582
BR0836I Number of info cube tables found for owner SAPSR3: 49
BR0814I Number of tables/partitions in schema of owner SYS: 625/189
BR0814I Number of tables/partitions in schema of owner SYSTEM: 134/27
BR0280I BRCONNECT time stamp: 2010-03-31 12.32.28
BR0815I Number of indexes in schema of owner SAPSR3: 89159
BR0815I Number of indexes/partitions in schema of owner SYS: 678/199
BR0815I Number of indexes/partitions in schema of owner SYSTEM: 175/32
BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
BR0816I Number of segments in schema of owner DBSNMP: 25
BR0816I Number of segments in schema of owner OPS$DEVADM: 1
BR0816I Number of segments in schema of owner OUTLN: 9
BR0816I Number of segments/LOBs in schema of owner SAPSR3: 168369/2314
BR0816I Number of segments/LOBs in schema of owner SYS: 1831/87
BR0816I Number of segments/LOBs in schema of owner SYSTEM: 353/22
BR0816I Number of segments in schema of owner TSMSYS: 4
BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
BR0961I Number of conditions found in DBCHECKORA: 118
BR0983I Tablespace fragmentation
Tablespace Files Tables Indexes Extents Total[KB] Used[%] Free[KB] FreeExt. MaxSize[KB] MaxAlloc[KB] Used[%] Free[KB] Largest[KB]
PSAPSR3 16 74248 88689 209864 54138880 94.51 2970752 240 163840000+ 109701120+ 31.23+ 112671872+ 9246720:7966720:7946240:7905280:7905280+
PSAPSR3701 14 0 0 0 54466560 0.00 54465664 20 143360000+ 88893440+ 0.00+ 143359104+ 9021440:8192000:8192000:8192000:8192000+
PSAPSR3701X 4 310 445 12190 68342784 94.20 3962240 7 68342784 0 94.20 3962240 1298432:1191936:979968:163776:163776
PSAPSR3USR 1 24 25 51 51200 6.50 47872 1 10240000+ 10188800+ 0.03+ 10236672+ 10188800+:47872:0:0:0
PSAPTEMP 1 0 0 0 1433600 0.00 1433600 0 10240000+ 8806400+ 0.00+ 10240000+ 8806400+:0:0:0:0
PSAPUNDO 1 0 0 0 7823360 0.00 7823296 406 10240000+ 2416640+ 0.00+ 10239936+ 2416640+:2041792:1814464:1433536:603072
SYSAUX 1 254 284 2059 307200 93.35 20416 16 10240000+ 9932800+ 2.80+ 9953216+ 9932800+:13248:3072:1024:640
SYSTEM 1 505 569 2926 993280 98.91 10816 2 10240000+ 9246720+ 9.59+ 9257536+ 9246720+:10176:640:0:0
Total: 39 75341 90012 227090 187556864 62.29 70734656 692 426742784 239185920 27.38 309920576 60157952:19463744:18936384:17695616:16864768
BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
BR0301E SQL error -1031 at location BrDbdiffRead-1, SQL statement:
'PREPARE stmt_5 STATEMENT FROM'
'SELECT OBJNAME FROM "SAPSR3".DBDIFF WHERE DBSYS IN ('ORACLE', ' ') AND OBJTYPE = 'TABL' AND DIFFKIND IN ('02', '61', '99') ORDER BY OBJNAME'
ORA-01031: insufficient privileges
BR0806I End of BRCONNECT processing: cecxekdh.chk 2010-03-31 12.37.00
BR0280I BRCONNECT time stamp: 2010-03-31 12.37.00
BR0804I BRCONNECT terminated with errorsHi,
It solved after change permission of directory that sapdba_role.sql kept to oradev:dba after that it can write sapdba_role.log.
Thank you for your guideline.
Now, I can ran 'Check database' via DB13 without that error.
Best regards,
Choosak B. -
Error with fullonline_backup (ORA-01031: insufficient privileges)
Hi experts,
we are facing problem during sap fullonline + redolog backup. while wholeonline+redolog backup working fine.
please see the detail.
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.40
BR0063I 35 of 35 files processed - 117460.273 of 117460.273 MB done
BR0204I Percentage done: 100.00%, estimated end time: 16:06
BR0001I **************************************************
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.40
BR0317I 'Alter tablespace SYSTEM end backup' successful
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.42
BR0530I Cataloging backups of all database files...
BR0278E Command output of 'SHELL=/bin/sh /oracle/R3P/102_64/bin/rman nocatalog':
Recovery Manager: Release 10.2.0.4.0 - Production on Thu Dec 22 16:06:42 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN>
RMAN> connect target *
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges
RMAN> **end-of-file**
RMAN>
host command complete
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> 36> 37>
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of catalog command at 12/22/2011 16:06:42
RMAN-06171: not connected to target database
RMAN>
Recovery Manager complete.
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.42
BR0279E Return code from 'SHELL=/bin/sh /oracle/R3P/102_64/bin/rman nocatalog': 1
BR0536E RMAN call for database instance R3P failed
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.42
BR0532E Cataloging backups of all database files failed
BR0056I End of database backup: behmnbjo.fnt 2011-12-22 16.06.42
BR0280I BRBACKUP time stamp: 2011-12-22 16.06.42
BR0054I BRBACKUP terminated with errors
Regards
Imran KhanHi,
i dont think is due to authorization issue. There's a different between "FULL" and "WHOLE" database online backup.
Full database backup : Will backup all the databasee files (Inclusing datafiles, online redolog files and the control files) and do the catalog. So that we can use this as the referance backup and we can do the incremental backup.
Whole database backup : Will backup all the databasee files (Inclusing datafiles, online redolog files and the control files). We can't use this for the incremental backup.
As you see from the log, full database online backup is calling RMAN. FYI, backup your system with "Whole" is equally good unless you want to to use incremental backup.
Thanks,
Nicholas Chang
Edited by: Nicholas Chang on Dec 23, 2011 12:03 AM -
Facing error (ORA-01031: insufficient privileges)
Hi All,
I am facing a strange error as mentioned in the subject.
I googled and found that I dont have proper privileges to execute.
But my scenario is as follows
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE TEST1(X NUMBER)';
END;
PL/SQL procedure successfully completed.
CREATE PROCEDURE PR_TEST
IS
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE TEST2(X NUMBER)';
END;
EXEC PR_TEST;
ORA-01031: insufficient privileges
ORA-06512: at "SCMSA_HIST.PR_TEST", line 4
ORA-06512: at line 1
Appreicate your valuable response.
Thanks,
MK.Maddy wrote:
I googled and found that I dont have proper privileges to execute.
It is good that you have found the cause of issue. So, did you give proper privileges to resolve the error?
What is that you expect from the Forums?
Just give "Grant Create table to user" and resolve the issue. :)
Just wanted to add, Creating Objects on-the-go is not a very good approach.
Another, you might want to handle the exception, in case the Table/Object already exists. Else your Code Execution may be interrupted (Just with the thought that you may have code following the Dynamic Create Table statement; If you do not have then no issues.)
Edited by: Purvesh K on Jul 27, 2012 10:36 AM -
Error ORA-01031: insufficient privileges when backup via DB13
Hi expert,
Currently, I have system on SuSE 10 SP2 with ECC6 and Oracle 10.2 installed.
Database backup works fine when using BRTOOLS from command line.
Error like this :
BR0278E Command output of 'SHELL=/bin/sh /oracle/I20/920_32/bin/rman
nocatalog':
Recovery Manager: Release 9.2.0.4.0 - Production
Copyright (c) 1995, 2002, Oracle Corporation. All rights reserved.
RMAN>
RMAN> connect target /;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
ORA-01031: insufficient privileges
RMAN> *end-of-file*
happened when I try to schedule backup through DB13.
I try to solved this with SAP Note 776505 but still doesn't work.
Any suggestion ?
ardhianHi,
Execute the following command at sql prompt.
grant dba,resource,connect,sapdba to OPS$<SID>ADM OPS$ORA<SID>
grant dba,resource,connect,sapdba to O OPS$ORA<SID>
grant dba,resource,connect,sapdba to SAPSR3 or SAP<SID>(YOUR SCHEMA NAME)
Also check owner of SAPUSER table
SELECT OWNER FROM DBA_TABLES WHERE TABLE_NAME = 'SAPUSER';
If it returns value OPS$<SID>ADM than its ok, otherwise you have to drop this & recreate with command
CREATE TABLE "OPS$QASADM".SAPUSER
(USERID VARCHAR2(256), PASSWD VARCHAR2(256));
INSERT INTO "OPS$<sid>ADM".SAPUSER VALUES ('<sapowner>',
'<password>');
For more info go through the snote 400241
[https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=400241]
Thanks & Regards
Karan -
Resolving problem with ORA-01031: insufficient privileges
hello i just to write a few word about my installation of oracle database 9i
My installation is on a Red Hat AS3
I have a problem with the error :ORA-01031: insufficient privileges
The one who read this know what about i tell.
The authorization is only for the user which Group is DBA as you can read everywhere.
but me when i tried groupadd dba => it tells group already exist.
but i can't find the group dba in the file /etc/group.
So i tried to make my user 'oracle' works with the 'already group exist' dba .
useradd -g dba oracle
but when i tried to start the database i create i have the message. : ORA-01031: insufficient privileges
i tried to add manualy the group dba to /etc/group (as i can read in websites)
and add a user manualy (/etc/passwd).
But does works.
I try all i can during 1 days long.
I was really upset because nothing that i read work.
finaly I go to the RedHat Menu (things i don't really do normaly on LINUX) and go to 'SYSTEM SETTINGS' and choose 'User and Group'
Here i can see my user 'Oracle' I get the property of the user .
there is a tab group ( 'select the group that the user will be member of:')
None of them where name DBA so i decidied to select all of them and tried.
MAGIC!!! then it works!!!
ps: after when i see the list of the group I saw that one of them is named 'SYS' . I really think that it is the one group i had to select. but don't know.
Now It is working for me so... And good luck for you. bye.Errors
ORA-01031 "insufficient privileges"
Symptoms
During database upgrade phase using DBUA , it fails with error
ORA-1031 Insufficient privileges
Connection from sqlplus also fails with same error
$ sqlplus /nolog
SQLPLUS "conn / as sysdba"
ORA-1031 Insufficient privileges
Changing the REMOTE_LOGIN_PASSWORDFILE to SHARED / NONE does not make differen
Cause
ORACLE_HOME owner oramigts is part of OS group "dba" ,but config.s shows group "g680"
The 'OSDBA' and 'OSOPER' groups are chosen at installation time and usually both default to the group 'dba'.
These groups are compiled into the 'oracle' executable and so are the same for all databases running from a given ORACLE_HOME directory.
The actual groups being used for OSDBA and OSOPER can be checked thus:
cd $ORACLE_HOME/rdbms/lib
cat config.[cs]
Solution
To implement the solution, please execute the following steps:
1. Checked the ORACLE_HOME owner.
echo $ORACLE_HOME
/h02/app/oracle/product/9.2.0_64
cd / h02/app/oracle/product/
ls -l
drwxr-xr-x 58 oramigts dba 1024 Jan 2 2004 9.2.0_64
2.ORACLE_HOME software owner "oramigts" is part of group "dba"
3.Checked file $ORACLE_HOME/rdbms/lib/config.s
[If your platform has config.c:
Due to the way different compilers under different architectures generate
assembler code, it's not possible to give a universal rule.]
It shows dba group as "g680" where software owner is part of "dba" group
You can more find detail on config.s / config.c in the following doc.
Note 50507.1 SYSDBA and SYSOPER Privileges in Oracle
4. Modified the config.s for correct group.
.ascii "g680\0"
to
.ascii "dba\0"
7. mv config.o config.o.bak
8. make -f ins_rdbms.mk config.o ioracle
9. Checked the file config.o is created at $ORACLE_HOME/rdbms/lib
10. Connected / as sysdba thru Sqlplus from 9.2 Home, which connected sucessfully. -
Weird Error - sometime getting ORA-01031: insufficient privileges
Problem - Java process throwing java.sql.SQLException: ORA-01031: insufficient privileges for simple select statement select * from MYTABLE , table having only three rows
Observation - While investigating. I did same select from sql developer using same credential, I get same ORA-01031: insufficient privileges error in sql developer too BUT ONLY if I create new connection. (Disconnect and connect again), If I fire same query again in same connection it runs fine.
SELECT * FROM MYTABLE;
there is no problem if I run query in small case (notice only select and from in small case), even if it is fresh connection there is no error.
select * from MYTABLE;
I am out of any clue what is going on. Any help?
Java stack track -
Caused by: java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:676)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
at oracle.jdbc.driver.T2CPreparedStatement.executeForDescribe(T2CPreparedStatement.java:571)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
at org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
Oracle SQL Developerer Error
ORA-01031: insufficient privileges
01031. 00000 - "insufficient privileges"
*Cause: An attempt was made to change the current username or password
without the appropriate privilege. This error also occurs if
attempting to install a database without the necessary operating
system privileges.
When Trusted Oracle is configure in DBMS MAC, this error may occur
if the user was granted the necessary privilege at a higher label
than the current login.
*Action: 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.Guys...
I'm having the same problem.
The platform is a Windows 2003 R2 64bit (SP2) with Oracle 11g.
In the production server from the same client, the connection is usually ... however, to a server where I have the same instances retrieved from an RMAN backup, does not connect!
In the Productoion Server:
C:\>sqlplus sys@bmknfe as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 18 17:43:41 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>
In the Recovered Server:
C:\>sqlplus sys@bmknfe_rt as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 18 17:42:39 2010
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Enter password:
ERROR:
ORA-01031: insufficient privileges
I've tried recreating the password file, but is not resolving ...
Can someone give me a light? -
DB13 jobs errors (ORA-01031: insufficient privileges) after System Copy
Dear SAP gurus,
I performed an ECC60 System copy from Dev to a sandbox system (Linux-Oracle). When I try to access DB13 all jobs are cancelled:
Example of "check and update optimizer statistics" job log:
Job started
Step 001 started (program RSDBAJOB, variant &0000000000001, user ID TGEPOMA1)
Execute logical command BRCONNECT On host eccsbx01
Parameters: -u / -jid STATS20110720050000 -c -f stats -t ALL
BR0801I BRCONNECT 7.00 (46)
BR0805I Start of BRCONNECT processing: cegkmpzk.sta 2011-07-27 05.00.32
BR0484I BRCONNECT log file: /oracle/SBX/sapcheck/cegkmpzk.sta
BR0280I BRCONNECT time stamp: 2011-07-27 05.00.36
BR0301W SQL error -1031 at location brc_dblog_open-1, SQL statement:
'INSERT INTO SAP_SDBAH (BEG, FUNCT, SYSID, OBJ, RC, ENDE, ACTID, LINE) VALUES ('20110727050032', 'sta', 'SBX', 'ALL', '9999', '
ORA-01031: insufficient privileges
BR0324W Insertion of database log header failed
I read the SAP note 400241 (Problems with ops$ or sapr3 connect to Oracle) and performed the general checks such checking the SAPUSER owner,etc.
If I executed the sapdba_role.sql script I get the following log errors on sapdba_role.log:
old 1: grant ALL on &User..SDBAH to sapdba
new 1: grant ALL on SAPR3.SDBAH to sapdba
grant ALL on SAPR3.SDBAH to sapdba
ERROR at line 1:
ORA-00942: table or view does not exist
old 1: grant ALL on &User..SDBAD to sapdba
new 1: grant ALL on SAPR3.SDBAD to sapdba
grant ALL on SAPR3.SDBAD to sapdba
ERROR at line 1:
ORA-00942: table or view does not exist
old 1: grant ALL on &User..DBAML to sapdba
new 1: grant ALL on SAPR3.DBAML to sapdba
grant ALL on SAPR3.DBAML to sapdba
Should I create those tables in order to allow ops$ user to access Oracle DB in order to execute the DB job from DB13?
Please let me know if anybody can help me or has face a situation before?
Thanks in advance, MarcHi Markus,
I dont think that it is an authorization issue becasue it has the same authorizations than Development:
eccsbx01:/sapmnt/SBX/exe # ls -ltr br*
-rwsr-srw- 1 orasbx dba 4121272 Jul 19 11:55 brarchive
-rwsr-srw- 1 orasbx dba 4227280 Jul 19 11:55 brbackup
-rwsrwxr-x 1 orasbx sapsys 5489731 Jul 19 11:55 brconnect
-rwxr-xr-x 1 sbxadm sapsys 4537880 Jul 19 11:55 brrecover
-rwxr-xr-x 1 sbxadm sapsys 1554379 Jul 19 11:55 brrestore
-rwxr-xr-x 1 sbxadm sapsys 5617510 Jul 19 11:55 brspace
-rwsrwxr-x 1 orasbx sapsys 2289337 Jul 19 11:55 brtools
Regards, Marc -
Srvctl start service/stop throwing error ORA-01031: insufficient privileges
Hi Gurus,
When i try to start/stop the service getting below error.Please help me troubleshoot it.
AIX-6.1
11.2.0.1
Plato1:/u01/app/11.2.0/grid/network/admin>srvctl start service -d maxcv
PRCR-1079 : Failed to start resource ora.maxcv.maxcv.svc
CRS-2680: Clean of 'ora.maxcvuat.svc' on 'Plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcvuat.svc' on 'Plato1' failed
ThanksSQL> execute dbms_service.start_service('maxcvuat');PL/SQL procedure successfully completed.
Output from alert.log
EMNC started with pid=32, OS id=1384660
2011-09-09 09:32:09.820000 -04:00
Starting background process CJQ0
CJQ0 started with pid=53, OS id=1429756
2011-09-09 09:37:00.698000 -04:00
Starting background process SMCO
SMCO started with pid=33, OS id=1687726
2011-09-09 09:52:59.212000 -04:00
ALTER SYSTEM SET service_names='maxcvuat' SCOPE=MEMORY SID='maxcv2';
~crsctl stat output:
plato2:/home/grid>crsctl stat res -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.CRS.dg
OFFLINE OFFLINE plato1
OFFLINE OFFLINE plato2
ora.CRS_DATA.dg
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.CRS_DATA1.dg
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.CRS_VDISK.dg
OFFLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.LISTENER.lsnr
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.maxcv_DATA.dg
ONLINE INTERMEDIATE plato1
ONLINE ONLINE plato2
ora.maxcv_REC.dg
ONLINE INTERMEDIATE plato1
ONLINE ONLINE plato2
ora.asm
ONLINE OFFLINE plato1
ONLINE ONLINE plato2
ora.eons
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.gsd
OFFLINE OFFLINE plato1
OFFLINE OFFLINE plato2
ora.net1.network
ONLINE ONLINE plato1
ONLINE ONLINE plato2
ora.ons
ONLINE ONLINE plato1
ONLINE ONLINE plato2
Cluster Resources
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE plato2
ora.LISTENER_SCAN2.lsnr
1 ONLINE ONLINE plato1
ora.LISTENER_SCAN3.lsnr
1 ONLINE ONLINE plato1
ora.plato1.vip
1 ONLINE ONLINE plato1
ora.plato2.vip
1 ONLINE ONLINE plato2
ora.maxcv.db
1 ONLINE ONLINE plato2 Open
2 ONLINE ONLINE plato1 Open
ora.maxcv.maxcvuat.svc
1 OFFLINE UNKNOWN plato1
2 OFFLINE UNKNOWN plato1
ora.coscv.db
1 ONLINE ONLINE plato1 Open
2 ONLINE ONLINE plato2 Open
ora.coscv.coscvuat.svc
1 ONLINE UNKNOWN plato1
2 ONLINE UNKNOWN plato1
ora.oc4j
1 OFFLINE OFFLINE
ora.scan1.vip
1 ONLINE ONLINE plato2
ora.scan2.vip
1 ONLINE ONLINE plato1
ora.scan3.vip
1 ONLINE ONLINE plato1
plato2:/home/grid>Stopping of database:
plato2:/home/oracle>srvctl stop database -d maxcv
PRCD-1124 : Failed to stop database maxcv and its services
PRCR-1065 : Failed to stop resource (((((NAME STARTS_WITH ora.maxcv.) && (NAME ENDS_WITH .svc)) && (TYPE == ora.service.type)) && ((STATE != OFFLINE) || (TARGET != OFFLINE))) || (((NAME == ora.maxcv.db) && (TYPE == ora.database.type)) && (STATE != OFFLINE)))
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2675: Stop of 'ora.maxcv.db' on 'plato1' failed
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
CRS-5807: Agent failed to process the message
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2680: Clean of 'ora.maxcv.maxcvuat.svc' on 'plato1' failed
ORA-01031: insufficient privileges
ORA-01031: insufficient privileges
CRS-2675: Stop of 'ora.maxcv.db' on 'plato1' failed
plato2:/home/oracle>ps -ef |grep pmon
oracle 892946 1818664 0 09:30:35 pts/0 0:00 grep pmon
grid 1360080 1 0 Sep 06 - 1:23 asm_pmon_+ASM2
oracle 1376428 1 0 Sep 06 - 1:42 ora_pmon_coscv2
plato2:/home/oracle>Thanks -
Brbackup error ; ORA-01031: insufficient privileges
Hi Experts,
We are getting following error when to try to backup our database ;
BR0301E SQL error -1031 at location BrSapTspList-8, SQL statement:
'PREPARE stmt_1 STATEMENT FROM'
'SELECT TABSPACE FROM "SAPSR3".TSORA UNION SELECT INDSPACE FROM "SAPSR3".TSORA ORDER BY 1'
ORA-01031: insufficient privileges
BR0056I End of database backup: bebakpth.ant 2009-07-16 10.54.47
BR0280I BRBACKUP time stamp: 2009-07-16 10.54.47
BR0054I BRBACKUP terminated with errors
How can we fix it,
RegardsDear atakan yavuz
i have faced this issue and fix the issue.
After executing Oracle sapdba_role.sql which is provided in sapdba_role_ora10.SAR from SAP Note: Note 134592 - Importing the SAPDBA role (sapdba_role.sql)
Please execute manaully from sql prompt below statemets to assign the privileges to the owner SAPSR3 for the following tables which will fix the issue.
grant ALL on SAPSR3.SDBAH to sapdba;
grant ALL on SAPSR3.SDBAD to sapdba;
grant ALL on SAPSR3.DBAML to sapdba;
grant ALL on SAPSR3.DBARCL to sapdba;
grant ALL on SAPSR3.DBAFID to sapdba;
grant ALL on SAPSR3.DBAEXTL to sapdba;
grant ALL on SAPSR3.DBAREOL to sapdba;
grant ALL on SAPSR3.DBABARL to sapdba;
grant ALL on SAPSR3.DBADFL to sapdba;
grant ALL on SAPSR3.DBAOPTL to sapdba;
grant ALL on SAPSR3.DBASPAL to sapdba;
grant ALL on SAPSR3.DBABD to sapdba;
grant ALL on SAPSR3.DBABL to sapdba;
grant ALL on SAPSR3.DBATL to sapdba;
grant ALL on SAPSR3.DBAOBJL to sapdba;
grant ALL on SAPSR3.DBAPHAL to sapdba;
grant ALL on SAPSR3.DBAGRP to sapdba;
grant ALL on SAPSR3.DBAERR to sapdba;
grant ALL on SAPSR3.DBATRIAL to sapdba;
grant ALL on SAPSR3.DBSTATC to sapdba;
grant ALL on SAPSR3.DBSTATTORA to sapdba;
grant ALL on SAPSR3.DBSTATIORA to sapdba;
grant ALL on SAPSR3.DBSTATHORA to sapdba;
grant ALL on SAPSR3.DBSTAIHORA to sapdba;
grant ALL on SAPSR3.DBMSGORA to sapdba;
grant ALL on SAPSR3.DBCHECKORA to sapdba;
grant ALL on SAPSR3.MLICHECK to sapdba;
grant SELECT on SAPSR3.TGORA to sapdba;
grant SELECT on SAPSR3.IGORA to sapdba;
grant SELECT on SAPSR3.TSORA to sapdba;
grant SELECT on SAPSR3.TAORA to sapdba;
grant SELECT on SAPSR3.IAORA to sapdba;
grant SELECT on SAPSR3.SVERS to sapdba;
grant SELECT on SAPSR3.CVERS to sapdba;
grant SELECT on SAPSR3.DD02L to sapdba;
grant SELECT on SAPSR3.DD09L to sapdba;
grant SELECT on SAPSR3.DDNTT to sapdba;
grant SELECT on SAPSR3.DDART to sapdba;
grant SELECT on SAPSR3.DARTT to sapdba;
grant SELECT on SAPSR3.DBCHK to sapdba;
grant SELECT on SAPSR3.DBDIFF to sapdba;
grant ALL on SAPSR3.SAPLIKEY to sapdba;
grant SELECT on SAPSR3.RSNSPACE to sapdba;
grant SELECT on SAPSR3.RSPSPACE to sapdba;
The cause is sapdba role script existing owner is SAPR3 but from SR3 release default owner is SAPSR3 so which is causing this issue so when grant the above tables to the SAP DB owner SAPSR3 where they can access the tables.The similar issue you will when you try to execute DBCheck also and even saplicense shows no valid license found.
Me too searching for Oracle 10.2.0.4 SAP SR3 release sapdba role in service market place which i am unable to find waiting for update from sap suppport.
Update in this thread after this action whether your issue has been solved.I
Best Regards,
Venkata.
Edited by: babjipvr on Jul 22, 2009 6:25 PM
Edited by: babjipvr on Jul 22, 2009 6:31 PM -
Error while Creating Master Repository: ORA-01031: insufficient Privileges
Hi,
I'm trying to install ODI into my VM.
I have done the installation and while creating Master Repository, I'm getting following error:
ORA-01031: insufficient Privileges
I'm using Oracle & have created user as ODI_MASTER with Admin Privileges.
I'll be using it to load metadata onto planning (Version 11.1.2)
Is there anything that I'm missing out on.
Jitendra.Seems missing grants on the user you are using to create Master Repository.
you are using Oracle .. grant connect, resource to <your_user>. These two rolesa have sufficient access to db to create the master repository.
execuute the sql from sys user
Regards,
Amit
Edited by: amitgupta1202 on 20 Aug, 2009 10:42 PM -
Ora-01031: Insufficient Privileges error during 10g install on Suse 9.1
I have tried installing Oracle 10g on Suse 9.1 Professional several times. Although I have tried to carefully follow the instructions in the installation guide, I get the following error.
When the Database Configuration Assistant start during the initial installation, I receive the error -> Ora-01031: Insufficient Privileges.
I created the oinstall and dba group according to the installation guide and made oracle a member with oinstall being the primary group. I also ran -> chown -R oracle:oinstall -> on the Oracle_Base folder to which I want to install the software and oradata files. Similarly, I ran -> chmod -R 775 -> on that folder. During the install I ran the script -> oracle_base/oraInventory/orainstRoot.sh -> during the installation when prompted.
I would really appreciate any help that any of you could provide. Thank you so much in advance.
-DanielI'm logged in as oracle when I perform the installation but as soon as the database configuration assistant tries to create the database I get this error. I had made oracle a member of oinstall and dba just as it was desribed in the instructions. (At one point I even tried giving oracle root, which didn't seem to work either. I have since reinstalled the OS.)
Thank you for helping me with this! -
ORA-01031:Insufficient Privileges error when I am trying to use ALERT_QUE
Hi,
I am working on SYS.ALERT.QUE for getting system alerts. I am using ODP in C# for connecting to Oracle database with username = SYSTEM, but when I am trying to enque or deque any message from SYS.ALERT.QUE, its gives an error ORA-01031:Insufficient Privileges. I am not able to understand how to assign SYSDBA privileges to SYSTEM and access ALERT_QUE for getting system alerts. I am posting my code below, plz have a look and let me know whats wrong with the code. I am able to connect to databse using SYSTEM, do I need to use username = SYS for accesing ALERT_QUE of database? Plz let me know whats the solution.
OracleConnection con = new OracleConnection(constr);
// Create queue
OracleAQQueue queue = new OracleAQQueue("sys.alert_que", con);
// Open connection
con.Open();
// Begin txn for enqueue
OracleTransaction txn = con.BeginTransaction();
// Set message type for the queue
queue.MessageType = OracleAQMessageType.Raw;
// Prepare message and RAW payload
OracleAQMessage enqMsg = new OracleAQMessage();
byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
enqMsg.Payload = bytePayload;
OracleAQAgent[] agent = new OracleAQAgent[1];
agent[0] = new OracleAQAgent("SUBSCRIBER1");
enqMsg.Recipients = agent;
enqMsg.SenderId = new OracleAQAgent("SENDER1");
// Prepare to Enqueue
queue.EnqueueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
// Enqueue message
queue.Enqueue(enqMsg);
The code throws exception at line "queue.Enqueue(enqMsg);" saying ORA-01031:Insufficient Privileges
Edited by: 916462 on Feb 27, 2012 3:31 AMHi Sudheendra,
Thanks a lot, that worked. Now I am facing one more new issue, when I am trying to deque message from ALERT_QUE which is oracle maintained queue for alerts, I am getting an error "ORA-25215:User data type and queue type do not match". Is there something wrong with my code like Message type, payload and all. I am very new to Oracle database so I don't have idea about this details. Can u plz help me in solving this.
OracleTransaction txn = con.BeginTransaction();
// Set message type for the queue
queue.MessageType = OracleAQMessageType.Raw;
// Prepare message and RAW payload
OracleAQMessage enqMsg = new OracleAQMessage();
byte[] bytePayload = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
enqMsg.Payload = bytePayload;
OracleAQAgent[] agent = new OracleAQAgent[1];
agent[0] = new OracleAQAgent("SUBSCRIBER1");
enqMsg.Recipients = agent;
enqMsg.SenderId = new OracleAQAgent("SENDER1");
// Begin txn for Dequeue
txn = con.BeginTransaction();
// Prepare to Dequeue
queue.DequeueOptions.Visibility = OracleAQVisibilityMode.OnCommit;
queue.DequeueOptions.Wait = 10;
queue.DequeueOptions.ConsumerName = "SUBSCRIBER1";
// Dequeue message
OracleAQMessage deqMsg = queue.Dequeue();
txn.Commit();
Edited by: 916462 on Feb 28, 2012 9:55 PM
Maybe you are looking for
-
Is it itunes or my computer thats messed up? ITUNES WONT OPEN!
my itunes used to work perfectly. then it stopped working so i reinstalled only to find that after using itunes the first time i opened it, it wouldn't open anymore. so i tried removing the program and installing it again. now it won't even open once
-
WRT54GL losing connection!
Hi. Im having problem with my wireless router WRT54gl. Its keep losing its connection every 10-20 min. I have the latest firmware. I dont know so much about computers so please keep it simple. Thanks.
-
How to set and search contact favorites
As title. I know somewhere it showed that we can mark someone as "favorite" in Contact so that their call will not be blocked by "Do Not Disturb" But I do not know how to set the "favotite" and how to search who has beeen set as the "favorite" Please
-
Why won't my computer recognize my usb keyboard when I turn it on? It keeps trying to find a wireless keyboard.
-
Call transaction logfile.
how to create a log file in call transaction method. how to use seesion method logfile in call transaction method?