oracle-rac

How to connect to Oracle-RAC using SCAN in python?

北城余情 提交于 2020-02-25 13:15:54
问题 I use cx_Oracle module to connect to standalone Oracle server as follows import cx_Oracle CONN_INFO = { 'host': 'xxx.xx.xxx.x', 'port': 12345, 'user': 'user_name', 'psw': 'your_password', 'service': 'abc.xyz.com', } CONN_STR = '{user}/{psw}@{host}:{port}/{service}'.format(**CONN_INFO) connection = cx_Oracle.connect(CONN_STR) but as scan IP doesn not have machine and its own username passoword, How do we connect? 回答1: Es described in the documentation, you can simple use the name defined in

How to connect to Oracle-RAC using SCAN in python?

柔情痞子 提交于 2020-02-25 13:14:57
问题 I use cx_Oracle module to connect to standalone Oracle server as follows import cx_Oracle CONN_INFO = { 'host': 'xxx.xx.xxx.x', 'port': 12345, 'user': 'user_name', 'psw': 'your_password', 'service': 'abc.xyz.com', } CONN_STR = '{user}/{psw}@{host}:{port}/{service}'.format(**CONN_INFO) connection = cx_Oracle.connect(CONN_STR) but as scan IP doesn not have machine and its own username passoword, How do we connect? 回答1: Es described in the documentation, you can simple use the name defined in

Is there any way to get information about current session from gv$session in oracle?

∥☆過路亽.° 提交于 2019-12-22 07:47:10
问题 Is there any way to uniquely identify current session in GV$SESSION view in Oracle? I've faced with the problem that the following query may return more than one row in case of Oracle RAC configuration: SELECT SID, SERIAL# FROM GV$SESSION WHERE AUDSID = Sys_Context('USERENV', 'SESSIONID') AND SID = Sys_Context('USERENV', 'SID'); Using V$MYSTAT is not an option either, because V$MYSTAT may not be accessible for the current session (for example when statistic is disabled). 回答1: Try this: SELECT

Is there any way to get information about current session from gv$session in oracle?

自作多情 提交于 2019-12-22 07:47:06
问题 Is there any way to uniquely identify current session in GV$SESSION view in Oracle? I've faced with the problem that the following query may return more than one row in case of Oracle RAC configuration: SELECT SID, SERIAL# FROM GV$SESSION WHERE AUDSID = Sys_Context('USERENV', 'SESSIONID') AND SID = Sys_Context('USERENV', 'SID'); Using V$MYSTAT is not an option either, because V$MYSTAT may not be accessible for the current session (for example when statistic is disabled). 回答1: Try this: SELECT