MERCADOS FINANCIEROS

lunes, 18 de mayo de 2020

CREACION DE SERVICIOS DBMS_SERVICE.CREATE

$ cd $ORACLE_HOME/network/admin

SERV1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = SERV1.us.oracle.com)
    )
  )


SQL> execute dbms_service.create_service('SERV1','SERV1.us.oracle.com');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.start_service('SERV1');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.stop_service('SERV1');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.delete_service('SERV1');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.create_service('SERV1','SERV1.us.oracle.com');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.start_service('SERV1');

PL/SQL procedure successfully completed.

SQL> execute dbms_service.disconnect_session('SERV1');

PL/SQL procedure successfully completed.


SQL> connect system@serv1
Enter password: 
Connected.

SQL> execute dbms_service.disconnect_session('SERV1');


SQL> connect system@serv1
Enter password: 
Connected.
SQL> 
SQL> 
SQL> select * from hr.employees;
select * from hr.employees
*
ERROR at line 1:
ORA-00028: your session has been killed

CONSULTAR EL SERVICIO QUE MAS CONSUME RECURSOS

select service_name,cpupercall from v$servicemetric;


No hay comentarios: