Invalid session mode for procedure execution

Database
Enthusiast

Invalid session mode for procedure execution

Am facing this error- 'Invalid session mode for procedure execution' while calling a proc through Java/JDBC. I am guessing that this error has something to do with the db layer.

Solution/Fix?
Tags (1)
8 REPLIES
Senior Apprentice

Re: Invalid session mode for procedure execution

You have to set the session mode to the same mode used when the SP has been created.
You get that info when you submit a "help procedure xxx attributes;"

Then set it in the connection URL using TMODE.

Dieter
Enthusiast

Re: Invalid session mode for procedure execution

Thanks Dieter.

Re: Invalid session mode for procedure execution

Hi Dieter, 

I am having the same trouble. I am trying to call it from SAS. It says 'Invalid Session Mode for procedure execution' Any suggestions? I did some research and found out i should have executed the macro using ANSI session mode is that true? 

Thanks for your time. 

Re: Invalid session mode for procedure execution

go to ODBC configuration on windows control panel.

go to teradata configuration and set the option "Session Character Set" to UTF-8. Then click the button "Options" and set the option "Session Mode:" to ANSI.

it worked for me.

Teradata Employee

Re: Invalid session mode for procedure execution

Yes, it will work with both solutions above.

Enthusiast

Re: Invalid session mode for procedure execution

Hello all .. Any idea how to set this it SQL assistant 

Getting same error : CALL Failed. 5510:  Invalid session mode for procedure execution. 

help   procedure XXX  attributes

transaction-semantics  Platform character_set charterdatatype collation 

ANSI                               LINUX     UTF8               LATIN                 ASCII


Teradata Employee

Re: Invalid session mode for procedure execution

If you are using .NET Provider (recommended) then in the connection dialog just click the "Advanced" tab and select ANSI from the Session Mode drop-down.  If you are using ODBC, then you will need to use the ODBC Data Source Administrator to configure this in the DSN Options.

Enthusiast

Re: Invalid session mode for procedure execution

Thanks Fred , I was able to change it in below option and it worked  

ODBC ADministrator --> Configure --> Options --> Session Mode