oralce菜鸟入门

linux 安装oralce11glinux

登陆 sqlplus / as sysdbasql

1,启动数据库  startup 数据库

2,启动监听 exit , lsnrctl startoracle

3,   查看监听状态 lsnrctl statuside

4,查询临时表空间spa

------    查询临时表空间文件的绝对路径。若是须要的话,能够经过查询来写定绝对路径。通常用${ORACLE_HOME}就能够了 it

            select name from v$tempfile;table

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

5,建立表空间cli

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

           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/ 修改地址

相关文章
相关标签/搜索