免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 934 | 回复: 0
打印 上一主题 下一主题

oracle常用命令 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-01-09 20:11 |只看该作者 |倒序浏览
1. 添加用户
    create user user_name identified by password;
2. 用户从sqlplus登录,需要create session 权限。所以需要执行如下语句。
    grant create session to user_name;
3. 赋予用户查看某个表的权限,可以使用:
    grant select on table_name to user_name;
4. 撤销某个授权:
    revoke select on table_name from user_name;
    revoke create table from user_name;
    revoke create session from user_name;
5. 要想创建表,还需要对表空间的写权限。
    ALTER USER "user_name" QUOTA UNLIMITED ON 表空间名称
6. 创建数据库。
    在configure and migration tool中的Database configuration assistant可以创建新的数据库。
7. sqlplus登录其他服务器。
    sqlplus "username"/"password"@"databasename"_"ip"
    例如:sqlplus wanjm/pass@first_10.0.0.1 用wanjm用户,器密码为pass登录在10.0.0.1上的first数据库。
   
8. 删除表:
   drop table table_name;  
               
               
               
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1380/showart_66575.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP