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

相關文章
相關標籤/搜索