oralce菜鸟入门

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登录指定的实例,创建我们自己的表了。

8,地址已被占用

修改hosts配置文件

cd /home/instantclient_11_2/network/admin/ 修改地址

 

   

 

posted @ 2018-10-24 11:10  晓晶  阅读(178)  评论(0编辑  收藏  举报