Oracle uses the command line to create a new account

Source: Internet
Author: User

Go to cmd:

-- Enter with sys account

Sqlplus sys/admin as sysdba;

-- Create a tablespace
Create temporary tablespace sms_temp
Tempfile 'e: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ sms_temp.dbf' size 20 m
Autoextend on;

Create tablespace sms_data
Datafile 'e: \ oracle \ product \ 10.2.0 \ oradata \ orcl \ sms_data.dbf' size 20 m
Autoextend on;


--- Create a user
Create user SMS identified by admin
Default tablespace sms_data
Temporary tablespace sms_temp;

-- Roles
Grant "resource" to SMS;
Grant "Connect" to SMS;
Grant "dba" to SMS;

-- SYSTEM privileges

-- Quotas
Alter user SMS quota unlimited on sms_data;

-- User SQL
Alter user SMS
Default tablespace sms_data
Temporary tablespace sms_temp
Account unlock;

-- Roles
Alter user SMS default role "resource", "Connect", "dba ";

-- SYSTEM privileges
Revoke unlimited tablespace from SMS;

-- Quotas
Alter user SMS quota unlimited on sms_data;

 

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.