使用 dbms_service 來管理oracle 的服務(單一實例),dbms_serviceoracle

來源:互聯網
上載者:User

使用 dbms_service 來管理oracle 的服務(單一實例),dbms_serviceoracle

----建立一個新服務,建立完成後pmon 會自動(動態)註冊到tnslsnr ,這個建立的服務不是永久性的,資料庫重啟後會丟失。

要 持久化 需要使用 alter system set service_names=‘xx',’ssx‘;

exec DBMS_SERVICE.CREATE_SERVICE('hlj','hlj.oracle.com');

exec DBMS_SERVICE.CREATE_SERVICE('hlj','hlj');

-----啟動服務

exec DBMS_SERVICE.START_SERVICE('hlj');


------關閉服務

exec DBMS_SERVICE.STOP_SERVICE('hlj');


------刪除服務(只是臨時刪除,資料庫重啟後又會恢複原狀)

exec DBMS_SERVICE.DELETE_SERVICE('hlj');


-------中斷連線

exec DBMS_SERVICE.DISCONNECT_SESSION('hlj');
 
 
 
 
 
 

相關文章

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.