oracle 12c create an account that can log in remotely with navicat

The current mode is in cdb mode, and the navicat tool can connect. sqlplus can also connect with the following account.

Check the current mode, if it's not cdb, switch. (In the previous article) create
tablespace
create tablespace my_space
datafile '/usr/local/yrm/oracle_data/my_space.dbf'
size 50M
autoextend on next 50m maxsize 2048m
extent management local;
create
temporary tablespace my_space_temp
tempfile ' /usr/local/yrm/oracle_data/my_space_temp.dbf'
size 32m
autoextend on next 32m maxsize 1024m
extent management local;
create user
create user c##my_user_1 identified by 123456 default tablespace my_space
temporary tablespace my_space_temp;

create role
create role c##myroles container = all;
grant dba to c##myroles container = all;
grant
grant c##myroles to C##MY_USER_1 container = all;
#grant connect,resource to c##myroles;
grant restricted session to c##myroles;
alter user c##MY_USER_1 account unlock identified by 123456;

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324975823&siteId=291194637