Oracle Private Database - Create Context
Posted: Wed 27 Jan 2016 10:57
Greeting:
I need to intercept the connection of OracleDataSource (ASP.NET) because I use the Oracle Private Database feature, and post the connection event, have to pass the parameters of the oracle surrounding context in my session, currently in a client / server use the resource below. I wonder what the best practice of using this feature in ASP.NET
My platform:
Minha plataforma:
Windows 10, Visual Studio 2010, Dot Connect for Oracle 8.5.558.0
Example of the resource currently used in client / server:
"CREATE CONTEXT CTX_CTX_ID USING PCK_CTX_ID;
/
CREATE OR REPLACE PACKAGE PCK_CTX_ID AS
PROCEDURE SET_CONTEXT(CTX_NAME VARCHAR2, CTX_ID VARCHAR2);
END;
/
CREATE OR REPLACE PACKAGE BODY PCK_CTX_ID IS
PROCEDURE SET_CONTEXT(CTX_NAME VARCHAR2, CTX_ID VARCHAR2) IS
SINC_ID_ VARCHAR2(30);
BEGIN
DBMS_SESSION.SET_CONTEXT(CTX_NAME,'CTX_ID',CTX_ID);
END;
END;
/"
Command that must pass before executing the select component of OracleDataSource:
PCK_CTX_ID.SET_CONTEXT('CTX_CTX_ID', CTX_ID_);
PCD_SET_CLIENT_INFO(TO_CHAR(ACU_ID_) || ';' || IP_ || ';' || TO_CHAR(LANGUAGE_) || ';' || VERSION_ || ';' || TO_CHAR(CTX_ID_) || ';' || TO_CHAR(COM_ID_) || ';' || ACU_NAME_, LOGIN_);
Best regards,
Vanderlei
I need to intercept the connection of OracleDataSource (ASP.NET) because I use the Oracle Private Database feature, and post the connection event, have to pass the parameters of the oracle surrounding context in my session, currently in a client / server use the resource below. I wonder what the best practice of using this feature in ASP.NET
My platform:
Minha plataforma:
Windows 10, Visual Studio 2010, Dot Connect for Oracle 8.5.558.0
Example of the resource currently used in client / server:
"CREATE CONTEXT CTX_CTX_ID USING PCK_CTX_ID;
/
CREATE OR REPLACE PACKAGE PCK_CTX_ID AS
PROCEDURE SET_CONTEXT(CTX_NAME VARCHAR2, CTX_ID VARCHAR2);
END;
/
CREATE OR REPLACE PACKAGE BODY PCK_CTX_ID IS
PROCEDURE SET_CONTEXT(CTX_NAME VARCHAR2, CTX_ID VARCHAR2) IS
SINC_ID_ VARCHAR2(30);
BEGIN
DBMS_SESSION.SET_CONTEXT(CTX_NAME,'CTX_ID',CTX_ID);
END;
END;
/"
Command that must pass before executing the select component of OracleDataSource:
PCK_CTX_ID.SET_CONTEXT('CTX_CTX_ID', CTX_ID_);
PCD_SET_CLIENT_INFO(TO_CHAR(ACU_ID_) || ';' || IP_ || ';' || TO_CHAR(LANGUAGE_) || ';' || VERSION_ || ';' || TO_CHAR(CTX_ID_) || ';' || TO_CHAR(COM_ID_) || ';' || ACU_NAME_, LOGIN_);
Best regards,
Vanderlei