Oracle常见命令操作
?
?
1. 创建表空间、用户、给用户授权:
create tablespace temptusers datafile 'D:\oracle\product\10.2.0\
oradata\oracl\temptusers.dbf' size 1024m
?
create user e2qoa_v3 identified by "123456"
profile default
default tablespace users
temporary tablespace temptusers
account unlock
?
grant connect to e2qoa_v3
grant create session to e2qoa_v3
create user XXX identified by 密码;
alter user XXX default tablespace 表空间名 quota unlimited on 表空间名;
alter user XXX temporary tablespace temp;
grant create trigger to XXX ;
grant create session to XXX ;
grant create sequence to XXX ;
grant create synonym to XXX ;
grant create table to XXX ;
grant create view to XXX ;
grant create procedure to XXX ;
grant alter session to XXX ;
grant execute on ctxsys.ctx_ddl to XXX ;
5).将D:\daochu.dmp 中的数据导入 TEST数据库中:
??imp system/manager@TEST? file=d:\daochu.dmp
??上面可能有点问题,因为有的表已经存在,然后它就报错,对该表就不进行导入。在后面加上 ignore=y 就可以了。
6).将d:\daochu.dmp中的表table1 导入:
imp system/manager@TEST?file=d:\daochu.dmp? tables=(table1)
7). 同名用户之间的数据导入:
imp hkb/hkb@xe?file=c:\orabackup\hkbfull.dmp log=c:\orabackup\hkbimp.log full=y
8). 不同名用户之间的数据导入:
impsystem/test@xe fromuser=hkb touser=hkb_new ??file=c:\orabackup\hkbfull.dmplog=c:\orabackup\hkbimp.log;
1).在命令行下输入以下命令登陆:
sqlplus / as sysdba;???????提示:斜杆后必须有空格
SQL> alter user sys identified by sys;
用户已更改。
SQL> alter user system identified by system;
用户已更改。
详情如下图所示:
<!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"> <v:stroke joinstyle="miter" /> <v:formulas> <v:f eqn="if lineDrawn pixelLineWidth 0" /> <v:f eqn="sum @0 1 0" /> <v:f eqn="sum 0 0 @1" /> <v:f eqn="prod @2 1 2" /> <v:f eqn="prod @3 21600 pixelWidth" /> <v:f eqn="prod @3 21600 pixelHeight" /> <v:f eqn="sum @0 0 1" /> <v:f eqn="prod @6 1 2" /> <v:f eqn="prod @7 21600 pixelWidth" /> <v:f eqn="sum @8 21600 0" /> <v:f eqn="prod @7 21600 pixelHeight" /> <v:f eqn="sum @10 21600 0" /> </v:formulas> <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" /> <o:lock v:ext="edit" aspectratio="t" /></v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:392.25pt; height:202.5pt'> <v:imagedata src="file:///C:\DOCUME~1\_Bean.Woo\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.jpg" o:title="1111" /></v:shape><![endif]--><!--[if !vml]--><!--[endif]-->?
?