首页 > 其他 > 详细

oralce菜鸟入门

时间:2018-10-24 13:27:05      阅读:153      评论:0      收藏:0      [点我收藏+]

linux 安装oralce11g

登录 sqlplus / as sysdba

1,启动数据库  startup 

2,启动监听 exit , lsnrctl start

3,   查看监听状态 lsnrctl status

4,查询临时表空间

------    查询临时表空间文件的绝对路径。如果需要的话,可以通过查询来写定绝对路径。一般用${ORACLE_HOME}就可以了 

            select name from v$tempfile;

            create temporary tablespace NOTIFYDB_TEMP tempfile ‘/oracle/oradata/orcl/temp.dbf‘ size 100m reuse autoextend on next 20m maxsize unlimited;

5,创建表空间

-------   查询用户表空间文件的绝对路径:

           select name from v$datafile;

          create tablespace NOTIFYDB datafile ‘/oracle/oradata/orcl/notifydb.dbf‘ size 100M reuse autoextend on next 40M maxsize unlimited default storage(initial 128k next 128k minextents 2 maxextents                    unlimited);

6, 创建用户和密码,指定上边创建的临时表空间和表空间

--------create user ready identified by hc_password default tablespace NOTIFYDB temporary tablespace NOTIFYDB_TEMP;

7,赋予权限

    grant dba to ready;

    grant connect,resource to ready;

    grant select any table to ready;

    grant delete any table to ready;

    grant update any table to ready;

    grant insert any table to ready;

经过以上操作,就可以使用ready/hc_password登录指定的实例,创建我们自己的表了。

 

oralce菜鸟入门

原文:https://www.cnblogs.com/wangjingjing-blog/p/9841831.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!