이 콘텐츠는 선택한 언어로 제공되지 않습니다.

3.9. The SET Statement


Execution properties are set on the connection using the SET statement. The SET statement is not yet a language feature of JBoss Data Virtualization and is handled only in the JDBC client.
SET Syntax:
  • SET [PAYLOAD] (parameter|SESSION AUTHORIZATION) value
  • SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL (READ UNCOMMITTED|READ COMMITTED|REPEATABLE READ|SERIALIZABLE)
Syntax Rules:
  • The parameter must be an identifier. If quoted, it can contain spaces and other special characters, but otherwise it can not.
  • The value may be either a non-quoted identifier or a quoted string literal value.
  • If payload is specified, for example, SET PAYLOAD x y, then a session scoped payload properties object will have the corresponding name value pair set. The payload object is not fully session scoped. It will be removed from the session when the XAConnection handle is closed/returned to the pool (assumes the use of TeiidDataSource). The session scoped payload is superseded by usage of the TeiidStatement.setPayload.
Using SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL is equivalent to calling Connection.setTransactionIsolation with the corresponding level.
The SET statement is most commonly used to control planning and execution.
  • SET SHOWPLAN (ON|DEBUG|OFF)
  • SET NOEXEC (ON|OFF)
The following is an example of how to use the SET statement to enable a debug plan:
Statement s = connection.createStatement();
s.execute("SET SHOWPLAN DEBUG");

Statement s1 = connection.createStatement();
ResultSet rs = s1.executeQuery("select col from table");

ResultSet planRs = s1.executeQuery("SHOW PLAN");
planRs.next();
String debugLog = planRs.getString("DEBUG_LOG");
Query Plan without executing the query
s.execute("SET NOEXEC ON");
s.execute("SET SHOWPLAN DEBUG");
...
e.execute("SET NOEXEC OFF");
Copy to Clipboard Toggle word wrap
The SET statement may also be used to control authorization. A SET SESSION AUTHORIZATION statement will perform a reauthentication (see Section 2.6, “Reauthentication”) given the credentials currently set on the connection.
The connection credentials may be changed by issuing a SET PASSWORD statement.
Statement s = connection.createStatement();
s.execute("SET PASSWORD 'someval'");
s.execute("SET SESSION AUTHORIZATION 'newuser'");
Copy to Clipboard Toggle word wrap
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat