摘要: 2010年5月14日星期五 Oracle数据的备份与还原 资料引用:http://www.knowsky.com/384957.html 数据的备份 1 将数据库orcl完全导出,用户名scott 密码tiger 导出到D:\daochu.dmp中 exp scott/tiger@orcl file=d:\daochu.dmp full=y 2 将数据库中system用户与sys用户的表导出 exp scott/tiger@orcl file=d:\daochu.dmp owner=(scott) 3 将数据库中的表inner_notify、notify_staff_relat导出 Exp scott/tiger@orcl file= d:\daochu.dmp tables=(inner_notify,notify_staff_relat) 数据的导入 1.imp scott/tiger@orcl file=d:\daochu.dmp full=y imp scott/tiger@orcl full=y file= d:\daochu. 阅读全文
posted @ 2010-05-14 19:35 叮当小马 阅读(445) 评论(0) 推荐(1)
摘要: 2010年5月13日星期四 赋权限给oralce新建的用户 grant connect to XX; grant exp_full_database to XX; grant imp_full_database to XX; grant resource to XX; grant create procedure to XX; grant create trigger to XX; grant execute any procedure to XX; grant grant any privilege to XX; grant restricted session to XX; grant select any table to XX; grant unlimited tablespace to XX; grant create any view to XX; 阅读全文
posted @ 2010-05-14 19:34 叮当小马 阅读(679) 评论(0) 推荐(1)
摘要: 用代码来实现oracle自动增加1功能 创建序列:-- Create sequence create sequence IP_Test_SEQUENCES minvalue 1 maxvalue 99999999999999999999999999 start with 1 increment by 1 cache 20 order; 创建触发器: create or replace trigger IP_Test_Trigger before insert on ip_test for each row declare -- local variables here next_id number; begin select IP_Test_Sequences.nextval into next_id from dual; :new.id:=next_id; --select IP_Test_Sequences.nextval into :new.id from dual; end IP_Test_Trigger; 阅读全文
posted @ 2010-05-14 19:32 叮当小马 阅读(589) 评论(0) 推荐(1)