I have newly installed oracle 19C for the first time and wanted to try it out. We have a java project where we have inside some scripts which are used to create users, upgrade users.. etc. When I run this script I get The error ORA-01031: insufficient privileges:
25.01.2021 10:13:00,689| INFO main [SYSTEM] creating user c##vdal ... |com.company.mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,737| ERROR main Critical error occurred in [SYSTEM: grant select on all_sequences to c##vdal]:ORA-01031: Nicht ausreichende Berechtigungen
|com.company.mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,737| ERROR main Script stopped with errors. |com..mpe.engine.SimpleScriptExecuter
25.01.2021 10:13:00,745| ERROR main Error while executing buildDB, aborting the build |com.company.database.builddb.Build
com.company.mpe.engine.TaskExecutionException: Error occurred for task of type Case (at engine/params/mpe/mpeBuildDB.xml:360):Error in case-when construct: Error occurred for task of type Case (at engine/params/mpe/mpeBuildDB.xml:365):Error in case-when construct: Error occurred for task of type If (at engine/params/mpe/mpeBuildDB.xml:232):Error in if construction: java.sql.SQLSyntaxErrorException: ORA-01031: Nicht ausreichende Berechtigungen
How can I configure the database so that I can successfully run all operations from outside like from my eclipse?
You need to provide the DBA rights to create or modify any user/schema in oracle.
You must be connecting with the database using some user. Let's say userX.
You can give the DBA privilege to useX from some DBA privileged user as follows:
grant dba to userx;
Beware that this will give all the system rights to userX and which is not recommended. This type of task should not be done from application.
Related
I have XE on my computer, using Oracle Database 18c. Earlier, I was able to execute function dbms_output.put_line(); even I logged in as sysadmin or with default role. Now, I only can run dbms_output.put_line() when I am logged in as sysadmin/sysdba. As a default user, I get the following message:
PLS-00201: identifier ‘DBMS_OUPUT.PUT_LINE’ must be declared
I tried to add privilege to execute dbms_output with command
grant execute on DBMS_OUTPUT to username;, however, I got this message when I execute a command including dbms_output.put_line():
ORA-04067: not executed, package body "PERFSTAT.DBMS_OUTPUT" does not exist
ORA-06508: PL/SQL: could not find program unit being called: "PERFSTAT.DBMS_OUTPUT"
Using sqlplus, I get the following error as default user:
PLS-00201: identifier 'DBMS_OUTPUT.ENABLE' must be declared
How can I solve this problem?
That's probably because you misnamed it:
No : DBMS_OUPUT.PUT_LINE (not "ouput" but "output")
Yes: DBMS_OUTPUT.PUT_LINE
As of the 2nd message; well, this: PERFSTAT.DBMS_OUTPUT doesn't make sense, PERFSTAT doesn't own that package. It is called just as
begin
dbms_output.put_line('Hello');
end;
/
and works for any user, no special grants required.
Below is the update statement that i am trying to run
update
IFTEST_DBF
set
M_TEST_SIG=lower(sys.dbms_crypto.hash(utl_raw.cast_to_raw(replace(M_A||M_B||M_C||M_D||M_E||M_F,' ','')),3))
where
M_TYPE='PRIMARY'
and M_NEW='Y'
Below is the error while i am updating a table in oracle12c , The same statement used to run very fine in oracle 11g but after migrating it to 12C , i am facing this issue. Am i missing something .
Error at Command Line : 6 Column : 22
Error report -
SQL Error: ORA-00904: "SYS"."DBMS_CRYPTO"."HASH": invalid identifier 00904. 00000 - "%s: invalid identifier"
*Cause:
The DBMS_CRYPTO is a package, which by default, is owned by SYS schema. So, before to use it, you have to grant the execute privilege to the user/schema you are going to use it, e.g.:
GRANT EXECUTE ON dbms_crypto TO "my_schema";
I am trying to import an oracle 11g dump file using impdp utility but while doing so, inter alia, I am facing two major errors:
First, It is showing the following error:
Processing object type DATABASE_EXPORT/TABLESPACE
ORA-39083: Object type TABLESPACE:"HIS_USER" failed to create with error:
ORA-01119: error in creating database file '/oracle/app/oracle/oradata/dwhrajdr1/his_user13.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 3) The system cannot find the path specified.
so to solve this, I have created the tablesapce with same name but now it is showing that 'HIS_USER' tablespace already exists.
Second, I am getting thousands of errors, where it is showing user or role does not exist:
Failing sql is:
GRANT EXECUTE ANY ASSEMBLY TO "DSS"
ORA-39083: Object type SYSTEM_GRANT failed to create with error:
ORA-01917: user or role 'DSS' does not exist
Please suggest how to solve these errors!
How can I import the dumpfile without making hundreds of users/roles or tablespaces?
you can generate sql statement using impdp the following way.
http://www.dba-oracle.com/t_convert_expdp_dmp_file_sql.htm
then adjust parameter accordingly.
scott
I am trying to import multiple dmp files using impdp command i got this error DataPump import (impdp) reports the errors:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
ORA-39006: internal error
ORA-39213: Metadata processing is not available
Attempting to correct the error ORA-39213 via
dbms_metadata_util.load_stylesheets also reports errors similar to:
SQL> exec dbms_metadata_util.load_stylesheets;
BEGIN dbms_metadata_util.load_stylesheets; END;
* ERROR at line 1: ORA-22288: file or LOB operation FILEEXISTs failed
Permission denied
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 1807
ORA-06512: at line 1
login from sys and run below query worked for me oracle 11.2
exec dbms_metadata_util.load_stylesheets;
I need to import an Oracle9i Release 9.2.0.6.0 dump in an Oracle 11g.
Using the import command I have a ton of erros like this:
IMP-00017: following statement failed with ORACLE error 6550:
"BEGIN SYS.DBMS_EXPORT_EXTENSION.SET_IMP_SKIP_INDEXES_OFF; END;"
IMP-00003: ORACLE error 6550 encountered
Th command I use is:
imp system/<passwor>#<SID> file=export_20160209.dmp fromuser=USER1 touser=USER1 log=file_log_10022016.log
How else can I make the import I need?
You need to grant permission to user as:
GRANT EXECUTE ON SYS.DBMS_DEFER_IMPORT_INTERNAL TO <user>;
GRANT EXECUTE ON SYS.DBMS_EXPORT_EXTENSION TO <user>;
Nothing worked, so I asked for a new dump without the table where the import stopped.