1. Export the database
exp 用户名/密码@ORCL file=D:\data.dmp owner=用户名
plsql的使用:
1、登录你要导出的数据库;
2、工具→导出表:
2. Import the database:
1、创建表空间:
create tablespace AJBG datafile 'F:\oracleData\AJBG.dbf' size 100m autoextend on next 50m;
2. Create users and allocate tablespaces:
create userusernameidentified bypassworddefault tablespacetablespacetemporarytablespacetemporary tablespace;
permissions to users:
grant connect, resource, dba to username, [username 2];
4 , Import database:
imp kang/123456@localhost/ORACLE file=”C:\daochu.dmp” full=y ignore=y”
Import using plsql:
1. Log in to other users;
2. Create tablespace:
create tablespace AJBG datafile ' F:\oracleData\AJBG.dbf' size 100m autoextend on next 50m;
Note: When creating a tablespace, it should be the same as the tablespace name of the imported data, if you don't know, open the dmp file with Notepad, and then search for the tablespace.
3. Find the user table:
right-click to add and
assign the tablespace you just created to the user you want to create;
click role permissions:
assign these three permissions, click Apply;
then log out of the currently logged-in user and log in to the user you just created:
click Tools →Import table
Click Import, the database is imported successfully!
**Note: After the database is imported, if you want to check whether the import is suitable, use:
select * from user_table; this is the number of tables in the query database; **