For details about how to create Oracle database users in LINUX, linuxoracle

Source: Internet
Author: User

For details about how to create Oracle database users in LINUX, linuxoracle

This article analyzes how to create an Oracle database user in LINUX. We will share this with you for your reference. The details are as follows:

1) log on to linux and Log On As an oracle user (if logged on as a root user, use the su-oracle command to switch to an oracle user)

2) First, open the listener command: lsnrctl start, sqlplus/nolog, conn/as sysdba, and then startup (this part of the command is used to open the oracle database)

3) Check the location where the user tablespace is normally placed: execute the following SQL:

SQL> select name from v$datafile;NAME--------------------------------------------------------------------------------E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBFE:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBFE:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBFE:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBFE:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF5 rows selected

Or the following SQL statement:

SQL> select status,fuzzy,tablespace_name,name from v$datafile_header;STATUS FUZZY TABLESPACE_NAME        NAME------- ----- ------------------------------ --------------------------------------------------------------------------------ONLINE YES  SYSTEM             E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSTEM01.DBFONLINE YES  SYSAUX             E:\APP\ADMINISTRATOR\ORADATA\ORCL\SYSAUX01.DBFONLINE YES  UNDOTBS1            E:\APP\ADMINISTRATOR\ORADATA\ORCL\UNDOTBS01.DBFONLINE YES  USERS             E:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBFONLINE YES  EXAMPLE            E:\APP\ADMINISTRATOR\ORADATA\ORCL\EXAMPLE01.DBF5 rows selected

Generally, the preceding SQL statement finds the location of your tablespace file, which is 'e: \ APP \ ADMINISTRATOR \ ORADATA \ ORCL \'.

4) create a user tablespace:

CREATE TABLESPACE test datafile 'E:\APP\ADMINISTRATOR\ORADATA\ORCL\testNS.dbf'size 600M autoextend on next 50m maxsize unlimited;

5) create a user and specify the password and the user tablespace created above.
Copy codeThe Code is as follows: create user testUser identified by abc default tablespace test;
6) grant permissions
Copy codeThe Code is as follows: grant connect, resource, dba to testUser;
After the above operations, we can use testUser/abc to log on to the specified instance and create our own table.

I hope this article will help you with Oracle database programming.

Articles you may be interested in:
  • How to create databases and users in oracle
  • How to modify the username and password of an oracle Database
  • The Oracle Method for deleting all tables under the current user applies to having or having no Delete permission
  • Example of oracle user creation/deletion (oracle user deletion commands and authorization)
  • Use shell scripts to delete tablespaces, create tablespaces, and delete users in oracle.
  • How Does oracle delete users and provide solutions?
  • How to add and authorize users, change passwords, unlock, and delete users in Oracle
  • Oracle command line deletes and creates user code
  • How to delete users and tablespaces in Oracle in Linux

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.