In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
The problem that local users cannot use local connections under Oracle PDB
Simulation:
1. Local user local connection:
SQL > show con_name
CON_NAME
CDB$ROOT
SQL > alter session set container=pdb1
Session altered.
SQL > create user test identified by test
User created.
SQL > grant connect,resource to test
Grant succeeded.
Use the test user connection:
SQL > conn test/test
ERROR:
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
Solution:
Configure the PDB with tnsname:
Find out the service_name of the PDB
Select name,network_name,pdb from v$services where pdb='PDB1'
NAME NETWORK_NAME PDB
Pdb1 pdb1 PDB1
Tnsname.ora:
Pdb1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.238.14) (PORT = 1529))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
Try to connect:
SQL > alter session set container=pdb1
SQL > conn test/test @ pdb1
Connected.
Problem solved.
two。 Local connection for public users:
SQL > show con_name
CON_NAME
CDB$ROOT
SQL > create user c##abc identified by c##abc
SQL > grant connect,resource to c##abc
Go to PDB to view the public user:
SQL > show pdbs
CON_ID CON_NAME OPEN MODE RESTRICTED
2 PDB$SEED READ ONLY NO
3 ABC READ WRITE NO
5 SALESPDB MOUNTED
SQL > alter session set container=abc
Session altered.
SQL > select username from dba_users where username='C##ABC'
USERNAME
C##ABC
SQL > conn c##abc/c##abc
Connected.
Can connect ~
Conclusion:
A local user created in PDB cannot use a local connection the user conn name/password needs to use a network connection to connect the public user created in CDB by the user conn name/password@tnsname will be automatically created under PDB, and the public user can be connected locally in PDB.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.