日期:2014-05-16  浏览次数:20468 次

oracle 导入、导出;创建表空间和用户并授权

?



--oracle导出语句
exp system/manager@lmis file=F:\数据库\dd.dmp full=y log=F:\dd.log owner=dd?

connect system/manager
---创建表空间(lz表空间)-----
CREATE TABLESPACE lz_data DATAFILE 'D:\oracle\product\10.2.0\oradata\lz_data.dbf' SIZE 1000M AUTOEXTEND ON NEXT 50M MAXSIZE UNLIMITED;

---创建用户(lz用户)
CREATE USER lz ?PROFILE DEFAULT IDENTIFIED BY lz
DEFAULT TABLESPACE lz_data TEMPORARY TABLESPACE TEMP ACCOUNT UNLOCK;

--授权
GRANT CONNECT,RESOURCE,DBA TO lz WITH ADMIN OPTION;
GRANT CREATE TABLE TO lz;
GRANT CREATE TRIGGER TO lz;
ALTER USER lz DEFAULT ROLE ?ALL;
grant select any table to lz;
grant alter any table to lz;

--oracle导入语句:
imp system/manager file = d:\20090718.dmp fromuser = dd,dx,hei touser = dd,dx,hei ignore = y log = c:\usr.log buffer=2048000