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.