사용자 도구

사이트 도구


mssqlserver:jdbc

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

양쪽 이전 판 이전 판
다음 판
이전 판
다음 판 양쪽 다음 판
mssqlserver:jdbc [2018/12/11 14:46]
kwon37xi
mssqlserver:jdbc [2018/12/11 15:30]
kwon37xi [Stored Procedure connection catalog와 SP의 catalog가 다를 때 문제]
줄 67: 줄 67:
  
 ===== Stored Procedure ===== ===== Stored Procedure =====
 +==== Stored Procedure connection catalog와 SP의 catalog가 다를 때 문제 ====
 +
   * Stored Procedure 사용시에, JDBC Driver 버그로 인해 현재 접속한 catalog(database)가 아닌 다른 catalog의 Stored Procedure 호출시 오류가 발생한다. [[https://hibernate.atlassian.net/browse/HHH-12704|[HHH-12704] MSSQL executing StoredProcedure on different DB using dot notation throws error - Hibernate JIRA]]   * Stored Procedure 사용시에, JDBC Driver 버그로 인해 현재 접속한 catalog(database)가 아닌 다른 catalog의 Stored Procedure 호출시 오류가 발생한다. [[https://hibernate.atlassian.net/browse/HHH-12704|[HHH-12704] MSSQL executing StoredProcedure on different DB using dot notation throws error - Hibernate JIRA]]
 <code> <code>
 The database name component of the object qualifier must be the name of the current database. The database name component of the object qualifier must be the name of the current database.
 </code> </code>
-  * Spring JDBC Template의 [[https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html|SimpleJdbcCall]] 등을 사용해 명시적으로 catalog name을 지정해주면 괜찮다. ''아마도 JPA 등을 사용시에도 [[https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setCatalog-java.lang.String-|Connection.setCatalog()]]를 사용해도 될 것으로 보임. 작업 종료후 복구 필요.+  * Spring JDBC Template의 [[https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/jdbc/core/simple/SimpleJdbcCall.html|SimpleJdbcCall]] 에서 ''withCatalogName()'', ''withSchemaName()'' 등을 사용해 명시적으로 catalog name을 지정해주면 괜찮다. 
 +  * 아마도 JPA 등을 사용시에도 [[https://docs.oracle.com/javase/8/docs/api/java/sql/Connection.html#setCatalog-java.lang.String-|Connection.setCatalog()]]를 사용해도 될 것으로 보임. 작업 종료 후 원래 카탈로그로 복구 필요.
mssqlserver/jdbc.txt · 마지막으로 수정됨: 2022/03/31 17:32 저자 kwon37xi