[teiid-issues] [JBoss JIRA] (TEIID-5386) Wrong procedure import from MS SQL Server

Steven Hawkins (JIRA) issues at jboss.org
Thu Jun 21 11:20:00 EDT 2018


    [ https://issues.jboss.org/browse/TEIID-5386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13595202#comment-13595202 ] 

Steven Hawkins commented on TEIID-5386:
---------------------------------------

> not sure why the ;1

That is really a bug with the driver.  SQL Server has a deprecated convention that allow the same procedure with different signatures to be grouped together for the purpose of being dropped - https://docs.microsoft.com/en-us/sql/t-sql/statements/create-procedure-transact-sql?view=sql-server-2017

The driver is reporting that as the name, when it should be the specific name instead. 

What driver version is this?

> Wrong procedure import from MS SQL Server
> -----------------------------------------
>
>                 Key: TEIID-5386
>                 URL: https://issues.jboss.org/browse/TEIID-5386
>             Project: Teiid
>          Issue Type: Bug
>          Components: Misc. Connectors
>    Affects Versions: 8.12.13.6_4
>            Reporter: Jan Martiska
>            Assignee: Steven Hawkins
>
> When using automatic procedure import from SQL Server (I used 2016) with a model like this:
> {noformat}
> <model name="mymodel">
>         <property name="importer.useFullSchemaName" value="false"/>
>         <property name="importer.UseQualifiedName" value="false" />
>         <property name="importer.procedureNamePattern" value="echo%"/>
>         <property name="importer.importProcedures" value="true" />
>         <source connection-jndi-name="java:/mssql2016"
>             name="mySource" translator-name="sqlserver" />
>     </model>
> {noformat}
> There is a procedure named {{echo}} in SQL server. It is imported into the VDB as {{"mymodel"."echo;1"}} (not sure why the ;1). When I afterwards try to execute it using
> {noformat}
> EXEC "mymodel"."echo;1"();
> {noformat}, I will get this exception from SQL server which suggests that Teiid mapped the procedure to the wrong name in the source database:
> {noformat}
> com.microsoft.sqlserver.jdbc.SQLServerException: Could not find stored procedure 'echo;1'.
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the teiid-issues mailing list