# su - oracle
$ sqlplus /as sysdba
sql> @/path/create_user.sql
/*
-- Create the user
create user myuser
identified by "myuser";
-- Grant/Revoke role privileges
grant connect to myuser;
grant resource to myuser;
-- Grant/Revoke system privileges
grant unlimited tablespace to myuser;
*/
sql> @/path/create_tablespace.sql
/*
CREATE TABLESPACE IBSDATA DATAFILE '/oracdate/myuser/IBSDATA.dbf' SIZE 100M AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE IBSINDEX DATAFILE '/oracdate/myuser/IBSINDEX.dbf' SIZE 50M AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO;
*/
if 执行该过程中可能报/oracdate/myuser oracle用户无权限修改
sql >!
$ su root
# cd /
# chown /oracdate oracle
# exit
sql > 重新执行 create tablespace sql
sql > !
# imp
# 一路选择合适参数即可 包含dmp路径神马的
$ sqlplus /as sysdba
sql> @/path/create_user.sql
/*
-- Create the user
create user myuser
identified by "myuser";
-- Grant/Revoke role privileges
grant connect to myuser;
grant resource to myuser;
-- Grant/Revoke system privileges
grant unlimited tablespace to myuser;
*/
sql> @/path/create_tablespace.sql
/*
CREATE TABLESPACE IBSDATA DATAFILE '/oracdate/myuser/IBSDATA.dbf' SIZE 100M AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO;
CREATE TABLESPACE IBSINDEX DATAFILE '/oracdate/myuser/IBSINDEX.dbf' SIZE 50M AUTOEXTEND ON
LOGGING
ONLINE
PERMANENT
EXTENT MANAGEMENT LOCAL AUTOALLOCATE
BLOCKSIZE 8K
SEGMENT SPACE MANAGEMENT AUTO;
*/
if 执行该过程中可能报/oracdate/myuser oracle用户无权限修改
sql >!
$ su root
# cd /
# chown /oracdate oracle
# exit
sql > 重新执行 create tablespace sql
sql > !
# imp
# 一路选择合适参数即可 包含dmp路径神马的