ORACLE11G creates user and table spaces and imports. DMP file ____oracle

Source: Internet
Author: User
Tags one table sqlplus

First, Sqlplus/nolog

Second, Conn Scott/tiger as SYSDBA (login administrator to create user)

Create user a identified by A; (Creates a username: a password: A. User and password can be defined by themselves)

Four, grant create session,create table,unlimited tablespace,create sequence to A;

Grant connect to A;

Grant resource to A;

Grant DBA to A;

Note: All four of the above are assigned to user A.

Five, create tablespace tbs_a_data datafile ' C:\oraclexe\app\oracle\oradata\XE\TBS_A_DATA. DBF ' size 50M autoextend on next 50M MaxSize Unlimited; (CREATE table Space Tbs_a_data)

Alter User A default Tablespace tbs_a_data (set a user's table space by default to Tbs_a_data)

Set up the database server character set (execute the following SQL statement sequentially in the Sqlplus interface)

1, SHUTDOWN IMMEDIATE

2, STARTUP MOUNT;

3, ALTER SYSTEM ENABLE restricted session;

4, ALTER SYSTEM SET job_queue_processes=0;

5, ALTER SYSTEM SET aq_tm_processes=0;

6, ALTER DATABASE OPEN;

7, ALTER DATABASE CHARACTER SET internal_use ZHS16GBK;

8, ALTER DATABASE National CHARACTER SET INTERNAL ZHS16GBK;

The last line of command may not work, but it does not matter, the previous line has been executed.

9, SHUTDOWN IMMEDIATE;

10, STARTUP

The character set is set to complete. Can mount Pl/sql execute this query statement select USERENV (' language ') Nls_lang from dual;

has been correctly modified to simplified. Chinese_china. ZHS16GBK.

11. Import the DMP file (imp a/a@127.0.0.1/xe file=d:\1.dmp full=y log=d:\1.log) to execute in c:\users\administrator> environment.

Note: 1, sometimes the user (table space) may be created incorrectly can be deleted to rebuild

Drop user A cascade; Delete User

Drop tablespace tbs_a_data including contents and datafiles; Delete a table space

2, may be a DMP file has more than one table space, so you can create more than one.










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.