Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1995685
  • 博文数量: 1647
  • 博客积分: 80000
  • 博客等级: 元帅
  • 技术积分: 9980
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-13 15:15
文章分类

全部博文(1647)

文章存档

2011年(1)

2008年(1646)

我的朋友

分类:

2008-10-28 18:34:15


  先删除用户,在重建用户,然后赋权,脚本放到crontab中定时执行即可
  
  source /opt/.bash_profile
  DATE=$(date +%Y%m%d)
  sqlplus /nolog <  connect / as sysdba;
  DROP USER WAPUSER CASCADE;
  DROP USER JLTGAME CASCADE;
  CREATE USER "WAPUSER" PROFILE "DEFAULT"
  IDENTIFIED BY "123456" DEFAULT TABLESPACE "JLTGAME"
  TEMPORARY TABLESPACE "TEMP"
  ACCOUNT UNLOCK;
  CREATE USER "JLTGAME" PROFILE "DEFAULT"
  IDENTIFIED BY "JLTGAME123" DEFAULT TABLESPACE "JLTGAME"
  TEMPORARY TABLESPACE "TEMP"
  ACCOUNT UNLOCK;
  GRANT CREATE VIEW     TO JLTGAME;
  GRANT CREATE TABLE     TO JLTGAME;
  GRANT ALTER ANY TYPE    TO JLTGAME;
  GRANT CREATE SESSION    TO JLTGAME;
  GRANT CREATE SYNONYM    TO JLTGAME;
  GRANT CREATE TRIGGER    TO JLTGAME;
  GRANT ALTER ANY INDEX   TO JLTGAME;
  GRANT ALTER ANY TABLE   TO JLTGAME;
  GRANT CREATE ANY TYPE   TO JLTGAME;
  GRANT CREATE ANY VIEW   TO JLTGAME;
  GRANT CREATE SEQUENCE   TO JLTGAME;
  GRANT CREATE SNAPSHOT   TO JLTGAME;
  GRANT ALTER TABLESPACE   TO JLTGAME;
  GRANT CREATE ANY INDEX   TO JLTGAME;
  GRANT CREATE ANY TABLE   TO JLTGAME;
  GRANT CREATE PROCEDURE   TO JLTGAME;
  GRANT ALTER ANY TRIGGER  TO JLTGAME;
  GRANT CREATE ANY TRIGGER  TO JLTGAME;
  GRANT ALTER ANY INDEXTYPE TO JLTGAME;
  GRANT CREATE ANY INDEXTYPE TO JLTGAME;
  GRANT UNLIMITED TABLESPACE TO JLTGAME;
  exit
  EOF
  imp userid=jltgame/JLTGAME123 file=/backup/52backup/jltgame$DATE.dmp full=y log=/opt/logjltgame$DATE.dmp
【责编:admin】

--------------------next---------------------

阅读(282) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~