常用的oracle 命令,總是忘,呵呵


          1
          導(dǎo)出:
          EXP.EXE cits_cc/cits_cc@cits direct=y buffer=327680 file=D:\cits.dmp owner=(cits_cc,cits_stat)

          導(dǎo)入:
          IMP.EXE cits_cc/cits_cc@cits file=D:\cits.dmp fromuser=(cits_cc,cits_stat) touser=(cits_cc,cits_stat)

          2
          連接數(shù)據(jù)庫
          sqlpuls /nolog
          connect / as sysdba

          3 查看實(shí)例
          select * from v$instance

          4 啟動數(shù)據(jù)庫

          ?startup nomount 啟動實(shí)例但不加載數(shù)據(jù)
          ?startup mount?? 啟動實(shí)例加載數(shù)據(jù),但不大開數(shù)據(jù)庫
          ?startup???????? 啟動實(shí)例,加載數(shù)據(jù),打開數(shù)據(jù)庫
          ?
          ?alter database mount 為實(shí)例加載數(shù)據(jù)
          ?alter database open? 從加載狀態(tài)進(jìn)入打開狀態(tài)

          ?startup force 強(qiáng)行啟動數(shù)據(jù)庫

          5 受限狀態(tài) 只有dba 或同時具有create sesson 和restricted session 可以訪問數(shù)據(jù)庫
          ?在受限狀態(tài)下一般的用戶(create session)不能訪問,但是dba 可以進(jìn)行數(shù)據(jù)庫的維護(hù),數(shù)據(jù)的導(dǎo)入導(dǎo)出
          ?startup restrict 啟動進(jìn)入受限狀態(tài)
          ?alter system disable restricted session 恢復(fù)正常狀態(tài)
          ?alter system enable restricted session? 進(jìn)入受限狀態(tài)

          6 只讀數(shù)據(jù)庫
          ? alter database open read only
          ? alter database open read write

          7 關(guān)閉數(shù)據(jù)庫
          ?shutdonw normal???????? 正常關(guān)閉
          ?shutdown immediate????? 立即關(guān)閉
          ?shutdown transactional? 事務(wù)型關(guān)閉
          ?shutdown abort????????? 立即中止

          8 靜默狀態(tài)(只有dba 可以訪問)
          ?alter system? quiesce restricted 進(jìn)入靜默狀態(tài)
          ?alter system unquiesce?????????? 退出靜默狀態(tài)
          ?select active_status from v$instance 查詢靜默狀態(tài)

          9 掛起狀態(tài)(暫停所有io操作)
          ?alter system suspend 掛起
          ?alter system resume? 恢復(fù)
          ?select database_status from v$instance 查詢狀態(tài)

          9 創(chuàng)建數(shù)據(jù)庫 dbca

          posted on 2006-07-13 14:00 康文 閱讀(408) 評論(1)  編輯  收藏 所屬分類: 數(shù)據(jù)庫

          評論

          # re: 常用的oracle 命令,總是忘,呵呵 2006-11-03 19:16 miao

          xiela  回復(fù)  更多評論   

          <2006年11月>
          2930311234
          567891011
          12131415161718
          19202122232425
          262728293012
          3456789

          導(dǎo)航

          統(tǒng)計(jì)

          常用鏈接

          留言簿(1)

          隨筆分類

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 收藏| 武平县| 乐平市| 丰台区| 瑞安市| 红桥区| 安西县| 遂昌县| 巨野县| 黄骅市| 登封市| 昭平县| 镇康县| 稷山县| 南陵县| 淮北市| 东丰县| 大冶市| 汉源县| 措美县| 赣州市| 苍溪县| 绵竹市| 南漳县| 玉环县| 衡水市| 靖西县| 黄山市| 双柏县| 岳阳市| 喀喇沁旗| 离岛区| 兴义市| 泰和县| 定边县| 泰兴市| 乐昌市| 盐津县| 吉林省| 晋宁县| 舒兰市|