Oracle Getting Started Foundation

Source: Internet
Author: User

Log in to the connection using the Sqlplus tool

Start-"Run cmd-" c:\users\admininstrator> sqlplus Please enter your username: [email protected] As SYSDBA enter password:rootsql> or direct input sqlplus sys/[ Email protected] as SYSDBA enter

Querying the current user

Sql>show user;

To enable a locked user username

username account unlock;

Create tablespace (default persistent data file is XX.DBF, set size to 100M, each time self-increment 100m,tempfile means zero data file, depending on need)

Sql>create  [temporary] tablespace tablespace_name tempfile | DataFile ' xx.dbf ' SIZE 100M  

View information about a tablespace (note capitalization)

Sql>select * from Dba_data_files WHERE tablespace_name= ' TEST ';

Modify the state of a tablespace (online or offline)

Sql>alter tablespace tablesapce_name ONLINE | OFFLINE

Querying the status of table spaces

Sql>select status from dba_tablespaces WHERE tablespace_name = ' spacename ';

Delete table space (option to delete data files while deleting tablespaces)

Sql>drop tablespace tablespace_name [including CONTENTS]

Create user ( requires permission to create a user )

  Create a user named Test with the password password, the default tablespace is a, and the table space is B

Sql>create user test identified by password default tablespace A temporary tablespace B;

Delete User

Sql>drop user Testl;

Authorizing a table space

Grant create session to test; Grant test user permission to create session, that is, login permission
Grant unlimited tablespace to test; Grant the test user permission to use the Tablespace
Grant create tablespace to test; Grant test user permission to create table space
Grant alter tablespace to test; Grant test user permission to modify table space
Grant drop tablespace to test; Grant the test user permission to delete a table space
Grant manage tablespace to test; Grant the test user permission to manage the tablespace
Grant CREATE table to test; Grant permission to create a table (contains the creation index permission, ALTER TABLE, DROP TABLE permission)
Grant create view to test; Permissions granted to user Operation view (with ALTER view, DROP VIEW permission)
Grant create trigger to test; Grant user Action trigger permissions (includes ALTER TRIGGER, DROP TRIGGER permissions)
Grant CREATE procedure to test; Grant user permission to manipulate stored procedures (including ALTER procedure, drop procedure and function, and package permissions)
Grant create sequence to test; Permissions granted to the user Action sequence: (includes creation, modification, deletion, and selection sequence)
Grant Select any dictionary to test; Allows selection from a data dictionary table owned by the SYS user

Oracle Getting Started Foundation

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.