ORA-65096: invalid common user or role name - create role [duplicate] - oracle

This question already has answers here:
error: ORA-65096: invalid common user or role name in Oracle database
(12 answers)
Closed last year.
I am trying to run the query - 'create role warehouse_user identified globally'
by JDBC (Dbeaver)
get error:
ORA-65096: invalid common user or role name
I am running this by remote connection (automation).
some ideas why this is not working?

You might be trying to run this under CDB.
You can go for connecting targeted PDB and then try it should work.
If you want to create a role under CBD please try with c## in the name prefix.
and another way is not recommended but you can go for alter session set "_oracle_script"=true; to take username/role name without prefix.

Related

Unable to bind Application item - Oracle Apex

I have created 2 application items in shared component option.
Protection level: Restricted
Scope: Application
Then I have created a process in the login page where sql query is
select user_id, name into :G_USER_ID , :G_USER_NAME
from t_users
where upper(email) = upper(:P9999_USERNAME);
When I try to login it gives me error. Debugging says that there is an error in the above statement. I am not able to bind these items.
I'm using apex 19.1
It would help if you said which error you got.
However, if this piece of code runs before you managed to log in, you didn't establish connection to the database (yet) and can't select from any table, including t_users.

Access Right for users

In my odoo 10 after several month I am encountering the problem of Access Right for my users. When they want to group the tasks based on project, etc they face the following message:
Odoo Warning - Access Error
The requested operation cannot be completed due to security restrictions. Please contact your system administrator.
(Document type: project.project, Operation: read)
Any Idea?
Seeing your error its seems you have to give access rights for project.project model for read. If its given then might be there some record rule for project.project model in your database you have to check it.

Trying to install MediaWiki, getting error: "Tables creation failed. Make sure user can write to schema."

I'm getting the following error when attempting to run the MediaWiki installation, hosted on Heroku, and configured to connect to a Heroku Postgres database:
Tables creation failed. Make sure that the user "xyz" can write to the schema ""
How can I fix this?
Found the solution - just needed to put a value into the Schema field on the 'Database Connection' wizard page. Any short string value should do; I used: mediawiki.

Magento: Warning in PHP in default Adminhtml controller

When debugging Magento, I found this strange warning.
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'apache'#'localhost' (using password: NO) in /mnt/www/t2/app/code/core/Mage/Adminhtml/Controller/Action.php on line 508
In the function checkforSqlInjectionInAction()
From my understanding this warning comes when you cannot open a connection to the database. However in my configuration, I am not using local server, hence this is natural that we cannot connect to the local server.
This warning is in the checkforSqlInjectionInAction().
Welcome to the wonderful world of debugging someone else's Magento code. The core Magento code doesn't contain a method named checkforSqlInjectionInAction, so you're already dealing with a core hack created by someone else's code.
As for your specific error, mysql_real_escape_string will ask the MySQL database what the correct escape character sequence is. However, this function was designed to work with PHP's original MySQL module
The MySQL connection. If the link identifier is not specified, the last link opened by mysql_connect() is assumed. If no such link is found, it will try to create one as if mysql_connect() was called with no arguments. If no connection is found or established, an E_WARNING level error is generated.
Since Magento doesn't use mysql_connect, PHP attempts to creation a connection using the default 'apache'#'localhost' username, with no password.
You should be making your SQL statements using either raw PDO, or the read/write Magento connection resources. These objects allow you to create queries with bound paramaters, where there's no need to manually escape a database string.

InstallAllOracleASPNETProviders doesn't work correctly

I am using asp.net mvc 3 and oracle database with ODAC1120240Beta_EntityFramework.
I want to do authorization in my site. Database works correctly, I can do everything with Database data, but if I go to ASP.NET Configuration -> Provider I see only AspNetSqlMembershipProvider.
InstallAllOracleASPNETProviders doesn't work correctly.
All functions, views and packages were created succesully. I do all using this Oracle Guide
Here is part of Oracle Database Output after executing this script from Visual Studio Tools.
GRANT SELECT ON ora_vw_aspnet_Applications TO ora_aspnet_Mem_ReportAccess
*
error in string 1:
ORA-01917: user or role 'ORA_ASPNET_MEM_REPORTACCESS' does not exist
GRANT SELECT ON ora_vw_aspnet_Users TO ora_aspnet_Mem_ReportAccess
*
error in string 1:
ORA-01917: user or role 'ORA_ASPNET_MEM_REPORTACCESS' does not exist
GRANT SELECT ON ora_vw_aspnet_MemUsers TO ora_aspnet_Mem_ReportAccess
*
error in string 1:
ORA-00942: table or view does not exist
You can implement using flow link.

Resources