The structure of an Oracle database is that there are many users under a database instance, and each user has its own table space, that is, each user is equivalent to a database in MySQL.
Not long ago The Oracle 12c database, installed after the user to know that oracle12c a big change is the introduction of the PDB can be inserted into the database, and in the CDB can only create C # #或者C # #开头的用户, Only in the PDB database to create our habitual named users, Oracle called the local user, the former called Common user, and then query the relevant information, the following solutions:
1: Enter the PDB database
In the 12C installation, you will be prompted to install a pluggable database, I installed the set to PDBORCL; If you do not have the installation, you can create a pluggable database with the following statement
[SQL] View plaincopy
Create pluggable Database PDBORCL Admin user pdbadmin identified by Learnin
G roles= (Connect)
file_name_convert=
(' E:\Databases\oracle\oradata\oraclekd\pdbseed ',
' E:\DATABASES\ORACLE\ORADATA\ORACLEKD\PDBORCL ');
Where PDBORCL is the pluggable database I created, Pdbadmin is the user created, learning is the password.
File_name_convert change to the appropriate directory is OK
After the creation is complete
[SQL] View plaincopy
Alter session set CONTAINER=PDBORCL;
Alter pluggable database PDBORCL open;
Grant DBA to Pdbadmin;
Next comes the key, find Tnsnames.ora in the Oracle_home\product\12.1.0\dbhome_1\network\admin directory, open it with Notepad,
ORACLEKD =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = ORACLEKD)
)
)
Under Add
PDBORCL =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521))
(Connect_data =
(SERVER = dedicated)
(service_name = PDBORCL)
)
)
PDBORCL is the pluggable database you created, save it and restart the Oracle service (it seems like just restarting the listener is OK), open sql*plus
User name is [email protected] password is learning
OK, you have now created a PDB user. Now you can log in to this user.
Next is the time to create the connection with SQL developer, obviously there is SQL developer such a powerful tool, how can not do it
Create connection when the connection name is arbitrary, the user name is Pdbadmin, password is learning, select the service name, fill in PDBORCL
You can now manipulate the PDB database with SQL developer
How to connect to Oracle to build a PDB