国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 數(shù)據(jù)庫 > Oracle > 正文

連接Oracle11g的三種方法

2024-08-29 13:54:53
字體:
來源:轉載
供稿:網(wǎng)友

這學期在上Oracle數(shù)據(jù)庫技術,為更好理解和掌握這門技術,特為總結lesson01。

方法1. Host Operating system connection(Local access 本地連接) 

(1)/開始/設置/網(wǎng)絡連接,啟動“VirtualBox Host-Only Network”網(wǎng)絡連接;(2)啟動 VirtualBox, 選擇 Oracle11g, 在打開的頁面上點擊 設置/網(wǎng)絡 ,配置網(wǎng)卡 1:“僅主機(Host- Only)適配器”, 網(wǎng)卡 2:“網(wǎng)絡地址轉換(NAT)”;(3)啟動 Oracle11g,然后輸入如下的用戶名和密碼進入虛擬linux操作系統(tǒng)界面: username: root  passWord: redhat (4)# su - oracle  (此命令為 切換到用戶oracle)(5)$su -     (此命令為 切換回超級管理員root)(6) Password: 此處的密碼為 redhat注意:步驟(5)(6)僅為介紹如何切換用戶,無特別意義。(7)# su - oracle(8)$ sqlplus sys/oracle as sysdba  (數(shù)據(jù)庫的管理員sys,密碼為oracle)(9)SQL> startup   SQL>  select * from  scott.dept;     SQL>  select global_name from global_name;(10)SQL>  shutdown immediate;   (關閉數(shù)據(jù)庫)方法2. Client/Server connection (在同一臺電腦上模擬遠程連接Server端上的Oracle) Client-主機(Win7/win10/win2003)假設配置ip地址為192.168.22.2,Server-虛擬機(Oracle linux5.4) 假設配置ip地址為192.168.22.3(本實驗環(huán)境下,這兩個地址應配置在同一網(wǎng)段內)(1)主機:  /開始/設置/網(wǎng)絡連接,啟動“VirtualBox Host-Only Network” 網(wǎng)絡連接 (2)右擊“VirtualBox Host-Only Network”網(wǎng)絡連接/屬性,選擇“Internet 協(xié)議版本 4(TCP/IPv4)”屬性,設置其 ip地址等;(3)啟動 VirtualBox, 選擇 Oracle11g, 在打開的頁面上點擊 設置/網(wǎng)絡 ,配置網(wǎng)卡 1:“僅主機(Host- Only)適配器”, 網(wǎng)卡 2:“網(wǎng)絡地址轉換(NAT)”;(4)啟動 Oracle11g,   username:root    password:redhat (5)# ifconfig  (查看Server服務器的ip地址的命令)(6)# ping 192.168.22.2  (檢查Server服務器是否能與client-主機通信)(7)# su  - oracle   (切換到用戶oracle)(8)$ lsnrctl start  (啟動監(jiān)聽器 listenercontrol)(9)client-主機:打開cmd命令行窗口,          ping 192.168.22.3 (檢查主機是否能與Server服務器通信)          sqlplus sys/oracle@192.168.22.3:1521/orcl.oracle.com as sysdba         (192.168.22.3:1521 是ip地址和端口號,orcl.oracle.com 是Server服務器上的某一個Database )(10)若不想輸入192.168.22.3:1521/orcl.oracle.com這個長字符串,則可以通過以下兩個步驟替代步驟(9):I 主機:安裝客戶端的 Oracle11g,創(chuàng)建命名服務 abcII 主機:打開cmd命令行窗口,然后輸入           sqlplus sys/oracle@abc  as sysdba(11) 主機:SQL>  select * from scott.dept;(12) 主機:SQL>  shutdown immediate;   (關閉數(shù)據(jù)庫)3. Browser/Server connection (打開Oracle的可視化操作界面)(1)/開始/設置/網(wǎng)絡連接,啟動“VirtualBoxHost-OnlyNetwork”網(wǎng)絡連接;(2)啟動 VirtualBox, 選擇 Oracle11g, 在打開的頁面上點擊 設置/網(wǎng)絡 ,配置網(wǎng)卡 1:“僅主機(Host- Only)適配器”, 網(wǎng)卡 2:“網(wǎng)絡地址轉換(NAT)”;(3)啟動 Oracle11g,然后輸入如下的用戶名和密碼進入虛擬Linux操作系統(tǒng)界面: username: root  password: redhat (4)# xhost +  (Linux,圖形界面)(5)# su - oracle  (此命令為 切換到用戶oracle)(6)$ lsnrctl start (7)$ emctl start dbconsole  (emctl 是 EnterPRise Manager Control)(8)$ Firefox https://oracle.example.com:1158/em            username: sys            password: oracle            connect As: sysdba注意:若在步驟(8)打開的頁面上提示status failed,則需要先在前面的方法1打開的shell界面上輸入如下五條命令修改數(shù)據(jù)庫配置:    SQL> alter profile default limit password_life_time unlimited;    SQL> alter user sys identified by oracle account unlock;    (解鎖用戶sys,其中sys的密碼為oracle)    SQL> alter user system identified by oracle account unlock; (解鎖用戶system,其中system的密碼為oracle)    SQL> alter user dbsnmp identified by oracle account unlock; (解鎖用戶dbsnmp,其中dbsnmp的密碼為oracle)    SQL> alter user sysman identified by oracle account unlock; (解鎖用戶dbsnmp,其中sysman的密碼為oracle)    然后:先關閉dbconsole     --> (9) $ emctl stop dbconsole再重新打開dbconsole --> (10)$ emctl start dbconsole之后即可正常打開Oracle的可視化操作界面 -->(11)$ firefox https://oracle.example.com:1158/em   username: sys           password: oracle             connect As: sysdba
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 平定县| 平凉市| 辽中县| 沧州市| 福鼎市| 沾化县| 鹰潭市| 六盘水市| 台前县| 江安县| 大安市| 界首市| 常山县| 哈尔滨市| 兴隆县| 丰宁| 丰都县| 兴城市| 永昌县| 响水县| 巴楚县| 普洱| 凤台县| 曲沃县| 阳新县| 札达县| 永年县| 莱阳市| 普格县| 曲松县| 白玉县| 重庆市| 宁蒗| 炉霍县| 清流县| 仁布县| 桐梓县| 宜章县| 安福县| 龙口市| 汨罗市|