Oracle user Creation

Source: Internet
Author: User
-- Create a user and grant corresponding Permissions
Create user test identified by "test ";
Grant dba to test;
Grant unlimited tablespace to test;
Grant create any table to test;

-- Create a tablespace
Create tablespace SM10001
Logging datafile 'd: \ oracle \ test_data01.dbf size 32 m
Autoextend (Auto scaling) on next 32 m maxsize 2048 m extent (width) management (management, processing) local;

-- Assign tablespace to users
Alter user smchannel default tablespace SM10001

-- The following two sentences solve the problem that function indexes cannot be dynamically created,
For example:
Create index I _USER on T_USER (SUBSTR (USER_NAME, 1, 2 ))
Alter system set query_rewrite_enabled = true;
Grant query rewrite to test;



-- Deleting a user actually removes the user and the created database objects from the data dictionary. After the user is deleted, the entity created by the user is also deleted.
-- Note: the user name cannot be modified, the online user cannot be deleted, and the user's tablespace cannot be deleted.
Drop user test cascade;

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.