ORACLE問題,每天10問(二)

來源:互聯網
上載者:User
oracle|問題
11. 怎樣得到觸發器、過程、函數的建立指令碼?  desc user_source  user_triggers

12. 怎樣計算一個表佔用的空間的大小?  select owner,table_name,   NUM_ROWS,   BLOCKS*AAA/1024/1024 "Size M",   EMPTY_BLOCKS,   LAST_ANALYZED   from dba_tables   where table_name='XXX';   Here: AAA is the value of db_block_size ;   XXX is the table name you want to check  13. 如何查看最大會話數?  SELECT * FROM V$PARAMETER WHERE NAME LIKE 'proc%';  SQL>   SQL> show parameter processes   NAME TYPE VALUE   ------------------------------------ ------- ------------------------------   aq_tm_processes integer 1   db_writer_processes integer 1   job_queue_processes integer 4   log_archive_max_processes integer 1   processes integer 200   這裡為200個使用者。  select * from v$license;   其中sessions_highwater紀錄曾經到達的最大會話數      

       14. 如何查看系統被鎖的事務時間?  select * from v$locked_object ;  15. 如何以archivelog的方式運行oracle。  init.ora   log_archive_start = true  RESTART DATABASE  16. 怎么擷取有哪些使用者在使用資料庫  select username from v$session;  17. 資料表中的欄位最大數是多少?  表或視圖中的最大列數為 1000  18. 怎樣查得資料庫的SID ?  select name from v$database;   也可以直接查看 init.ora檔案  19. 如何在Oracle伺服器上通過SQLPLUS查看本機IP地址 ?  select sys_context('userenv','ip_address') from dual;  如果是登陸本機資料庫,只能返回127.0.0.1,呵呵  20. unix 下怎么調整資料庫的時間?  su -root   date -u 08010000


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.