The process of establishing a complete database by the oracle database file recently helped the teacher write some functions of the website management system. Because it is not in the same place, the teacher sent me a library file (subsequently named. dmp), I want to build a database and run it on my own. Next I will talk about the steps I have done so as not to forget when I need them. Www.2cto.com 1. First, create an ORACLE database locally. I have written the global database name and SID to SCHOOL. 2. log on to the database as an administrator. I use SYSTEM and the password is the password set during database creation. 3. After you log on to the database using PL/SQL, you can create a user. The Code is as follows: create user myxuser identified by myxuser. You can also change the database password: alter user zzg identified by unis; www.2cto.com 4. by default, after a user is created, the system will assign a tablespace (users) to the user by default ), we can use the following statement to view the tablespace where all users are located: select username, default_tablespace from dba_users; in general, we will not use the default tablespace of users, in this case, we can create a tablespace: create tablespace myxuser_data datafile 'e: \ myxuser. dbf 'size 200 M; tablespace is followed by the tablespace name; datafile is followed by the physical storage path of the tablespace Path; the file suffix can be randomly obtained; size m is the size of the tablespace. 5. create a tablespace and allocate it to the user: alter user myxuser default tablespace myxuser_data; 6. Assign permissions to the user myxuser: grant create session, create table, create view, create sequence, unlimited tablespace to myxuser; www.2cto.com 7, so that the user myxuser can log on. At the same time. dmp file Import Database: imp myxuser/myxuser @ SCHOOL file = E: \ school20130120.dmp fromuser = myxuser touser = myxuser there is a small problem, error: IMP-00013, only DBA can import files exported by other DBAs. Therefore, we need to grant the DBA permission to the user myxuser: grant dba to myxuser. So far, we have found that some tables have been imported to the database for query reasons, because the tablespace size I allocated to myxuser is 200 MB, but there are many library files, so I only imported some tables, so the tablespace size should be expanded automatically: alter database datafile 'e: \ MYXUSER. DBF 'autoextend on next 200 M; // The import is successful if it increases by 200 M every time.