Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
333 views
in Technique[技术] by (71.8m points)

oracle19c - ORA-01031: insufficient privileges when I run my script (oracle 19c)

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?

question from:https://stackoverflow.com/questions/65882120/ora-01031-insufficient-privileges-when-i-run-my-script-oracle-19c

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.9k users

...