首页 > 数据库 > Oracle > 正文

ORACLE简单应用

2024-08-29 13:39:04
字体:
来源:转载
供稿:网友

  用户创建: create user <用户名> identified by <密码>
  
   default tablespace users
  
   temporary tablespace temp;
  
  新用户权限设定:grant connect,resource,unlimited tablespace to <用户名>;
  
  用户丢弃: drop user <用户名> cascade;
  
  
  取消权限: revoke <权限> from <用户名>;
  
  
  查询用户: select * from dba_users;
  
  
  查询已创建用户:select username from dba_users;
  
  
  查询空间: select * from dba_tablespaces;
  
  
  数据导入: imp <用户名>/<密码> file=文件名.dmp full=y
  
  
  数据导出: eXP <用户名>/<密码> file=文件名.dmp full=y
  
  
  提交: commit;
  
  
  添加数据库文件:alter tablespace users add datafile '路径/users2.ora' size 500M;
  
   alter tablespace rbs add datafile '路径/rbs2.ora' size 200M;
  
   alter tablespace temp add datafile '路径/tmp2.ora' size 200M;
  
  
  开启表: alter rollback segment rb* online;
  
  
  关闭表: alter rollback segment rb* offline;
  
  
  添加回滚段: alter rollback segment rb* storage (next 2M optimal 10M);
  
  
  创建回滚段: create public rollback segment rb* storage (next 2M optimal 10M);
  
  
  注册表语言: ZHS16GBK 或者 ZHS16CGB231280
  
  
  启动LISTENER: lsnrctl status (看状态)
  
   lsnrctl start (启 动)

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表