Oracle local database login to connect to pdb database

1 Log in to the local Oracle database

sqlplus login local database

sys as sysadb   

password

plsql login local oracle database ---------------------------------------------

1. The user created by himself, the instance name defaults to orac, and the state selects normal

 

 

ora-01017: invalid username/password;

Reason: Instance name problem, because the tablespace of the created key is pdb50 and the following data is based on it, so the instance name is also this.

This is how I create a key tablespace in pdb,

CREATE PLUGGABLE DATABASE pdb50 ADMIN USER c##test1 IDENTIFIED BY testdb 

STORAGE (MAXSIZE 2G MAX_SHARED_TEMP_SIZE 100M) DEFAULT TABLESPACE 

testdbdb DATAFILE 'D:\oracle\basiccatalog\oradata\orcl\testdbdb_001.dbf' SIZE 25M AUTOEXTEND ON;

2. How does the sys user log in to plsql?

 

To connect, you must modify the D:\oracle\soft\network\admin\tnsnames.ora file

Add the following paragraph below the file

#pdb This is mainly to add pdb records pdb50 is actually the name of pdb created by myself
pdb50 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
(CONNECT_DATA =
# (SERVER = DEDICATED) #Adding this line in my file will report an error
(SERVICE_NAME = pdb50) #Corresponding to the pdb of the query
)
)

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Guess you like

Origin blog.csdn.net/qq_43289307/article/details/113653185