Oracle 12c creates a new DB instance, user

Source: Internet
Author: User
Tags sqlplus

Prerequisite: The Oracle 12c database is installed, there is already a DB instance XE, login user/password: system/oralce

I'm using a Docker-installed instance of Oracle 12c:

8080:80801521:1521 -v/home/<user>/docker/data/oracle_1521:/u01/app/ Oracle SATH89/ORACLE-12C

Specific reference https://hub.docker.com/r/sath89/oracle-12c/

Note: with "-e vnc_password=<password>" does not seem to work, the connection will require the default password Oracle to connect.

1. Log in to Oracle 12c machine with Oracle user

2. Change the value of Oracle_sid, if you want to create a DB instance MyDB

oracle_sid=mydbexport Oracle_sid

If necessary, modify the login initial file of the Oracle user so that ORACLE_SID is mydb every time you log in

3. Create a DB instance with DBCA MyDB

 -emconfiguration LOCAL

Enter Oracle when prompted for password

4. When the creation is complete, connect Oracle with Sqlplus

" /as sysdba "

5. Close the DB instance first (I don't know if I need it or not, I don't understand Oracle, it's not an existing xe, I try)

SHUTDOWN immediate;

6. Start a newly created DB instance

Startup force

"Startup Force" before I also run a "startup Nomount", do not know this step need not, finally is the new mydb SID up after the startup force

7. Connect MyDB SID with system/oracle

Sql> Conn system/oracleconnected.sqlSelect  name from V$datafile;name----------------- ---------------------------------------------------------------/u01/app/oracle/oradata/mydb/system01.dbf /u01/app/oracle/oradata/mydb/sysaux01.dbf/u01/app/oracle/oradata/mydb/undotbs01.dbf/u01 /app/oracle/oradata/mydb/users01.dbf

See the tablespace files in the MyDB directory

8. Create a new tablespace DEV1

' /u01/app/oracle/oradata/neuron/dev1.dbf ' size 3000m;

9. Create a new user Dev1

Sql> create user Dev1 identified by password default tablespace DEV1;

10. Assigning Permissions

Sql> Grant Dba,connect to Dev1;

11. Submit Changes

Sql> commit;

12. Exit Sqlplus with new user/password: Dev1/password will be able to log in.

[Email protected]$ sqlplussql*plus:release12.1.0.2.0Production on Wed Oct - xx: +: -  .Copyright (c)1982, the, Oracle. All rights reserved. Enter User-Name:dev1enter password:last SuccessfulLogin  Time: Tue Oct -  .  ,: -: -+xx:xxConnected to:oracle Database 12c standard Edition Release12.1.0.2.0-64bit Productionsql>

Oracle 12c creates a new DB instance, user

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.